2010-01-22 05:07:14 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pango < Formula
|
2010-01-22 05:07:14 +00:00
|
|
|
homepage 'http://www.pango.org/'
|
2012-04-21 18:08:20 +00:00
|
|
|
url 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.0.tar.xz'
|
|
|
|
sha256 '7c6d2ab024affaed0e942f9279b818235f9c6a36d9fc50688f48d387f4102dff'
|
2012-01-23 01:49:46 +00:00
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2010-03-25 03:17:25 +00:00
|
|
|
depends_on 'glib'
|
2010-01-22 05:07:14 +00:00
|
|
|
|
2011-04-08 18:16:37 +00:00
|
|
|
if MacOS.leopard?
|
2010-04-24 18:15:13 +00:00
|
|
|
depends_on 'fontconfig' # Leopard's fontconfig is too old.
|
|
|
|
depends_on 'cairo' # Leopard doesn't come with Cairo.
|
2011-09-09 01:17:43 +00:00
|
|
|
elsif MacOS.lion?
|
2011-12-25 05:53:36 +00:00
|
|
|
# The Cairo library shipped with Lion contains a flaw that causes Graphviz
|
|
|
|
# to segfault. See the following ticket for information:
|
|
|
|
#
|
|
|
|
# https://trac.macports.org/ticket/30370
|
|
|
|
depends_on 'cairo'
|
2010-04-24 18:15:13 +00:00
|
|
|
end
|
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Undefined symbols when linking"
|
|
|
|
end
|
2012-02-08 01:30:08 +00:00
|
|
|
|
2010-01-22 05:07:14 +00:00
|
|
|
def install
|
2011-12-02 19:13:20 +00:00
|
|
|
ENV.x11
|
2012-02-08 23:58:48 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--disable-debug",
|
2011-09-22 23:13:52 +00:00
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--enable-man",
|
|
|
|
"--with-x",
|
2012-02-08 23:58:48 +00:00
|
|
|
"--with-html-dir=#{share}/doc",
|
|
|
|
"--disable-introspection"
|
2011-09-22 23:13:52 +00:00
|
|
|
system "make"
|
2010-01-22 05:07:14 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-09-22 23:13:52 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
mktemp do
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/pango-view", "-t", "test-image",
|
|
|
|
"--waterfall", "--rotate=10",
|
|
|
|
"--annotate=1", "--header",
|
|
|
|
"-q", "-o", "output.png"
|
|
|
|
system "/usr/bin/qlmanage", "-p", "output.png"
|
2011-09-22 23:13:52 +00:00
|
|
|
end
|
|
|
|
end
|
2010-01-22 05:07:14 +00:00
|
|
|
end
|