74 lines
2.0 KiB
Ruby
74 lines
2.0 KiB
Ruby
class GlibmmAT266 < Formula
|
|
desc "C++ interface to glib"
|
|
homepage "https://www.gtkmm.org/"
|
|
url "https://download.gnome.org/sources/glibmm/2.66/glibmm-2.66.1.tar.xz"
|
|
sha256 "69bd6b5327716ca2f511ab580a969fd7bf0cd2c24ce15e1d0e530592d3ff209c"
|
|
license "LGPL-2.1-or-later"
|
|
|
|
livecheck do
|
|
url "https://download.gnome.org/sources/glibmm/2.66/"
|
|
strategy :page_match
|
|
regex(/href=.*?glibmm[._-]v?(2\.66(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "654db4cee8b01d7f3a09e4d700ed055badbc83626f152a0015a92c6dcc2e4099"
|
|
sha256 cellar: :any, big_sur: "c569e5397d5036d4ba2eb562e9f88113b5be7ef9a631ea867f3426ddf29c5e89"
|
|
sha256 cellar: :any, catalina: "972e77c4e4ffaee50813406d0c98524e2f9aa84e8f39075b6cd3d76346604edc"
|
|
sha256 cellar: :any, mojave: "09aa0d0e43347d8bf94156004823840c39724d16632a51158a72687e3f707a2e"
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "glib"
|
|
depends_on "libsigc++@2"
|
|
|
|
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 <glibmm.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Glib::ustring my_string("testing");
|
|
return 0;
|
|
}
|
|
EOS
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
libsigcxx = Formula["libsigc++@2"]
|
|
flags = %W[
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{include}/glibmm-2.4
|
|
-I#{libsigcxx.opt_include}/sigc++-2.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-2.0/include
|
|
-I#{lib}/glibmm-2.4/include
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{libsigcxx.opt_lib}
|
|
-L#{lib}
|
|
-lglib-2.0
|
|
-lglibmm-2.4
|
|
-lgobject-2.0
|
|
-lsigc-2.0
|
|
]
|
|
on_macos do
|
|
flags << "-lintl"
|
|
end
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|