943738a628
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>
20 lines
611 B
Ruby
20 lines
611 B
Ruby
require 'formula'
|
|
|
|
class Plotutils < Formula
|
|
url 'ftp://mirrors.kernel.org/gnu/plotutils/plotutils-2.6.tar.gz'
|
|
homepage 'http://www.gnu.org/software/plotutils/'
|
|
md5 'c08a424bd2438c80a786a7f4b5bb6a40'
|
|
|
|
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"
|
|
system "make"
|
|
system "make install"
|
|
end
|
|
end
|