Skip to content

Commit

Permalink
pillow: use zlib on Xcode-only systems
Browse files Browse the repository at this point in the history
  • Loading branch information
samueljohn committed Sep 27, 2012
1 parent 270898f commit f60261e
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions pillow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class Pillow < Formula
url 'https://github.com/python-imaging/Pillow/tarball/1.7.8'
sha1 '8da50546abec3d94640a97727ba416f90b3a14af'

depends_on 'python' # todo replace by :python in the future
#depends_on 'zlib'
depends_on 'littlecms'
depends_on 'little-cms'
depends_on 'graphicsmagick'

def install
Expand All @@ -19,19 +17,20 @@ def install

# Help pillow find zlib and little-cms
inreplace "setup.py" do |s|
s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{MacOS.sdk_path}/usr/lib', '#{MacOS.sdk_path}/usr/include')" unless MacOS::CLT.installed?
# s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{Formula.factory('zlib').opt_prefix}/lib', '#{Formula.factory('zlib').opt_prefix}/include')"
s.gsub! "LCMS_ROOT = None", "LCMS_ROOT = ('#{Formula.factory('littlecms').opt_prefix}/lib', '#{Formula.factory('littlecms').opt_prefix}/include')"
end

args = [
"--no-user-cfg",
"install",
"--force",
"--verbose",
"--single-version-externally-managed",
"--prefix=#{prefix}",
"--record=installed-files.txt"
]
args = [
"--no-user-cfg",
"install",
"--force",
"--verbose",
"--single-version-externally-managed",
"--prefix=#{prefix}",
"--record=installed-files.txt"
]

system "python", "setup.py", *args

Expand Down

0 comments on commit f60261e

Please sign in to comment.