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-11-28 14:23:26 +00:00
|
|
|
url 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.1.tar.xz'
|
|
|
|
sha256 '3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe'
|
2012-01-23 01:49:46 +00:00
|
|
|
|
2012-08-25 21:40:01 +00:00
|
|
|
option 'without-x', 'Build without X11 support'
|
|
|
|
|
2010-09-19 17:21:57 +00:00
|
|
|
depends_on 'pkg-config' => :build
|
2012-06-10 15:40:34 +00:00
|
|
|
depends_on 'xz' => :build
|
2010-03-25 03:17:25 +00:00
|
|
|
depends_on 'glib'
|
2012-08-25 21:40:01 +00:00
|
|
|
depends_on :x11 unless build.include? 'without-x'
|
2012-07-03 13:34:01 +00:00
|
|
|
|
2012-09-12 02:49:52 +00:00
|
|
|
if MacOS.version == :leopard
|
|
|
|
depends_on 'fontconfig'
|
|
|
|
else
|
|
|
|
depends_on :fontconfig
|
|
|
|
end
|
|
|
|
|
2012-07-03 13:34:01 +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
|
|
|
|
# We depend on our cairo on all platforms for consistency
|
|
|
|
depends_on 'cairo'
|
2010-04-24 18:15:13 +00:00
|
|
|
|
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
|
2012-08-25 21:40:01 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--enable-man
|
|
|
|
--with-html-dir=#{share}/doc
|
|
|
|
--disable-introspection
|
|
|
|
]
|
|
|
|
|
2012-10-27 11:00:50 +00:00
|
|
|
if build.include? 'without-x'
|
|
|
|
args << '--without-x'
|
|
|
|
else
|
|
|
|
args << '--with-x'
|
|
|
|
end
|
2012-08-25 21:40:01 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
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
|
|
|
|
2013-01-07 03:23:22 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/pango-view", "-t", "test-image",
|
|
|
|
"--waterfall", "--rotate=10",
|
|
|
|
"--annotate=1", "--header"
|
2011-09-22 23:13:52 +00:00
|
|
|
end
|
2010-01-22 05:07:14 +00:00
|
|
|
end
|