2010-01-22 05:12:17 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Fontforge < Formula
|
2011-03-02 01:41:56 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20110222.tar.bz2'
|
2011-03-15 19:38:31 +00:00
|
|
|
head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
|
2010-01-22 05:12:17 +00:00
|
|
|
homepage 'http://fontforge.sourceforge.net'
|
2011-03-02 01:41:56 +00:00
|
|
|
md5 '5be4dda345b5d73a27cc399df96e463a'
|
2010-01-22 05:12:17 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-01-22 05:12:17 +00:00
|
|
|
depends_on 'gettext'
|
|
|
|
depends_on 'pango'
|
|
|
|
depends_on 'potrace'
|
|
|
|
|
2011-06-13 22:06:03 +00:00
|
|
|
def options
|
|
|
|
[['--without-python', 'Build without Python.']]
|
|
|
|
end
|
|
|
|
|
2012-01-21 22:06:25 +00:00
|
|
|
fails_with_llvm "Compiling cvexportdlg.c fails with error: initializer element is not constant", :build => 2336
|
2011-03-13 18:13:53 +00:00
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2011-06-13 22:06:03 +00:00
|
|
|
args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
|
|
|
|
args << "--without-python" if ARGV.include? "--without-python"
|
|
|
|
|
2011-03-13 18:13:53 +00:00
|
|
|
ENV.x11
|
|
|
|
# Fix linker error; see: http://trac.macports.org/ticket/25012
|
|
|
|
ENV.append "LDFLAGS", "-lintl"
|
2011-06-13 22:06:03 +00:00
|
|
|
system "./configure", *args
|
2010-09-09 19:38:22 +00:00
|
|
|
|
2011-07-29 16:05:08 +00:00
|
|
|
# Fix hard-coded install locations that don't respect the target bindir
|
2010-09-09 19:38:22 +00:00
|
|
|
inreplace "Makefile" do |s|
|
|
|
|
s.gsub! "/Applications", "$(prefix)"
|
2011-07-29 16:05:08 +00:00
|
|
|
s.gsub! "ln -s /usr/local/bin/fontforge", "ln -s $(bindir)/fontforge"
|
2010-09-09 19:38:22 +00:00
|
|
|
end
|
|
|
|
|
2010-01-22 05:12:17 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
2010-09-09 19:38:22 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
fontforge is an X11 application.
|
|
|
|
|
|
|
|
To install the Mac OS X wrapper application run:
|
2011-04-04 23:56:47 +00:00
|
|
|
brew linkapps
|
2010-09-09 19:38:22 +00:00
|
|
|
or:
|
2011-07-29 16:05:08 +00:00
|
|
|
ln -s #{prefix}/FontForge.app /Applications
|
2010-09-09 19:38:22 +00:00
|
|
|
EOS
|
2010-01-22 05:12:17 +00:00
|
|
|
end
|
|
|
|
end
|