82 lines
2.3 KiB
Ruby
82 lines
2.3 KiB
Ruby
class AtkmmAT228 < Formula
|
|
desc "Official C++ interface for the ATK accessibility toolkit library"
|
|
homepage "https://www.gtkmm.org/"
|
|
url "https://download.gnome.org/sources/atkmm/2.28/atkmm-2.28.1.tar.xz"
|
|
sha256 "116876604770641a450e39c1f50302884848ce9cc48d43c5dc8e8efc31f31bad"
|
|
license "LGPL-2.1-or-later"
|
|
revision 1
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/atkmm-(2\.28(?:\.\d+)*)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "f74f19f6e1f6757a9eeb848f4091e0adb7f19b321fb15856697c5f7354684699"
|
|
sha256 cellar: :any, big_sur: "0819a047abff34b69f124d18d0bde9a441919580bf7510945a0a18530450270c"
|
|
sha256 cellar: :any, catalina: "f9aff58445d0a3941de032d92ae5fe40e2bb1bfbfbcff5ae8bd1b41d41365957"
|
|
sha256 cellar: :any, mojave: "1524ca8c602a0fe3f3750be64957a68d7c6d2bcdcb4c47ed24800bd2f9f2a0ff"
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "atk"
|
|
depends_on "glibmm@2.66"
|
|
|
|
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@2.66"]
|
|
libsigcxx = Formula["libsigc++@2"]
|
|
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}/glibmm-2.4
|
|
-I#{glibmm.opt_lib}/glibmm-2.4/include
|
|
-I#{include}/atkmm-1.6
|
|
-I#{lib}/atkmm-1.6/include
|
|
-I#{libsigcxx.opt_include}/sigc++-2.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-2.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-1.6
|
|
-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
|