This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grace: fix compiliation against libpng 1.5
- Loading branch information
Showing
1 changed file
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,50 @@ | ||
require 'formula' | ||
|
||
class Grace < Formula | ||
url 'ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/grace-5.1.22.tar.gz' | ||
homepage 'http://plasma-gate.weizmann.ac.il/Grace/' | ||
md5 '672356466f18fe59ed21a8fb44f9851d' | ||
url 'ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/grace-5.1.22.tar.gz' | ||
sha1 '3ce88c7c264d2de73b8935f835a1c1f8e368c78f' | ||
|
||
depends_on 'pdflib-lite' | ||
depends_on 'jpeg' | ||
depends_on 'fftw' | ||
depends_on 'lesstif' | ||
|
||
# Upstream development has stopped, but we provide a minimal patch that | ||
# allows compilation against libpng 1.5. | ||
def patches | ||
DATA | ||
end | ||
|
||
def install | ||
ENV.x11 | ||
|
||
system "./configure", "--disable-debug", "--disable-dependency-tracking", | ||
"--prefix=#{prefix}", "--with-zlib", | ||
"--enable-grace-home=#{prefix}" | ||
system "./configure", "--disable-debug", | ||
"--disable-dependency-tracking", | ||
"--prefix=#{prefix}", | ||
"--with-zlib", | ||
"--enable-grace-home=#{prefix}" | ||
|
||
system "make install" | ||
end | ||
end | ||
|
||
__END__ | ||
--- a/src/rstdrv.c | ||
+++ b/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; | ||
} |