78 lines
2.2 KiB
Ruby
78 lines
2.2 KiB
Ruby
class Atkmm < Formula
|
|
desc "Official C++ interface for the ATK accessibility toolkit library"
|
|
homepage "https://www.gtkmm.org/"
|
|
url "https://download.gnome.org/sources/atkmm/2.36/atkmm-2.36.0.tar.xz"
|
|
sha256 "c93fa9f3876536391b54c307a923b7788e79796ace69a5e9141d67398c019973"
|
|
license "LGPL-2.1-or-later"
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "1b1aabce33bb159b047e9a7f39164f0969832fda522d79b3a2b70c642323869e"
|
|
sha256 cellar: :any, big_sur: "5089524e732962aac25fb780a671bdb8736cde11dd8565adeeab2f23fcfe9d8b"
|
|
sha256 cellar: :any, catalina: "5a92889fa4d5326f5a750d076f02b9b352da60896328f2e20f16da813f442c98"
|
|
sha256 cellar: :any, mojave: "169e793e210a156583b3bf6126fb4f1e049f7ca0113ba2a6a4c37efb0d38a458"
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "atk"
|
|
depends_on "glibmm"
|
|
|
|
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 <atkmm/init.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
Atk::init();
|
|
return 0;
|
|
}
|
|
EOS
|
|
atk = Formula["atk"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
glibmm = Formula["glibmm"]
|
|
libsigcxx = Formula["libsigc++"]
|
|
flags = %W[
|
|
-I#{atk.opt_include}/atk-1.0
|
|
-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#{include}/atkmm-2.36
|
|
-I#{lib}/atkmm-2.36/include
|
|
-I#{libsigcxx.opt_include}/sigc++-3.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-3.0/include
|
|
-L#{atk.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{glibmm.opt_lib}
|
|
-L#{libsigcxx.opt_lib}
|
|
-L#{lib}
|
|
-latk-1.0
|
|
-latkmm-2.36
|
|
-lglib-2.0
|
|
-lglibmm-2.68
|
|
-lgobject-2.0
|
|
-lsigc-3.0
|
|
]
|
|
on_macos do
|
|
flags << "-lintl"
|
|
end
|
|
system ENV.cxx, "-std=c++17", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|