leptonica: fix SHA1, test and X11 dependency.
This commit is contained in:
parent
95207a7b32
commit
ac1b448ace
1 changed files with 12 additions and 27 deletions
|
@ -2,39 +2,24 @@ require 'formula'
|
|||
|
||||
class Leptonica < Formula
|
||||
homepage 'http://www.leptonica.org/'
|
||||
url 'http://www.leptonica.org/source/leptonica-1.68.tar.gz'
|
||||
sha1 'a50563ac091f4195a5a3b4579c4fcc674b81c316'
|
||||
url 'http://www.leptonica.org/source/leptonica-1.69.tar.gz'
|
||||
sha1 '91199f99d2e78b15b76ffa6fc4e86ee458a330e8'
|
||||
|
||||
depends_on :x11
|
||||
depends_on 'jpeg'
|
||||
depends_on 'libtiff'
|
||||
option 'without-libpng', 'Build without PNG support'
|
||||
option 'without-jpeg', 'Build without JPEG support'
|
||||
option 'with-libtiff', 'Build with TIFF support'
|
||||
|
||||
# Leptonica is missing an #include for PNG support
|
||||
# Can be removed in 1.69
|
||||
# http://code.google.com/p/leptonica/issues/detail?id=56
|
||||
def patches
|
||||
DATA
|
||||
end
|
||||
depends_on :libpng unless build.include? "without-libpng"
|
||||
depends_on 'jpeg' => :recommended unless build.include? "without-jpeg"
|
||||
depends_on 'libtiff' => :optional if build.include? "with-libtiff"
|
||||
|
||||
def install
|
||||
system "./configure", "--disable-dependency-tracking",
|
||||
"--prefix=#{prefix}"
|
||||
system "make install"
|
||||
end
|
||||
end
|
||||
|
||||
__END__
|
||||
diff -Nurd -x'*~' leptonica-1.68.orig/src/pngio.c leptonica-1.68/src/pngio.c
|
||||
--- leptonica-1.68.orig/src/pngio.c 2011-02-01 00:41:12.000000000 -0500
|
||||
+++ leptonica-1.68/src/pngio.c 2011-07-09 09:17:17.000000000 -0400
|
||||
@@ -108,6 +108,10 @@
|
||||
|
||||
#include "png.h"
|
||||
|
||||
+#ifdef HAVE_LIBZ
|
||||
+#include "zlib.h"
|
||||
+#endif
|
||||
+
|
||||
/* ----------------Set defaults for read/write options ----------------- */
|
||||
/* strip 16 bpp --> 8 bpp on reading png; default is for stripping */
|
||||
static l_int32 var_PNG_STRIP_16_TO_8 = 1;
|
||||
def test
|
||||
system "#{bin}/yuvtest"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue