aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/leptonica.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2012-03-11 13:36:14 -0700
committerAdam Vandenberg2012-03-11 13:36:14 -0700
commita623697965c7a0b6540836a9906122384c3118e7 (patch)
treea1c4454c3cd28dd73fa0f5c82f3b03a2e08ad00e /Library/Formula/leptonica.rb
parent377eeeec1752b3218b15ac4352a917c8a46e97db (diff)
downloadhomebrew-a623697965c7a0b6540836a9906122384c3118e7.tar.bz2
Leptonica: inline patch
Diffstat (limited to 'Library/Formula/leptonica.rb')
-rw-r--r--Library/Formula/leptonica.rb29
1 files changed, 23 insertions, 6 deletions
diff --git a/Library/Formula/leptonica.rb b/Library/Formula/leptonica.rb
index 72e7518f7..62ab61959 100644
--- a/Library/Formula/leptonica.rb
+++ b/Library/Formula/leptonica.rb
@@ -1,23 +1,40 @@
require 'formula'
class Leptonica < Formula
- url 'http://www.leptonica.org/source/leptonica-1.68.tar.gz'
homepage 'http://www.leptonica.org/'
+ url 'http://www.leptonica.org/source/leptonica-1.68.tar.gz'
md5 '5cd7092f9ff2ca7e3f3e73bfcd556403'
depends_on 'jpeg'
depends_on 'libtiff'
+ # 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
- # Leptonica is missing an #include for PNG support
- # Can be removed in 1.69
- # http://code.google.com/p/leptonica/issues/detail?id=56
- "https://raw.github.com/gist/1320510/b11d417326344202d8ff03ede8151c147ec2598d/zlib-include.patch"
+ DATA
end
def install
ENV.x11
- system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
+ 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;