homebrew-core/Formula/atk.rb
2018-03-20 23:08:12 -07:00

53 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.28/atk-2.28.1.tar.xz"
sha256 "cd3a1ea6ecc268a2497f0cd018e970860de24a6d42086919d6bf6c8e8d53f4fc"
revision 1
bottle do
sha256 "15c80bb42a6c32bf5c86fb17327f9899052680df06572d4b779156bf03e71da7" => :high_sierra
sha256 "3bbba246bcef20015b0d83bfb2843982b9bce70dbaaaf657e0a4d25f156986b0" => :sierra
sha256 "8b485d88f994d54fad282e8752c14371d28254b12b0569bcfbf07e33205cfc0a" => :el_capitan
end
depends_on "gobject-introspection" => :build
depends_on "pkg-config" => :build
depends_on "glib"
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-introspection=yes"
system "make"
system "make", "install"
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