2010-01-04 08:20:59 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pngnq < Formula
|
2010-01-04 08:20:59 +00:00
|
|
|
homepage 'http://pngnq.sourceforge.net/'
|
2013-01-28 05:42:07 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/pngnq/pngnq/1.1/pngnq-1.1.tar.gz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '6a43dc046171eee56ac2d91cebb93aecde24d26a'
|
2011-09-02 01:59:45 +00:00
|
|
|
|
|
|
|
depends_on 'pkg-config' => :build
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :libpng
|
2010-01-04 08:20:59 +00:00
|
|
|
|
2011-09-02 02:56:59 +00:00
|
|
|
# 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
|
|
|
|
|
2010-01-04 08:20:59 +00:00
|
|
|
def install
|
2011-09-02 01:59:45 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2010-01-04 08:20:59 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-09-02 02:56:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
__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 */
|