From 943738a628638fb35d5751c67490b959efac9101 Mon Sep 17 00:00:00 2001 From: Daniel Holtmann-Rice Date: Thu, 11 Aug 2011 11:24:19 -0400 Subject: [PATCH] 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 --- Formula/plotutils.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Formula/plotutils.rb b/Formula/plotutils.rb index d1c11c4df6..57b7b21270 100644 --- a/Formula/plotutils.rb +++ b/Formula/plotutils.rb @@ -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"