2012-05-28 17:50:13 +00:00
|
|
|
class Gtkx3 < Formula
|
2014-12-08 19:33:45 +00:00
|
|
|
homepage "http://gtk.org/"
|
2015-04-24 14:04:09 +00:00
|
|
|
url "http://ftp.gnome.org/pub/gnome/sources/gtk+/3.16/gtk+-3.16.2.tar.xz"
|
|
|
|
sha256 "a03963a61c9f5253a8d4003187190be165d92f95acf97ca783735071a8781cfa"
|
2012-05-28 17:50:13 +00:00
|
|
|
|
2014-03-28 19:34:21 +00:00
|
|
|
bottle do
|
2015-04-24 14:30:52 +00:00
|
|
|
sha256 "3b301ff711350f37f99556603e4d1b74e720ef2ff3f037c3164645c17973599a" => :yosemite
|
|
|
|
sha256 "54c17fb91c52356ffae69438865d1fe0f018bc075d1e803c29c84ac975acd4a8" => :mavericks
|
|
|
|
sha256 "15bcce7131b628d66fdf15797281975b95d33ad72cd704e050d6e8c1c576201d" => :mountain_lion
|
2014-03-28 19:34:21 +00:00
|
|
|
end
|
|
|
|
|
2014-11-17 02:13:48 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-12-08 19:33:45 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "gdk-pixbuf"
|
|
|
|
depends_on "jasper" => :optional
|
|
|
|
depends_on "atk"
|
|
|
|
depends_on "gobject-introspection"
|
2015-04-24 14:04:09 +00:00
|
|
|
depends_on "libepoxy"
|
2014-12-08 19:33:45 +00:00
|
|
|
depends_on "gsettings-desktop-schemas" => :recommended
|
2015-04-24 14:04:09 +00:00
|
|
|
depends_on "pango"
|
|
|
|
depends_on "glib"
|
2012-05-28 17:50:13 +00:00
|
|
|
|
|
|
|
def install
|
2014-11-17 02:13:48 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
|
|
|
|
2014-05-28 07:24:42 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-glibtest
|
|
|
|
--enable-introspection=yes
|
|
|
|
--disable-schemas-compile
|
2015-04-24 14:04:09 +00:00
|
|
|
--enable-quartz-backend
|
|
|
|
--enable-quartz-relocation
|
|
|
|
--disable-x11-backend
|
2014-05-28 07:24:42 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
system "./configure", *args
|
2015-04-24 14:04:09 +00:00
|
|
|
# necessary to avoid gtk-update-icon-cache not being found during make install
|
|
|
|
bin.mkpath
|
|
|
|
ENV.prepend_path "PATH", "#{bin}"
|
2014-12-08 19:33:45 +00:00
|
|
|
system "make", "install"
|
2013-01-14 20:52:01 +00:00
|
|
|
# Prevent a conflict between this and Gtk+2
|
2014-12-08 19:33:45 +00:00
|
|
|
mv bin/"gtk-update-icon-cache", bin/"gtk3-update-icon-cache"
|
2012-05-28 17:50:13 +00:00
|
|
|
end
|
2014-05-29 11:31:08 +00:00
|
|
|
|
|
|
|
def post_install
|
|
|
|
system "#{Formula["glib"].opt_bin}/glib-compile-schemas", "#{HOMEBREW_PREFIX}/share/glib-2.0/schemas"
|
|
|
|
end
|
2015-04-24 14:04:09 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
gtk_disable_setlocale();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "-I#{HOMEBREW_PREFIX}/include/gtk-3.0", "-I#{HOMEBREW_PREFIX}/include", "-I#{HOMEBREW_PREFIX}/include/gio-unix-2.0/", "-I#{HOMEBREW_PREFIX}/include/cairo", "-I#{HOMEBREW_PREFIX}/include", "-I#{HOMEBREW_PREFIX}/include/pango-1.0", "-I#{HOMEBREW_PREFIX}/include/atk-1.0", "-I#{HOMEBREW_PREFIX}/include/cairo", "-I#{HOMEBREW_PREFIX}/include/pixman-1", "-I#{HOMEBREW_PREFIX}/include", "-I#{HOMEBREW_PREFIX}/include/freetype2", "-I#{HOMEBREW_PREFIX}/include/libpng16", "-I#{HOMEBREW_PREFIX}/include/gdk-pixbuf-2.0", "-I#{HOMEBREW_PREFIX}/include/libpng16", "-I#{HOMEBREW_PREFIX}/include/glib-2.0", "-I#{HOMEBREW_PREFIX}/lib/glib-2.0/include", "-I#{HOMEBREW_PREFIX}/opt/gettext/include", "-I/opt/X11/include", "test.c", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/lib", "-L#{HOMEBREW_PREFIX}/opt/gettext/lib", "-lgtk-3", "-lgdk-3", "-lpangocairo-1.0", "-lpango-1.0", "-latk-1.0", "-lcairo-gobject", "-lcairo", "-lgdk_pixbuf-2.0", "-lgio-2.0", "-lgobject-2.0", "-lglib-2.0", "-lintl", "-o", "test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2012-05-28 17:50:13 +00:00
|
|
|
end
|