aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/fontforge.rb29
1 files changed, 10 insertions, 19 deletions
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb
index 7abb304d8..3623629c1 100644
--- a/Library/Formula/fontforge.rb
+++ b/Library/Formula/fontforge.rb
@@ -31,16 +31,6 @@ class Fontforge < Formula
end
def install
- # Reason: Designed for the 10.7 SDK because it uses FlatCarbon.
- # MACOSX_DEPLOYMENT_TARGET fixes ensuing Python 10.7 vs 10.8 clash.
- # Discussed: https://github.com/mxcl/homebrew/pull/14097
- # Reported: Not yet.
- if MacOS.version >= :mountain_lion
- ENV.macosxsdk("10.7")
- ENV.append "CFLAGS", "-isysroot #{MacOS.sdk_path(10.7)}"
- ENV["MACOSX_DEPLOYMENT_TARGET"] = "10.8"
- end
-
args = ["--prefix=#{prefix}",
"--enable-double",
"--without-freetype-bytecode"]
@@ -62,6 +52,10 @@ class Fontforge < Formula
# Reset ARCHFLAGS to match how we build
ENV["ARCHFLAGS"] = MacOS.prefer_64_bit? ? "-arch x86_64" : "-arch i386"
+ # Set up framework paths so FlatCarbon replacement paths work (see below)
+ ENV.append "CFLAGS", "-F/System/Library/Frameworks/CoreServices.framework/Frameworks"
+ ENV.append "CFLAGS", "-F/System/Library/Frameworks/Carbon.framework/Frameworks"
+
args << "--without-cairo" unless build.with? "cairo"
args << "--without-pango" unless build.with? "pango"
@@ -79,16 +73,13 @@ class Fontforge < Formula
s.gsub! "python setup.py install --prefix=$(prefix) --root=$(DESTDIR)", "python setup.py install --prefix=$(prefix)"
end
- # Fix hard-coded include file paths. Reported usptream:
- # http://sourceforge.net/mailarchive/forum.php?thread_name=C1A32103-A62D-468B-AD8A-A8E0E7126AA5%40smparkes.net&forum_name=fontforge-devel
- # https://trac.macports.org/ticket/33284
- if MacOS::Xcode.version >= '4.4'
- header_prefix = "#{MacOS.sdk_path(10.7)}/Developer"
- else
- header_prefix = MacOS::Xcode.prefix
- end
+ # Replace FlatCarbon headers with the real paths
+ # Fixes building on 10.8
inreplace %w(fontforge/macbinary.c fontforge/startui.c gutils/giomime.c) do |s|
- s.gsub! "/Developer", header_prefix
+ s.gsub! "/Developer/Headers/FlatCarbon/Files.h", "CarbonCore/Files.h"
+ end
+ inreplace %w(fontforge/startui.c) do |s|
+ s.gsub! "/Developer/Headers/FlatCarbon/CarbonEvents.h", "HIToolbox/CarbonEvents.h"
end
system "make"