Skip to content

Commit

Permalink
fontforge: patch startnoui.c to fix includes
Browse files Browse the repository at this point in the history
This patch is required, otherwise fontforge won't work (cf. FontCustom/fontcustom#355), especially as Homebrew compiles with `--without-x` (which exercises the less-used no-UI code paths).
  • Loading branch information
jtanx committed Sep 10, 2017
1 parent 6cd1c3c commit f5a4ca3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Formula/fontforge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Fontforge < Formula
homepage "https://fontforge.github.io"
url "https://github.com/fontforge/fontforge/releases/download/20170731/fontforge-dist-20170731.tar.xz"
sha256 "840adefbedd1717e6b70b33ad1e7f2b116678fa6a3d52d45316793b9fd808822"
revision 1
revision 2

bottle do
sha256 "c5f796bec473c8e3a365c793b9c581725d516b2a63907ace8d0085e4de02a97d" => :sierra
Expand Down Expand Up @@ -47,6 +47,9 @@ def install
args << "--without-libspiro" if build.without? "libspiro"
args << "--without-libuninameslist" if build.without? "libuninameslist"

# 20170731: Fix header includes (fontforge/fontforge#3145)
inreplace "fontforgeexe/startnoui.c", "#include \"fontforgevw.h\"", "#include \"fontforgevw.h\"\n#include \"encoding.h\""

system "./configure", *args
system "make", "install"

Expand Down Expand Up @@ -75,7 +78,8 @@ def caveats; <<-EOS.undent

test do
system bin/"fontforge", "-version"
system bin/"fontforge", "-lang=py", "-c", "import fontforge; fontforge.font()"
ENV.append_path "PYTHONPATH", lib+"python2.7/site-packages"
system "python", "-c", "import fontforge"
system "python", "-c", "import fontforge; fontforge.font()"
end
end

0 comments on commit f5a4ca3

Please sign in to comment.