105 lines
3.3 KiB
Ruby
105 lines
3.3 KiB
Ruby
class Pangomm < Formula
|
|
desc "C++ interface to Pango"
|
|
homepage "https://www.pango.org/"
|
|
url "https://download.gnome.org/sources/pangomm/2.50/pangomm-2.50.0.tar.xz"
|
|
sha256 "a27aa77e017b9afce9e751d85bd1cf890abbb3a58bf59d0fac917eef82db3b5b"
|
|
license "LGPL-2.1-only"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_monterey: "a21f7c630199d45ac1b8cf9878cf82aaaac75561407e0d239f4308a7ce8b64c5"
|
|
sha256 cellar: :any, arm64_big_sur: "e7103018de987f68f1760f9e63784ba4ec048efa0f125e488e21bd0a604a40f9"
|
|
sha256 cellar: :any, monterey: "eb0528f025413ada3a409fbc9bf893062fc37af65d1071a414ca319fe9cdd3d5"
|
|
sha256 cellar: :any, big_sur: "01d08e7417d287fa932a966c4f6c763c699f33dbb416529ff9f12229e14a182c"
|
|
sha256 cellar: :any, catalina: "006118a2224607e8bcacc9118a92d82625f8d9f4edcfd502e1b6278fff29a852"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "9411ad0f8933a13794ca70d8b4f4e6fde004e627f49e67190203d9fa1c22828c"
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cairomm"
|
|
depends_on "glibmm"
|
|
depends_on "pango"
|
|
|
|
on_linux do
|
|
depends_on "gcc" => :build
|
|
end
|
|
|
|
fails_with gcc: "5"
|
|
|
|
def install
|
|
ENV.cxx11
|
|
|
|
mkdir "build" do
|
|
system "meson", *std_meson_args, ".."
|
|
system "ninja"
|
|
system "ninja", "install"
|
|
end
|
|
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++"]
|
|
pango = Formula["pango"]
|
|
pixman = Formula["pixman"]
|
|
flags = %W[
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{cairomm.opt_include}/cairomm-1.16
|
|
-I#{cairomm.opt_lib}/cairomm-1.16/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}/giomm-2.68
|
|
-I#{glibmm.opt_include}/glibmm-2.68
|
|
-I#{glibmm.opt_lib}/giomm-2.68/include
|
|
-I#{glibmm.opt_lib}/glibmm-2.68/include
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/pangomm-2.48
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libsigcxx.opt_include}/sigc++-3.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-3.0/include
|
|
-I#{lib}/pangomm-2.48/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.16
|
|
-lglib-2.0
|
|
-lglibmm-2.68
|
|
-lgobject-2.0
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
-lpangomm-2.48
|
|
-lsigc-3.0
|
|
]
|
|
flags << "-lintl" if OS.mac?
|
|
system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|