aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/pil.rb
diff options
context:
space:
mode:
authorGermán M. Bravo2012-10-20 08:43:57 -0500
committerAdam Vandenberg2012-10-27 19:03:38 -0700
commitdaa9c754fa3a3ad8c90f4a3afec77b9b6eeb0c67 (patch)
tree0364be5c2c63aa0eef6b384c160cfac23e6399b8 /Library/Formula/pil.rb
parent05547851c666cb73e22238a739697b5fcc61c153 (diff)
downloadhomebrew-daa9c754fa3a3ad8c90f4a3afec77b9b6eeb0c67.tar.bz2
pil: fix crash in 64-bit mode
Closes #15563. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/pil.rb')
-rw-r--r--Library/Formula/pil.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/Library/Formula/pil.rb b/Library/Formula/pil.rb
index 323e83ff5..e9865b1e7 100644
--- a/Library/Formula/pil.rb
+++ b/Library/Formula/pil.rb
@@ -1,15 +1,21 @@
require 'formula'
class Pil < Formula
- url 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz'
homepage 'http://www.pythonware.com/products/pil/'
+ url 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz'
sha1 '76c37504251171fda8da8e63ecb8bc42a69a5c81'
option 'with-little-cms', 'Compile with little-cms support.'
depends_on :freetype
depends_on 'jpeg' => :recommended
- depends_on 'little-cms' unless build.include? 'with-little-cms' # => :optional
+ depends_on 'little-cms'=> :optional unless build.include? 'with-little-cms'
+
+ # The patch is to fix a core dump in Bug in PIL's quantize() with 64 bit architectures.
+ # http://mail.python.org/pipermail/image-sig/2012-June/007047.html
+ def patches
+ DATA
+ end
def install
# Find the arch for the Python we are building against.
@@ -51,3 +57,16 @@ class Pil < Formula
EOS
end
end
+
+__END__
+--- a/libImaging/Quant.c
++++ b/libImaging/Quant.c
+@@ -914,7 +914,7 @@
+ unsigned long bestdist,bestmatch,dist;
+ unsigned long initialdist;
+ HashTable h2;
+- int pixelVal;
++ unsigned long pixelVal;
+
+ h2=hashtable_new(unshifted_pixel_hash,unshifted_pixel_cmp);
+ for (i=0;i<nPixels;i++) {