diff options
| author | Dominyk Tiller | 2014-09-24 16:02:30 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-09-29 18:09:47 -0700 |
| commit | 7f72f6e2d540236214d8165784b896654883bd7e (patch) | |
| tree | 43e90b4987e6068f551ede9afcfa3d7bc68eb430 /Library/Formula | |
| parent | 00e2992b8ff8dfaddb082d7a5769d265d5d2fd3b (diff) | |
| download | homebrew-7f72f6e2d540236214d8165784b896654883bd7e.tar.bz2 | |
fontforge 2.0.20140101
Fontforge version bump, homepage change to reflect the new page, and
culled out all the patches which have been merged upstream in this
release, and shuffled the dependencies about as required, and I’ve made
the X11 build recommended the default with an option to override
because upstream recommend building an app bundle now. Added double
quotes everywhere.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/fontforge.rb | 137 | ||||
| -rw-r--r-- | Library/Formula/lilypond.rb | 54 | ||||
| -rw-r--r-- | Library/Formula/pdf2htmlex.rb | 87 |
3 files changed, 148 insertions, 130 deletions
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb index 55f7daa5a..26b6dff86 100644 --- a/Library/Formula/fontforge.rb +++ b/Library/Formula/fontforge.rb @@ -1,22 +1,14 @@ -require 'formula' +require "formula" class Fontforge < Formula - homepage 'http://fontforge.org/' - revision 1 + homepage "https://fontforge.github.io" stable do - url 'https://downloads.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-20120731-b.tar.bz2' - sha1 'b520f532b48e557c177dffa29120225066cc4e84' + url "https://github.com/fontforge/fontforge/archive/2.0.20140101.tar.gz" + sha1 "abce297e53e8b6ff6f08871e53d1eb0be5ab82e7" - depends_on 'cairo' => :optional - depends_on 'pango' => :optional + depends_on "cairo" => :optional depends_on :python => :optional - - # Fixes double defined AnchorPoint on Mountain Lion 10.8.2 - patch do - url "https://gist.githubusercontent.com/rubenfonseca/5078149/raw/98a812df4e8c50d5a639877bc2d241e5689f1a14/fontforge" - sha1 "baa7d60f4c6e672180e66438ee675b4ee0fda5ce" - end end bottle do @@ -26,33 +18,32 @@ class Fontforge < Formula end head do - url 'https://github.com/fontforge/fontforge.git' - - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build - depends_on 'pkg-config' => :build - depends_on 'glib' - depends_on 'pango' - depends_on 'cairo' - depends_on 'ossp-uuid' - depends_on 'zeromq' - depends_on 'czmq' + url "https://github.com/fontforge/fontforge.git" + + depends_on "zeromq" + depends_on "czmq" + depends_on "cairo" depends_on :python if MacOS.version <= :snow_leopard end option 'with-gif', 'Build with GIF support' - option 'with-x', 'Build with X11 support, including FontForge.app' - - depends_on 'gettext' - depends_on 'libpng' => :recommended - depends_on 'jpeg' => :recommended - depends_on 'libtiff' => :recommended - depends_on :x11 if build.with? 'x' - depends_on 'giflib' if build.with? 'gif' - depends_on 'libspiro' => :optional - depends_on 'czmq'=> :optional - depends_on 'fontconfig' + option 'with-x', 'Build with X11 support, building the app bundle' + option 'with-python', 'Build with Python extensions and scripting' + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "pkg-config" => :build + depends_on "ossp-uuid" + depends_on "gettext" + depends_on "pango" + depends_on "libpng" => :recommended + depends_on "jpeg" => :recommended + depends_on "libtiff" => :recommended + depends_on :x11 if build.with? "x" + depends_on "giflib" if build.with? "gif" + depends_on "libspiro" => :optional + depends_on "fontconfig" fails_with :llvm do build 2336 @@ -60,73 +51,45 @@ class Fontforge < Formula end def install - args = ["--prefix=#{prefix}", - "--enable-double", - "--without-freetype-bytecode"] + args = ["--prefix=#{prefix}"] + args << "--with-x" if build.with? 'x' unless build.head? - # These are optional in the stable release, but required in head + # Cairo & Python are still optional in stable, but not in HEAD. args << "--without-cairo" if build.without? "cairo" - args << "--without-pango" if build.without? "pango" - end - args << "--without-x" if build.without? 'x' - - # To avoid "dlopen(/opt/local/lib/libpng.2.dylib, 1): image not found" - args << "--with-static-imagelibs" - - if build.with? 'python' - args << "--enable-pyextension" - # Fix linking to correct Python library - ENV.prepend "LDFLAGS", "-L#{%x(python-config --prefix).chomp}/lib" - else - args << "--without-python" + args << "--disable-python-extension" if build.without? "python" + args << "--disable-python-scripting" if build.without? "python" end # Fix linker error; see: http://trac.macports.org/ticket/25012 ENV.append "LDFLAGS", "-lintl" - # Add environment variables for system libs if building head - if build.head? - ENV.append "ZLIB_CFLAGS", "-I/usr/include" - ENV.append "ZLIB_LIBS", "-L/usr/lib -lz" + # Add environment variables for system libs + ENV.append "ZLIB_CFLAGS", "-I/usr/include" + ENV.append "ZLIB_LIBS", "-L/usr/lib -lz" + + # And finding Homebrew's Python + if build.with? "python" + ENV.append_path "PKG_CONFIG_PATH", "#{HOMEBREW_PREFIX}/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/" + ENV.prepend "LDFLAGS", "-L#{%x(python-config --prefix).chomp}/lib" end # Reset ARCHFLAGS to match how we build ENV["ARCHFLAGS"] = "-arch #{MacOS.preferred_arch}" - # Set up framework paths so FlatCarbon replacement paths work (see below) - ENV.append "CFLAGS", "-F#{MacOS.sdk_path}/System/Library/Frameworks/CoreServices.framework/Frameworks" - ENV.append "CFLAGS", "-F#{MacOS.sdk_path}/System/Library/Frameworks/Carbon.framework/Frameworks" - + system "./autogen.sh" if build.stable? system "./bootstrap" if build.head? system "./configure", *args - - # Fix hard-coded install locations that don't respect the target bindir - inreplace "Makefile" do |s| - s.gsub! "/Applications", "$(prefix)" - s.gsub! "ln -s /usr/local/bin/fontforge", "ln -s $(bindir)/fontforge" - end - - # Fix install location of Python extension; see: - # http://sourceforge.net/mailarchive/message.php?msg_id=26827938 - inreplace "Makefile" do |s| - s.gsub! "python setup.py install --prefix=$(prefix) --root=$(DESTDIR)", "python setup.py install --prefix=$(prefix)" - end - - # Replace FlatCarbon headers with the real paths - # Fixes building on 10.8 - # Only needed for non-head build - unless build.head? - inreplace %w(fontforge/macbinary.c fontforge/startui.c gutils/giomime.c) do |s| - s.gsub! "/Developer/Headers/FlatCarbon/Files.h", "CarbonCore/Files.h" - end - inreplace %w(fontforge/startui.c) do |s| - s.gsub! "/Developer/Headers/FlatCarbon/CarbonEvents.h", "HIToolbox/CarbonEvents.h" - end - end - system "make" - system "make install" + system "make", "install" + + # Fix the broken fontforge_package_name issue + # This is fixed in the HEAD build. + if build.stable? + mv "#{include}/fontforge_package_name", "#{include}/fontforge" + mv "#{share}/fontforge_package_name", "#{share}/fontforge" + mv "#{share}/doc/fontforge_package_name", "#{share}/doc/fontforge" + end end test do diff --git a/Library/Formula/lilypond.rb b/Library/Formula/lilypond.rb index 287125e14..9c557504c 100644 --- a/Library/Formula/lilypond.rb +++ b/Library/Formula/lilypond.rb @@ -1,20 +1,20 @@ require 'formula' class Lilypond < Formula - homepage 'http://lilypond.org/' - url 'http://download.linuxaudio.org/lilypond/sources/v2.18/lilypond-2.18.2.tar.gz' - sha1 '09d3a1e0e9fadeb8ef6e279227a2b30812c7ee9b' - revision 1 + homepage "http://lilypond.org/" + url "http://download.linuxaudio.org/lilypond/sources/v2.18/lilypond-2.18.2.tar.gz" + sha1 "09d3a1e0e9fadeb8ef6e279227a2b30812c7ee9b" + revision 2 devel do - url 'http://download.linuxaudio.org/lilypond/source/v2.19/lilypond-2.19.14.tar.gz' - sha1 'da96e4d300efa7b20c3e4e052f98e3db6ca24fd7' + url "http://download.linuxaudio.org/lilypond/source/v2.19/lilypond-2.19.14.tar.gz" + sha1 "da96e4d300efa7b20c3e4e052f98e3db6ca24fd7" end # LilyPond currently only builds with an older version of Guile (<1.9) - resource 'guile18' do - url 'http://ftpmirror.gnu.org/guile/guile-1.8.8.tar.gz' - sha1 '548d6927aeda332b117f8fc5e4e82c39a05704f9' + resource "guile18" do + url "http://ftpmirror.gnu.org/guile/guile-1.8.8.tar.gz" + sha1 "548d6927aeda332b117f8fc5e4e82c39a05704f9" end env :std @@ -24,36 +24,36 @@ class Lilypond < Formula # Dependencies for LilyPond depends_on :tex depends_on :x11 - depends_on 'pkg-config' => :build - depends_on 'gettext' - depends_on 'pango' - depends_on 'ghostscript' - depends_on 'mftrace' - depends_on 'fontforge' => ["with-x", "with-cairo"] - depends_on 'fondu' - depends_on 'texinfo' + depends_on "pkg-config" => :build + depends_on "gettext" + depends_on "pango" + depends_on "ghostscript" + depends_on "mftrace" + depends_on "fontforge" => ["with-x", "with-cairo"] + depends_on "fondu" + depends_on "texinfo" # Additional dependencies for guile1.8. depends_on :libtool - depends_on 'libffi' - depends_on 'libunistring' - depends_on 'bdw-gc' - depends_on 'gmp' - depends_on 'readline' + depends_on "libffi" + depends_on "libunistring" + depends_on "bdw-gc" + depends_on "gmp" + depends_on "readline" # Add dependency on keg-only Homebrew 'flex' because Apple bundles an older and incompatible # version of the library with 10.7 at least, seems slow keeping up with updates, # and the extra brew is tiny anyway. - depends_on 'flex' => :build + depends_on "flex" => :build # Assert documentation dependencies if requested. if build.with? "doc" - depends_on 'netpbm' - depends_on 'imagemagick' - depends_on 'docbook' + depends_on "netpbm" + depends_on "imagemagick" + depends_on "docbook" depends_on "dblatex" => [:python, "dbtexmf.dblatex"] depends_on :python if MacOS.version <= :snow_leopard - depends_on 'texi2html' + depends_on "texi2html" end fails_with :clang do diff --git a/Library/Formula/pdf2htmlex.rb b/Library/Formula/pdf2htmlex.rb index 60c70bf15..012160aa8 100644 --- a/Library/Formula/pdf2htmlex.rb +++ b/Library/Formula/pdf2htmlex.rb @@ -1,29 +1,84 @@ -require 'formula' +require "formula" class Pdf2htmlex < Formula - homepage 'http://coolwanglu.github.io/pdf2htmlEX/' - url 'https://github.com/coolwanglu/pdf2htmlEX/archive/v0.11.tar.gz' - sha256 'eca83144daf298b25c5b9bedb59d8e21ba65eb5e246d61f897447bc917ec0cba' + homepage "https://coolwanglu.github.io/pdf2htmlEX/" + url "https://github.com/coolwanglu/pdf2htmlEX/archive/v0.12.tar.gz" + sha256 "7868ff5cd69758d094fd6076e4d0888e5033bf8799a5355bf4470e91967147a8" - head 'https://github.com/coolwanglu/pdf2htmlEX.git' + head "https://github.com/coolwanglu/pdf2htmlEX.git" + + # Pdf2htmlex use an outdated, customised Fontforge installation. + # See https://github.com/coolwanglu/pdf2htmlEX/wiki/Building + resource "fontforge" do + url "https://github.com/coolwanglu/fontforge.git", :branch => "pdf2htmlEX" + end depends_on :macos => :lion - depends_on 'cmake' => :build - depends_on 'pkg-config' => :build - depends_on 'fontforge' - depends_on 'poppler' - depends_on 'ttfautohint' => :recommended if MacOS.version > :snow_leopard - - # Fix build with recent poppler - patch do - url "https://github.com/coolwanglu/pdf2htmlEX/commit/c0371a07a678bebf2e6991c94eb245ec1c3f95cf.diff" - sha1 "5bbc19ff74955c2f81f858432f4f97c37a0dbc26" + depends_on "cmake" => :build + depends_on "pkg-config" => :build + depends_on "poppler" + depends_on "gnu-getopt" + depends_on "ttfautohint" => :recommended if MacOS.version > :snow_leopard + + # Fontforge dependencies + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + depends_on "glib" + depends_on "pango" + depends_on "gettext" + depends_on "libpng" => :recommended + depends_on "jpeg" => :recommended + depends_on "libtiff" => :recommended + + # And failures + fails_with :llvm do + build 2336 + cause "Compiling cvexportdlg.c fails with error: initializer element is not constant" end def install + resource("fontforge").stage do + args = ["--prefix=#{prefix}/fontforge", + "--without-libzmq", + "--without-x", + "--without-iconv", + "--disable-python-scripting", + "--disable-python-extension", + ] + + # Fix linker error; see: http://trac.macports.org/ticket/25012 + ENV.append "LDFLAGS", "-lintl" + + # And fix the zlib hunting. + ENV.append "ZLIB_CFLAGS", "-I/usr/include" + ENV.append "ZLIB_LIBS", "-L/usr/lib -lz" + + # Reset ARCHFLAGS to match how we build + ENV["ARCHFLAGS"] = "-arch #{MacOS.preferred_arch}" + + system "./autogen.sh" + system "./configure", *args + + # Fix hard-coded install locations that don't respect the target bindir + inreplace "Makefile", "/Applications", "$(prefix)" + + system "make" + system "make", "install" + + # Fix breaking zlib pkg-config file issue. + inreplace "#{prefix}/fontforge/lib/pkgconfig/libfontforge.pc", "zlib", " " + + # Fix breaking zlib pkg-config file issue number 2. + inreplace "#{prefix}/fontforge/lib/pkgconfig/libfontforgeexe.pc", "zlib", " " + end + + # Prepend the paths to always find this dep fontforge instead of another. + ENV.prepend_path "PKG_CONFIG_PATH", "#{prefix}/fontforge/lib/pkgconfig" + ENV.prepend_path "PATH", "#{prefix}/fontforge/bin" system "cmake", ".", *std_cmake_args system "make" - system "make install" + system "make", "install" end test do |
