diff options
| author | Mike McQuaid | 2012-09-02 01:03:05 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2012-09-04 19:44:41 -0700 |
| commit | a653b744e19d2dac1b27d4d9442ae33c6601ba30 (patch) | |
| tree | 7962dd7cc384410833e9c237dd2b5d055cae4eb2 /Library/Formula | |
| parent | 9e7c115bb77d39e06348357d424861042613da23 (diff) | |
| download | homebrew-a653b744e19d2dac1b27d4d9442ae33c6601ba30.tar.bz2 | |
fontforge: fix caveats and X11 dependency.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/fontforge.rb | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb index d523f3b43..671425842 100644 --- a/Library/Formula/fontforge.rb +++ b/Library/Formula/fontforge.rb @@ -7,15 +7,19 @@ class Fontforge < Formula head 'https://github.com/fontforge/fontforge.git' - depends_on 'pkg-config' => :build + option 'without-python', 'Build without Python' + 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 'pango' - depends_on 'potrace' - depends_on 'libspiro' - depends_on :x11 depends_on :xcode # Because: #include </Developer/Headers/FlatCarbon/Files.h> - option 'without-python', 'Build without Python' + depends_on :x11 if build.include? "with-x" + depends_on 'cairo' if build.include? "with-cairo" + depends_on 'pango' if build.include? "with-pango" + depends_on 'libspiro' if build.include? "with-libspiro" fails_with :llvm do build 2336 @@ -54,6 +58,9 @@ class Fontforge < Formula # 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" + system "./configure", *args # Fix hard-coded install locations that don't respect the target bindir @@ -88,8 +95,12 @@ class Fontforge < Formula "python" + `python -c 'import sys;print(sys.version[:3])'`.strip end + def test + system "#{bin}/fontforge", "-version" + end + def caveats - general_caveats = <<-EOS.undent + x_caveats = <<-EOS.undent fontforge is an X11 application. To install the Mac OS X wrapper application run: @@ -105,7 +116,8 @@ class Fontforge < Formula export PYTHONPATH=#{HOMEBREW_PREFIX}/lib/#{which_python}/site-packages:$PYTHONPATH EOS - s = general_caveats + s = "" + s += x_caveats if build.include? "with-x" s += python_caveats unless build.include? "without-python" return s end |
