From 00ea9f46f0605f39d2eecce71d7f70f376526924 Mon Sep 17 00:00:00 2001 From: Daniel Holtmann-Rice Date: Thu, 11 Aug 2011 11:24:19 -0400 Subject: 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 --- Library/Formula/plotutils.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Formula') diff --git a/Library/Formula/plotutils.rb b/Library/Formula/plotutils.rb index d1c11c4df..57b7b2127 100644 --- a/Library/Formula/plotutils.rb +++ b/Library/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" -- cgit v1.2.3