fontforge: fix carbon header paths, close Homebrew/homebrew#10572

Signed-off-by: Adam Vandenberg <flangy@gmail.com>

Find the developer prefix and use that, like MaPorts
- @adamv
This commit is contained in:
Sorin Ionescu 2012-03-05 22:57:10 -05:00 committed by Adam Vandenberg
parent 30720063f1
commit 689c50637e

View file

@ -1,11 +1,12 @@
require 'formula'
class Fontforge < Formula
url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20110222.tar.bz2'
head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
homepage 'http://fontforge.sourceforge.net'
url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20110222.tar.bz2'
md5 '5be4dda345b5d73a27cc399df96e463a'
head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
depends_on 'pkg-config' => :build
depends_on 'gettext'
depends_on 'pango'
@ -21,7 +22,10 @@ class Fontforge < Formula
end
def install
args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
args = ["--prefix=#{prefix}",
"--enable-double",
"--without-freetype-bytecode"]
args << "--without-python" if ARGV.include? "--without-python"
ENV.x11
@ -35,6 +39,14 @@ class Fontforge < Formula
s.gsub! "ln -s /usr/local/bin/fontforge", "ln -s $(bindir)/fontforge"
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
header_prefix = MacOS.xcode_prefix
inreplace %w(fontforge/macbinary.c fontforge/startui.c gutils/giomime.c) do |s|
s.gsub! "/Developer", header_prefix
end
system "make"
system "make install"
end