fontforge 20190317

Closes #38000.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Chongyu Zhu 2019-03-19 00:25:49 +08:00 committed by FX Coudert
parent e28c74e15e
commit 8c7285d8cc

View file

@ -1,9 +1,8 @@
class Fontforge < Formula class Fontforge < Formula
desc "Command-line outline and bitmap font editor/converter" desc "Command-line outline and bitmap font editor/converter"
homepage "https://fontforge.github.io" homepage "https://fontforge.github.io"
url "https://github.com/fontforge/fontforge/releases/download/20170731/fontforge-dist-20170731.tar.xz" url "https://github.com/fontforge/fontforge/releases/download/20190317/fontforge-20190317.tar.gz"
sha256 "840adefbedd1717e6b70b33ad1e7f2b116678fa6a3d52d45316793b9fd808822" sha256 "b711adec0da9ee490bbc2698b33e6630150931e08e826d1b63eb3131d85db8b5"
revision 4
bottle do bottle do
cellar :any cellar :any
@ -26,22 +25,10 @@ class Fontforge < Formula
depends_on "pango" depends_on "pango"
depends_on "python@2" depends_on "python@2"
# Remove for > 20170731
# Fix "fatal error: 'mem.h' file not found"
# Upstream PR from 22 Sep 2017 https://github.com/fontforge/fontforge/pull/3156
patch do
url "https://github.com/fontforge/fontforge/commit/9f69bd0f9.patch?full_index=1"
sha256 "f8afa9a6ab7a71650a3f013d9872881754e1ba4a265f693edd7ba70f2ec1d525"
end
def install def install
ENV["PYTHON_CFLAGS"] = `python-config --cflags`.chomp ENV["PYTHON_CFLAGS"] = `python-config --cflags`.chomp
ENV["PYTHON_LIBS"] = `python-config --ldflags`.chomp ENV["PYTHON_LIBS"] = `python-config --ldflags`.chomp
# Fix header includes to avoid crash at runtime:
# https://github.com/fontforge/fontforge/pull/3147
inreplace "fontforgeexe/startnoui.c", "#include \"fontforgevw.h\"", "#include \"fontforgevw.h\"\n#include \"encoding.h\""
system "./configure", "--prefix=#{prefix}", system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking", "--disable-dependency-tracking",
"--disable-silent-rules", "--disable-silent-rules",
@ -73,7 +60,8 @@ class Fontforge < Formula
test do test do
system bin/"fontforge", "-version" system bin/"fontforge", "-version"
system bin/"fontforge", "-lang=py", "-c", "import fontforge; fontforge.font()" system bin/"fontforge", "-lang=py", "-c", "import fontforge; fontforge.font()"
ENV.append_path "PYTHONPATH", lib/"python2.7/site-packages" xy = Language::Python.major_minor_version "python"
system "python2.7", "-c", "import fontforge; fontforge.font()" ENV.append_path "PYTHONPATH", lib/"python#{xy}/site-packages"
system "python", "-c", "import fontforge; fontforge.font()"
end end
end end