88 lines
2.6 KiB
Ruby
88 lines
2.6 KiB
Ruby
class Pangomm < Formula
|
|
desc "C++ interface to Pango"
|
|
homepage "https://www.pango.org/"
|
|
url "https://download.gnome.org/sources/pangomm/2.42/pangomm-2.42.0.tar.xz"
|
|
sha256 "ca6da067ff93a6445780c0b4b226eb84f484ab104b8391fb744a45cbc7edbf56"
|
|
revision 2
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "4e9fc1700643a05af5748609802fac09023c7be06602cfb876260a4ef8de8041" => :catalina
|
|
sha256 "103b9458af7fd9d7f08df10ad1da6f34b5c348399b88c5c50d0db25c61a38b4a" => :mojave
|
|
sha256 "48d67ace965522374210098e3a6e991f3a8fb1b5815211fac2d1130b10b3cdec" => :high_sierra
|
|
sha256 "15a59400365ed6730c2078de7b12081b0370659eda3f693ba367e4d9907a8ba3" => :sierra
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cairomm"
|
|
depends_on "glibmm"
|
|
depends_on "pango"
|
|
|
|
def install
|
|
ENV.cxx11
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include <pangomm.h>
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Pango::FontDescription fd;
|
|
return 0;
|
|
}
|
|
EOS
|
|
cairo = Formula["cairo"]
|
|
cairomm = Formula["cairomm"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
glibmm = Formula["glibmm"]
|
|
harfbuzz = Formula["harfbuzz"]
|
|
libpng = Formula["libpng"]
|
|
libsigcxx = Formula["libsigc++@2"]
|
|
pango = Formula["pango"]
|
|
pixman = Formula["pixman"]
|
|
flags = %W[
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{cairomm.opt_include}/cairomm-1.0
|
|
-I#{cairomm.opt_lib}/cairomm-1.0/include
|
|
-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#{glibmm.opt_include}/glibmm-2.4
|
|
-I#{glibmm.opt_lib}/glibmm-2.4/include
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/pangomm-1.4
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libsigcxx.opt_include}/sigc++-2.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-2.0/include
|
|
-I#{lib}/pangomm-1.4/include
|
|
-I#{pango.opt_include}/pango-1.0
|
|
-I#{pixman.opt_include}/pixman-1
|
|
-L#{cairo.opt_lib}
|
|
-L#{cairomm.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{glibmm.opt_lib}
|
|
-L#{libsigcxx.opt_lib}
|
|
-L#{lib}
|
|
-L#{pango.opt_lib}
|
|
-lcairo
|
|
-lcairomm-1.0
|
|
-lglib-2.0
|
|
-lglibmm-2.4
|
|
-lgobject-2.0
|
|
-lintl
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
-lpangomm-1.4
|
|
-lsigc-2.0
|
|
]
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|