2011-03-10 05:11:03 +00:00
|
|
|
class Atk < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "GNOME accessibility toolkit"
|
2015-04-22 15:20:27 +00:00
|
|
|
homepage "https://library.gnome.org/devel/atk/"
|
2015-04-25 11:58:49 +00:00
|
|
|
url "https://download.gnome.org/sources/atk/2.16/atk-2.16.0.tar.xz"
|
2015-04-22 15:20:27 +00:00
|
|
|
sha256 "095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562"
|
2010-02-26 04:06:31 +00:00
|
|
|
|
2014-02-22 18:46:47 +00:00
|
|
|
bottle do
|
2015-04-22 15:31:02 +00:00
|
|
|
sha256 "128b040fbcf11591d3fef7bff779b958fb1fd4ce49715a14427fd5f8aba81010" => :yosemite
|
|
|
|
sha256 "50a58e13caac37709dd4cb9d7414393ded99aa17ca8037316d0dd0cb9018286d" => :mavericks
|
|
|
|
sha256 "7a7f9f7a5532e454434eeb4d33abd52cf7a568c259b407b61af1705233f0ea6c" => :mountain_lion
|
2014-02-22 18:46:47 +00:00
|
|
|
end
|
|
|
|
|
2014-09-23 05:20:56 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "glib"
|
|
|
|
depends_on "gobject-introspection"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2012-07-30 20:16:02 +00:00
|
|
|
option :universal
|
2012-02-04 06:05:49 +00:00
|
|
|
|
2010-02-26 04:06:31 +00:00
|
|
|
def install
|
2012-07-30 20:16:02 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-02-04 06:05:49 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2013-10-13 18:04:24 +00:00
|
|
|
"--enable-introspection=yes"
|
2011-10-14 05:55:37 +00:00
|
|
|
system "make"
|
2015-04-22 15:20:27 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-05-12 06:35:38 +00:00
|
|
|
|
2015-04-22 15:20:27 +00:00
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <atk/atk.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
const gchar *version = atk_get_version();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
2015-05-12 06:35:38 +00:00
|
|
|
gettext = Formula["gettext"]
|
|
|
|
glib = Formula["glib"]
|
|
|
|
flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
|
|
|
|
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
|
2015-04-22 15:20:27 +00:00
|
|
|
system "./test"
|
2010-02-26 04:06:31 +00:00
|
|
|
end
|
|
|
|
end
|