aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorShaun Jackman2014-02-19 15:12:09 -0800
committerMike McQuaid2014-02-21 11:04:51 +0000
commit09c255c0f928b2443b08ef57b69334517c1d67d9 (patch)
tree46f506c8f33025aa553b179bc12c5c49f475e3fc /Library/Formula
parent7a877267f71c8072234d5b08f7502bee519dec16 (diff)
downloadhomebrew-09c255c0f928b2443b08ef57b69334517c1d67d9.tar.bz2
gd: Add optional dependency on fontconfig
Closes #26848. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/gd.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Formula/gd.rb b/Library/Formula/gd.rb
index 5506bbc43..5f2775b11 100644
--- a/Library/Formula/gd.rb
+++ b/Library/Formula/gd.rb
@@ -11,6 +11,7 @@ class Gd < Formula
depends_on :libpng => :recommended
depends_on 'jpeg' => :recommended
+ depends_on :fontconfig => :optional
depends_on :freetype => :optional
depends_on 'libtiff' => :optional
depends_on 'libvpx' => :optional
@@ -24,6 +25,10 @@ class Gd < Formula
MacOS.version >= :mountain_lion ? HOMEBREW_PREFIX/"opt/libpng" : MacOS::X11.prefix
end
+ def fontconfig_prefix
+ MacOS.version >= :mountain_lion ? HOMEBREW_PREFIX/"opt/fontconfig" : MacOS::X11.prefix
+ end
+
def freetype_prefix
MacOS.version >= :mountain_lion ? HOMEBREW_PREFIX/"opt/freetype" : MacOS::X11.prefix
end
@@ -38,6 +43,12 @@ class Gd < Formula
args << "--without-png"
end
+ if build.with? "fontconfig"
+ args << "--with-fontconfig=#{fontconfig_prefix}"
+ else
+ args << "--without-fontconfig"
+ end
+
if build.with? "freetype"
args << "--with-freetype=#{freetype_prefix}"
else