homebrew-core/Formula/pango.rb
Jack Nagel 73f3587e96 Sort out remaining XQuartz/stdenv issues
We use PKG_CONFIG_LIBDIR to reset the default search path, overriding
whatever is baked into the pkg-config executable. This way, we can later
append XQuartz paths here while still allowing any brewed libs to take
precedence, keg-only or not.

Hopefully this will resolve any remaining issues, and let us get rid of
some per-formula hacks.

c.f. Homebrew/homebrew#14474.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-03 22:39:38 -05:00

51 lines
1.4 KiB
Ruby

require 'formula'
class Pango < Formula
homepage 'http://www.pango.org/'
url 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.1.tar.xz'
sha256 '3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe'
option 'without-x', 'Build without X11 support'
depends_on 'pkg-config' => :build
depends_on 'xz' => :build
depends_on 'glib'
depends_on :fontconfig
depends_on :x11 unless build.include? 'without-x'
# 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'
fails_with :llvm do
build 2326
cause "Undefined symbols when linking"
end
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--enable-man
--with-html-dir=#{share}/doc
--disable-introspection
]
args << '--with-x' unless build.include? 'without-x'
system "./configure", *args
system "make"
system "make install"
end
def test
mktemp do
system "#{bin}/pango-view", "-t", "test-image",
"--waterfall", "--rotate=10",
"--annotate=1", "--header",
"-q", "-o", "output.png"
end
end
end