Skip to content

Instantly share code, notes, and snippets.

@eyliu

eyliu/grace.rb

Created Aug 31, 2011
Embed
What would you like to do?
Homebrew formula for grace
require 'formula'
class Grace < Formula
url 'ftp://plasma-gate.weizmann.ac.il/pub/grace/src/stable/grace-5.1.22.tar.gz'
homepage 'http://plasma-gate.weizmann.ac.il/Grace/'
md5 '672356466f18fe59ed21a8fb44f9851d'
depends_on 'lesstif'
def patches
{ :p0 => DATA }
end
def install
ENV.x11 # enable libpng support
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
def test
# this will fail we won't accept that, make it test the program works!
system "/usr/bin/false"
end
end
__END__
patch for libpng 1.5 as described by https://github.com/mxcl/homebrew/pull/6903
--- src/rstdrv.c.orig
+++ src/rstdrv.c
@@ -54,6 +54,7 @@
#ifdef HAVE_LIBPNG
# include <png.h>
+# include <zlib.h>
#endif
#ifndef NONE_GUI
@@ -885,7 +886,7 @@ static void rstImagePng(gdImagePtr ihandle, FILE *prstream)
return;
}
- if (setjmp(png_ptr->jmpbuf)) {
+ if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_write_struct(&png_ptr, &info_ptr);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment