forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimagemagick-ruby186.rb
More file actions
64 lines (50 loc) · 1.99 KB
/
imagemagick-ruby186.rb
File metadata and controls
64 lines (50 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Ruby 1.8.6 requires a special version of imagemagick
# We simply revived an earlier version and added the suffix.
# https://github.com/mxcl/homebrew/blob/685dbff9301c215ac6f7ca775bbe8eed2bf62662/Library/Formula/imagemagick.rb
require 'formula'
# some credit to http://github.com/maddox/magick-installer
# NOTE please be aware that the GraphicsMagick formula derives this formula
class ImagemagickRuby186 < Formula
homepage 'http://www.imagemagick.org'
url 'http://image_magick.veidrodis.com/image_magick/ImageMagick-6.5.9-8.tar.bz2'
sha1 'bb292ff860cebf76bfed9df68289abb76d408e34'
option 'with-ghostcript', 'Enable-ghostscript support'
depends_on 'jpeg'
depends_on 'libwmf' => :optional
depends_on 'libtiff' => :optional
depends_on 'little-cms' => :optional
depends_on 'jasper' => :optional
depends_on 'ghostscript' => :recommended
depends_on :libpng
skip_clean :la
def fix_configure
# versioned stuff in main tree is pointless for us
inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}'
end
def configure_args
args = ["--prefix=#{prefix}",
"--disable-dependency-tracking",
"--enable-shared",
"--disable-static",
"--with-modules",
"--without-magick-plus-plus"]
args << "--disable-openmp" if MacOS.version < 10.6 # libgomp unavailable
args << '--without-ghostscript' \
<< "--with-gs-font-dir=#{HOMEBREW_PREFIX}/share/ghostscript/fonts" \
unless build.with? "ghostscript"
return args
end
def install
ENV.deparallelize
fix_configure
system "./configure", "--without-maximum-compile-warnings",
"--disable-osx-universal-binary",
"--without-perl", # I couldn't make this compile
*configure_args
system "make install"
# We already copy these into the keg root
(share+"ImageMagick/NEWS.txt").unlink
(share+"ImageMagick/LICENSE").unlink
(share+"ImageMagick/ChangeLog").unlink
end
end