aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Formula/openjpeg.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/Library/Formula/openjpeg.rb b/Library/Formula/openjpeg.rb
index 5444cd65b..5eaa917cb 100644
--- a/Library/Formula/openjpeg.rb
+++ b/Library/Formula/openjpeg.rb
@@ -12,8 +12,29 @@ class Openjpeg < Formula
depends_on 'little-cms' => :optional
depends_on 'libtiff'
+ def patches
+ # libpng 1.5 no longer #includes zlib.h, so add it to the relevant file
+ # see http://code.google.com/p/openjpeg/issues/detail?id=83
+ DATA
+ end
+
def install
system "cmake . #{std_cmake_parameters}"
system "make install"
end
end
+
+__END__
+diff --git a/codec/convert.c b/codec/convert.c
+index 25e715b..2d96971 100644
+--- a/codec/convert.c
++++ b/codec/convert.c
+@@ -48,6 +48,7 @@
+ #include "../libs/png/png.h"
+ #else
+ #include <png.h>
++#include <zlib.h>
+ #endif /* _WIN32 */
+ #endif /* HAVE_LIBPNG */
+
+