2011-03-29 12:31:16 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Tiff2png < Formula
|
|
|
|
homepage 'http://www.libpng.org/pub/png/apps/tiff2png.html'
|
2012-05-05 19:34:44 +00:00
|
|
|
url 'ftp://ftp.simplesystems.org/pub/libpng/png/applications/tiff2png/tiff2png-0.91.tar.gz'
|
2011-03-29 12:31:16 +00:00
|
|
|
md5 'b5db7add863c5cf469197aa327c0b202'
|
|
|
|
|
2012-06-07 01:35:12 +00:00
|
|
|
depends_on :x11
|
2011-03-29 12:31:16 +00:00
|
|
|
depends_on 'libtiff'
|
|
|
|
depends_on 'jpeg'
|
|
|
|
|
2011-12-28 19:29:31 +00:00
|
|
|
# libpng 1.5 no longer #includes zlib.h
|
2012-05-05 19:34:44 +00:00
|
|
|
def patches; DATA; end
|
2011-12-28 19:29:31 +00:00
|
|
|
|
2011-03-29 12:31:16 +00:00
|
|
|
def install
|
2012-05-05 19:34:44 +00:00
|
|
|
system "make", "-f", "Makefile.unx", "CC=#{ENV.cc}",
|
|
|
|
"OPTIMFLAGS=#{ENV.cflags}",
|
|
|
|
"LIBTIFF=#{HOMEBREW_PREFIX}/lib",
|
|
|
|
"TIFFINC=#{HOMEBREW_PREFIX}/include",
|
|
|
|
"LIBJPEG=#{HOMEBREW_PREFIX}/lib",
|
2012-08-06 05:33:36 +00:00
|
|
|
"LIBPNG=#{MacOS::X11.lib}",
|
|
|
|
"PNGINC=#{MacOS::X11.include}",
|
2012-05-05 19:34:44 +00:00
|
|
|
"ZLIB=/usr/lib",
|
|
|
|
"DEBUGFLAGS="
|
2011-03-29 12:31:16 +00:00
|
|
|
bin.install 'tiff2png'
|
|
|
|
end
|
|
|
|
end
|
2011-12-28 19:29:31 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/tiff2png.c b/tiff2png.c
|
|
|
|
index 6a06571..f903c0c 100644
|
|
|
|
--- a/tiff2png.c
|
|
|
|
+++ b/tiff2png.c
|
|
|
|
@@ -87,6 +87,7 @@
|
|
|
|
# include "tiffcomp.h" /* not installed by default */
|
|
|
|
#endif
|
|
|
|
#include "png.h"
|
|
|
|
+#include "zlib.h"
|
|
|
|
|
|
|
|
#ifdef _MSC_VER /* works for MSVC 5.0; need finer tuning? */
|
|
|
|
# define strcasecmp _stricmp
|
|
|
|
|