103 lines
3.3 KiB
Ruby
103 lines
3.3 KiB
Ruby
class PangommAT246 < Formula
|
|
desc "C++ interface to Pango"
|
|
homepage "https://www.pango.org/"
|
|
url "https://download.gnome.org/sources/pangomm/2.46/pangomm-2.46.3.tar.xz"
|
|
sha256 "410fe04d471a608f3f0273d3a17d840241d911ed0ff2c758a9859c66c6f24379"
|
|
license "LGPL-2.1-only"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/pangomm-(2\.46(?:\.\d+)*)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_ventura: "34b42ded79cde5e0e0cf3e1801436cd02ac7462a2e78597d496c634ccf5cfc83"
|
|
sha256 cellar: :any, arm64_monterey: "70829eb5c5110ae6e8c0797080bae7d54b101d48e5b93d7858bd13b61f73d286"
|
|
sha256 cellar: :any, arm64_big_sur: "fa06e509cea917f2086a2b24ad367edc21470bd69f8a9a2ee1b699e23df24494"
|
|
sha256 cellar: :any, ventura: "26891221881ab706d5e49a0ef34a2b6f785752cad5797d53ee1368bf15a016ec"
|
|
sha256 cellar: :any, monterey: "cfd030509949ebe467ecd80530a689599d6374363760097e3d200f0e7c2ccf9d"
|
|
sha256 cellar: :any, big_sur: "36ae7e79632f6040ee0b0e4ebc2f6c9ec19f297460524abe2bcfac7c92f939e3"
|
|
sha256 cellar: :any, catalina: "0fb962aad84cc9a9053dd1d60cf0bf46102aaf6f20bc4872b6d5a45fdbe3f5f6"
|
|
sha256 x86_64_linux: "cfbf4d51df7507bec4200db5635968917757ac6e2de071fc52e836fe837fc98d"
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "cairomm@1.14"
|
|
depends_on "glibmm@2.66"
|
|
depends_on "pango"
|
|
|
|
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@1.14"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
glibmm = Formula["glibmm@2.66"]
|
|
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
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
-lpangomm-1.4
|
|
-lsigc-2.0
|
|
]
|
|
flags << "-lintl" if OS.mac?
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|