之前的主题
http://www.v2ex.com/t/31305
因为现在错误提示不在是GCC not found了,那个主题有点误导,重新开一个帖子,可以的吧 ><
很多人brew install fontforge --use-gcc这样就可以搞定
我尝试了 --use-gcc --use-clang 以及不添加参数,都会出现
Error: Failed executing: make (fontforge.rb:38)
其它信息:
gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
已安装xcode,command line tools for xcode,cairo也按照网上的建议 重新用--use-clang参数安装过
另附上fontforge.rb文件
1 require 'formula'
2
3 class Fontforge < Formula
4 url 'http://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full- 20110222.tar.bz2'
5 head 'git://fontforge.git.sourceforge.net/gitroot/fontforge/fontforge'
6 homepage 'http://fontforge.sourceforge.net'
7 md5 '5be4dda345b5d73a27cc399df96e463a'
8
9 depends_on 'pkg-config' => :build
10 depends_on 'gettext'
11 depends_on 'pango'
12 depends_on 'potrace'
13
14 def options
15 [['--without-python', 'Build without Python.']]
16 end
17
18 fails_with :llvm do
19 build 2336
20 cause "Compiling cvexportdlg.c fails with error: initializer element is not constant"
21 end
22
23 def install
24 args = ["--prefix=#{prefix}", "--enable-double", "--without-freetype-bytecode"]
25 args << "--without-python" if ARGV.include? "--without-python"
26
27 ENV.x11
28 # Fix linker error; see:
http://trac.macports.org/ticket/25012
29 ENV.append "LDFLAGS", "-lintl"
30 system "./configure", *args
31
32 # Fix hard-coded install locations that don't respect the target bindir
33 inreplace "Makefile" do |s|
34 s.gsub! "/Applications", "$(prefix)"
35 s.gsub! "ln -s /usr/local/bin/fontforge", "ln -s $(bindir)/fontforge"
36 end
37
38 system "make"
39 system "make install"
40 end
41
42 def caveats; <<-EOS.undent
43 fontforge is an X11 application.
44
45 To install the Mac OS X wrapper application run:
46 brew linkapps
47 or:
48 ln -s #{prefix}/FontForge.app /Applications
49 EOS
50 end
51 end