PGPLOT PNG Driver Patch

Here you will find my PNG driver patch to PGPLOT.

Important Note

As of PGPLOT version 5.2.1, this PNG driver is included in the normal distribution. So you do not need the patch here for newer versions of PGPLOT. However, if you have 5.2.1 or 5.2.2, there is a change to the makemake in the distribution that will be required. Line 1028 of makemake (in 5.2.2, at least) is the following:
pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
This line should be commented out before running the makemake script. Additionally, if you're using the GNU compiler and linker, you may want to change the output makefile so that the following values are set:
PGPLOT_LIB=-L`pwd` -lpgplot
CPGPLOT_LIB=-L`pwd` -lcpgplot -lpgplot
SHARED_LIB_LIBS= -Wl,-Bstatic -L/usr/X11R6/lib -lX11 -lpng -lz -lg2c -Wl,-Bdynamic
This will cause libpng, libz and libg2c to be statically linked into libcpgplot, and makes linking of subsequent programs much simpler.

Features

Instructions

  1. Download the PNG driver patch to PGPLOT 5.2.0 here.
  2. After unpacking the PGPLOT sources, change into the resulting PGPLOT directory.
  3. Apply the patch:
    $ patch -p1 < ../pgplot-png.diff.3
    
  4. While selecting drivers from the drivers.list file, uncomment /PNG and /TPNG.
  5. After makemake creates the build makefile, manually edit it to include the following:
  6. Build PGPLOT as usual.

Notes

Contact

pratzlaff@cfa.harvard.edu

Valid HTML 4.0!