Extensions and patches to
POV-Ray 3.6 / MegaPOV 1.2 for Unix

Installation instructions for the source patches

Patching the POV-Ray / MegaPOV sources
Building the patched POV-Ray / MegaPOV sources
Installing the binary

Nicolas Calimet <pov4grasp@free.fr>

Updated Apr 23, 2006

These installation instructions detail how to apply the featured patches to the source code of POV-Ray 3.6.1 or MegaPOV 1.2.1 for Unix. If you don't feel like patching and compiling the POV-Ray or MegaPOV sources, you may try the pre-compiled 32 bit PC-Linux binaries instead.

Patching the POV-Ray / MegaPOV sources

The patches are released in the form of bzip2-compressed diff-formatted files. They are applied against the source code of POV-Ray 3.6.1 for Unix or MegaPOV 1.2.1 for Unix using the standard Unix patch utility. The patches are created so as to modify the source files located in either the povray-3.6.1/ directory or the megapov-1.2.1/ directory (otherwise, see below). The following details the installation instructions relative to the POV-Ray patches; for the MegaPOV patches, replace the directory or file names where appropriate.

Each patch is applied individually and in any order, as follows:

  1. Go to the parent directory of the povray-3.6.1/ directory.
  2. If you already applied a previous version of the patch, you must unpatch the POV-Ray source files with the old patch first; for instance:
    # unpatch the povray-3.6.1/ sources with the old patch (here version 0.5.0)
    bzcat povray-3.6.1-fb-0.5.0.diff.bz2 | patch -p0 -f -R
  3. Patch the POV-Ray source files; for instance:
    # patch the povray-3.6.1/ sources with version 0.7.1
    bzcat povray-3.6.1-fb-0.7.1.diff.bz2 | patch -p0 -f

In case the POV-Ray source files are not located in the expected povray-3.6.1/ directory, one can do instead:

# go to the alternate source directory and strip the
# first directory in the patch filenames with -p1
cd povray-to-patch/
bzcat povray-3.6.1-fb-0.7.1.diff.bz2 | patch -p1 -f

Refer to the patch(1) manual for additional options.

Note: There might be a few warnings about rejected patches for the bootstrap file, depending on whether you applied other patches first; those can be ignored. If you face rejected patches (typically reported as "FAILED") for other files, something goes wrong; try patching again a clean source distribution.

Building the patched POV-Ray / MegaPOV sources

Once all desired patches are applied, the sources must be bootstrapped, configured and built again. The bootstrapping step adapts the build system to the changes in the source tree: it regenerates the configure script and all of the Makefile.in files.

Note: Bootstrapping the POV-Ray or MegaPOV sources requires having the GNU autotools installed, i.e. autoconf and automake. POV-Ray 3.6.1 requires at least autoconf 2.57 and automake 1.7. MegaPOV 1.2.1 requires at least autoconf 2.59 and automake 1.9.

Build the new binary as follows:

  1. Go to the povray-3.6.1/ directory.
  2. Run the bootstrap script:
  3. Run the configure script, build the program and run a test render:
    ./configure && make check

Installing the binary

Installing the program as explained in the POV-Ray INSTALL file is recommanded if you intend to use the patches as a permanent replacement to the original povray executable. Basically, it is only a matter of doing:
make install

Otherwise, one can follow the steps 3. and 4. for the installation of the PC-Linux binaries.