libplot: make use of libpng 1.5 compatible

Lion now includes libpng 1.5, which causes a "dereferencing pointer to
incomplete type" error when png_ptr->jmpbuf is accessed directly. Adding an
inreplace to change occurences of 'png_ptr->jmpbuf' to 'png_jmpbuf (png_ptr)' in
the file libplot/z_write.c fixes the build on Lion, and should have no effect on
Snow Leopard since the png_jmpbuf function has been present for several
versions.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Daniel Holtmann-Rice 2011-08-11 11:24:19 -04:00 committed by Adam Vandenberg
parent eced8b33fa
commit 943738a628

View file

@ -7,6 +7,10 @@ class Plotutils < Formula
def install
ENV.x11 # enable libpng support
# Fix usage of libpng to be 1.5 compatible
inreplace 'libplot/z_write.c', 'png_ptr->jmpbuf', 'png_jmpbuf (png_ptr)'
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-libplotter"