homebrew-core/Formula/pango.rb
Dominyk Tiller d4267a5160 pango: remove defunct configure argument (#30289)
--enable-man was removed upstream in fa6dfc688c.
2018-07-20 08:21:30 +01:00

91 lines
2.7 KiB
Ruby

class Pango < Formula
desc "Framework for layout and rendering of i18n text"
homepage "https://www.pango.org/"
url "https://download.gnome.org/sources/pango/1.42/pango-1.42.2.tar.xz"
sha256 "b1e416b4d40416ef6c8224cf146492b86848703264ba88f792290992cf3ca1e2"
bottle do
sha256 "00652bf4d276be9c0f084418892e59d3df7f3e08259e40a38bdd5e7a7a11e4d7" => :high_sierra
sha256 "3c665356a1fd1e88cfe78ed2431a2b9f10a1374168266fbb266cbb15f7f6c6ea" => :sierra
sha256 "3e561ebcf7abef2511282a91b06fd6d88ea6fa77eec364a51e198629e23b0596" => :el_capitan
end
head do
url "https://gitlab.gnome.org/GNOME/pango.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
depends_on "gtk-doc" => :build
end
depends_on "gobject-introspection" => :build
depends_on "pkg-config" => :build
depends_on "cairo"
depends_on "fribidi"
depends_on "fontconfig"
depends_on "glib"
depends_on "harfbuzz"
def install
system "./autogen.sh" if build.head?
system "./configure", "--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}",
"--with-html-dir=#{share}/doc",
"--enable-introspection=yes",
"--enable-static",
"--without-xft"
system "make"
system "make", "install"
end
test do
system "#{bin}/pango-view", "--version"
(testpath/"test.c").write <<~EOS
#include <pango/pangocairo.h>
int main(int argc, char *argv[]) {
PangoFontMap *fontmap;
int n_families;
PangoFontFamily **families;
fontmap = pango_cairo_font_map_get_default();
pango_font_map_list_families (fontmap, &families, &n_families);
g_free(families);
return 0;
}
EOS
cairo = Formula["cairo"]
fontconfig = Formula["fontconfig"]
freetype = Formula["freetype"]
gettext = Formula["gettext"]
glib = Formula["glib"]
libpng = Formula["libpng"]
pixman = Formula["pixman"]
flags = %W[
-I#{cairo.opt_include}/cairo
-I#{fontconfig.opt_include}
-I#{freetype.opt_include}/freetype2
-I#{gettext.opt_include}
-I#{glib.opt_include}/glib-2.0
-I#{glib.opt_lib}/glib-2.0/include
-I#{include}/pango-1.0
-I#{libpng.opt_include}/libpng16
-I#{pixman.opt_include}/pixman-1
-D_REENTRANT
-L#{cairo.opt_lib}
-L#{gettext.opt_lib}
-L#{glib.opt_lib}
-L#{lib}
-lcairo
-lglib-2.0
-lgobject-2.0
-lintl
-lpango-1.0
-lpangocairo-1.0
]
system ENV.cc, "test.c", "-o", "test", *flags
system "./test"
end
end