55 lines
1.5 KiB
Ruby
55 lines
1.5 KiB
Ruby
class Atk < Formula
|
|
desc "GNOME accessibility toolkit"
|
|
homepage "https://library.gnome.org/devel/atk/"
|
|
url "https://download.gnome.org/sources/atk/2.34/atk-2.34.1.tar.xz"
|
|
sha256 "d4f0e3b3d21265fcf2bc371e117da51c42ede1a71f6db1c834e6976bb20997cb"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "481a81e57b58fd84251bd10a364433c5558802084f2dc4e459515b27703c6abb" => :mojave
|
|
sha256 "f80df2351f0b557484f7eb7c3b6dbd34e73dfdedd07a8cf0f1fd56be155f615f" => :high_sierra
|
|
sha256 "ec44e1cc0f0c110579b3e2a339bff88a9455f187cadd4cac3eec420cf2347ffe" => :sierra
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "glib"
|
|
|
|
def install
|
|
mkdir "build" do
|
|
system "meson", "--prefix=#{prefix}", ".."
|
|
system "ninja"
|
|
system "ninja", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <atk/atk.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
const gchar *version = atk_get_version();
|
|
return 0;
|
|
}
|
|
EOS
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
flags = %W[
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{include}/atk-1.0
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{lib}
|
|
-latk-1.0
|
|
-lglib-2.0
|
|
-lgobject-2.0
|
|
-lintl
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|