aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-02-02 17:52:43 -0600
committerJack Nagel2013-02-02 17:56:47 -0600
commit0b66ce0cfa95b9992fd739725c238d97d3fffc2d (patch)
tree757754d076f4353bf322335fa0b1a24fc0f59d7c
parent3bf3c7212460511cd5b83efc6919d2fa93dcf574 (diff)
downloadhomebrew-0b66ce0cfa95b9992fd739725c238d97d3fffc2d.tar.bz2
fontforge: use optional deps
-rw-r--r--Library/Formula/fontforge.rb25
1 files changed, 11 insertions, 14 deletions
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb
index c42e471e9..7abb304d8 100644
--- a/Library/Formula/fontforge.rb
+++ b/Library/Formula/fontforge.rb
@@ -12,9 +12,6 @@ class Fontforge < Formula
option 'without-python', 'Build without Python'
option 'with-gif', 'Build with GIF support'
option 'with-x', 'Build with X'
- option 'with-cairo', 'Build with Cairo'
- option 'with-pango', 'Build with Pango'
- option 'with-libspiro', 'Build with Spiro spline support'
depends_on 'gettext'
depends_on :xcode # Because: #include </Developer/Headers/FlatCarbon/Files.h>
@@ -22,11 +19,11 @@ class Fontforge < Formula
depends_on :libpng => :recommended
depends_on 'jpeg' => :recommended
depends_on 'libtiff' => :recommended
- depends_on :x11 if build.include? "with-x"
- depends_on 'giflib' if build.include? 'with-gif'
- depends_on 'cairo' if build.include? "with-cairo"
- depends_on 'pango' if build.include? "with-pango"
- depends_on 'libspiro' if build.include? "with-libspiro"
+ depends_on :x11 if build.with? 'x'
+ depends_on 'giflib' if build.with? 'gif'
+ depends_on 'cairo' => :optional
+ depends_on 'pango' => :optional
+ depends_on 'libspiro' => :optional
fails_with :llvm do
build 2336
@@ -48,7 +45,7 @@ class Fontforge < Formula
"--enable-double",
"--without-freetype-bytecode"]
- if build.include? "without-python"
+ if build.without? "python"
args << "--without-python"
else
python_prefix = `python-config --prefix`.strip
@@ -59,14 +56,14 @@ class Fontforge < Formula
end
# Fix linking to correct Python library
- ENV.prepend "LDFLAGS", "-L#{python_prefix}/lib" unless build.include? "without-python"
+ ENV.prepend "LDFLAGS", "-L#{python_prefix}/lib" unless build.without? "python"
# Fix linker error; see: http://trac.macports.org/ticket/25012
ENV.append "LDFLAGS", "-lintl"
# Reset ARCHFLAGS to match how we build
ENV["ARCHFLAGS"] = MacOS.prefer_64_bit? ? "-arch x86_64" : "-arch i386"
- args << "--without-cairo" unless build.include? "with-cairo"
- args << "--without-pango" unless build.include? "with-pango"
+ args << "--without-cairo" unless build.with? "cairo"
+ args << "--without-pango" unless build.with? "pango"
system "./configure", *args
@@ -124,8 +121,8 @@ class Fontforge < Formula
EOS
s = ""
- s += x_caveats if build.include? "with-x"
- s += python_caveats unless build.include? "without-python"
+ s += x_caveats if build.with? "x"
+ s += python_caveats unless build.without? "python"
return s
end
end