2010-07-02 18:02:12 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Openjpeg < Formula
|
2010-07-02 18:02:12 +00:00
|
|
|
homepage 'http://www.openjpeg.org/'
|
2011-05-04 04:27:00 +00:00
|
|
|
url 'http://openjpeg.googlecode.com/files/openjpeg_v1_4_sources_r697.tgz'
|
|
|
|
version '1.4'
|
|
|
|
md5 '7870bb84e810dec63fcf3b712ebb93db'
|
|
|
|
|
|
|
|
head 'http://openjpeg.googlecode.com/svn/trunk/'
|
2010-07-02 18:02:12 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'cmake' => :build
|
2011-05-04 04:27:00 +00:00
|
|
|
depends_on 'little-cms' => :optional
|
2010-07-02 18:02:12 +00:00
|
|
|
depends_on 'libtiff'
|
|
|
|
|
2011-11-28 23:35:55 +00:00
|
|
|
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
|
2012-01-30 10:35:24 +00:00
|
|
|
DATA unless ARGV.build_head?
|
2011-11-28 23:35:55 +00:00
|
|
|
end
|
|
|
|
|
2010-07-02 18:02:12 +00:00
|
|
|
def install
|
|
|
|
system "cmake . #{std_cmake_parameters}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2011-11-28 23:35:55 +00:00
|
|
|
|
|
|
|
__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 */
|
|
|
|
|
|
|
|
|