aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorChad Remesch2011-09-01 22:56:59 -0400
committerAdam Vandenberg2011-09-02 09:53:25 -0700
commitd38568db141d1f2ebfe377cf39a80541afe86434 (patch)
tree03ba9bf21879df8c79923cf4cb96024c88e467bd /Library/Formula
parentf52fea0140e91435a84b208b588eea793ca8b099 (diff)
downloadhomebrew-d38568db141d1f2ebfe377cf39a80541afe86434.tar.bz2
pngnq: fix compilation on Lion
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/pngnq.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/Library/Formula/pngnq.rb b/Library/Formula/pngnq.rb
index e1fb8b7e4..e1640a9b5 100644
--- a/Library/Formula/pngnq.rb
+++ b/Library/Formula/pngnq.rb
@@ -7,6 +7,14 @@ class Pngnq < Formula
depends_on 'pkg-config' => :build
+ # Fixes compilation on OSX Lion
+ # png.h on Lion does not, in fact, include zlib.h
+ # See: http://sourceforge.net/tracker/?func=detail&aid=3353513&group_id=213072&atid=1024252
+ # See: http://sourceforge.net/tracker/?func=detail&aid=3402960&group_id=213072&atid=1024252
+ def patches
+ DATA
+ end
+
def install
ENV.x11 # for libpng
system "./configure", "--disable-dependency-tracking",
@@ -14,3 +22,18 @@ class Pngnq < Formula
system "make install"
end
end
+
+
+__END__
+diff --git a/src/rwpng.c b/src/rwpng.c
+index aaa21fc..5324afe 100644
+--- a/src/rwpng.c
++++ b/src/rwpng.c
+@@ -31,6 +31,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <zlib.h>
+
+ #include "png.h" /* libpng header; includes zlib.h */
+ #include "rwpng.h" /* typedefs, common macros, public prototypes */