2016-01-11 13:51:51 +00:00
|
|
|
class Glade < Formula
|
2016-02-10 23:13:51 +00:00
|
|
|
desc "RAD tool for the GTK+ and GNOME environment"
|
2016-01-11 13:51:51 +00:00
|
|
|
homepage "https://glade.gnome.org/"
|
2016-06-25 14:49:01 +00:00
|
|
|
url "https://download.gnome.org/sources/glade/3.20/glade-3.20.0.tar.xz"
|
|
|
|
sha256 "82d96dca5dec40ee34e2f41d49c13b4ea50da8f32a3a49ca2da802ff14dc18fe"
|
2016-11-02 10:33:38 +00:00
|
|
|
revision 1
|
2016-01-11 13:51:51 +00:00
|
|
|
|
2016-06-25 21:17:52 +00:00
|
|
|
bottle do
|
2016-11-02 11:47:57 +00:00
|
|
|
sha256 "5ce422e93894c6136ef3df57e8440c482c0bfac5277a41ed8f2fc79879caec86" => :sierra
|
|
|
|
sha256 "93e1cacb5f672dd4913191e16f81a6c24ca45943faf7493f7b0b0363dbfe69d6" => :el_capitan
|
|
|
|
sha256 "97be70ab4496c03f9fae820dffaaa5fcc9c1d3399adbe797bbe52e50ab1aad76" => :yosemite
|
2016-06-25 21:17:52 +00:00
|
|
|
end
|
|
|
|
|
2016-01-11 13:51:51 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "intltool" => :build
|
2016-06-25 14:49:01 +00:00
|
|
|
depends_on "itstool" => :build
|
|
|
|
depends_on "docbook-xsl" => :build
|
2016-01-11 13:51:51 +00:00
|
|
|
depends_on "gettext"
|
|
|
|
depends_on "libxml2"
|
2016-06-25 14:49:01 +00:00
|
|
|
depends_on "gnome-icon-theme"
|
2016-01-11 13:51:51 +00:00
|
|
|
depends_on "hicolor-icon-theme"
|
2016-06-25 14:49:01 +00:00
|
|
|
depends_on "gtk+3"
|
2016-01-11 13:51:51 +00:00
|
|
|
depends_on "gtk-mac-integration"
|
|
|
|
|
|
|
|
def install
|
|
|
|
# Find our docbook catalog
|
|
|
|
ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"
|
|
|
|
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2016-06-25 14:49:01 +00:00
|
|
|
"--prefix=#{prefix}",
|
2016-11-02 10:33:38 +00:00
|
|
|
"--enable-gladeui",
|
|
|
|
"--enable-introspection"
|
2016-06-25 14:49:01 +00:00
|
|
|
# objective-c is needed for glade-registration.c. unfortunately build fails if -x objective-c is added to global CFLAGS.
|
|
|
|
# Bugreport Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=768032
|
|
|
|
inreplace "src/Makefile", "-c -o glade-glade-registration.o", "-x objective-c -c -o glade-glade-registration.o"
|
|
|
|
|
2016-01-11 13:51:51 +00:00
|
|
|
system "make" # separate steps required
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
# executable test (GUI)
|
2016-06-25 14:49:01 +00:00
|
|
|
system "#{bin}/glade", "--version"
|
2016-01-11 13:51:51 +00:00
|
|
|
# API test
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <gladeui/glade.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
gboolean glade_util_have_devhelp();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
ENV.libxml2
|
|
|
|
atk = Formula["atk"]
|
|
|
|
cairo = Formula["cairo"]
|
|
|
|
fontconfig = Formula["fontconfig"]
|
|
|
|
freetype = Formula["freetype"]
|
|
|
|
gdk_pixbuf = Formula["gdk-pixbuf"]
|
|
|
|
gettext = Formula["gettext"]
|
|
|
|
glib = Formula["glib"]
|
2016-06-25 14:49:01 +00:00
|
|
|
gtkx = Formula["gtk+3"]
|
2016-01-11 13:51:51 +00:00
|
|
|
libpng = Formula["libpng"]
|
|
|
|
pango = Formula["pango"]
|
|
|
|
pixman = Formula["pixman"]
|
2016-07-19 00:06:28 +00:00
|
|
|
flags = %W[
|
2016-01-11 13:51:51 +00:00
|
|
|
-I#{atk.opt_include}/atk-1.0
|
|
|
|
-I#{cairo.opt_include}/cairo
|
|
|
|
-I#{fontconfig.opt_include}
|
|
|
|
-I#{freetype.opt_include}/freetype2
|
|
|
|
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
|
|
|
|
-I#{gettext.opt_include}
|
|
|
|
-I#{glib.opt_include}/glib-2.0
|
|
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
2016-06-25 14:49:01 +00:00
|
|
|
-I#{gtkx.opt_include}/gtk-3.0
|
|
|
|
-I#{gtkx.opt_lib}/gtk-3.0/include
|
|
|
|
-I#{include}/libgladeui-2.0
|
2016-01-11 13:51:51 +00:00
|
|
|
-I#{libpng.opt_include}/libpng16
|
|
|
|
-I#{pango.opt_include}/pango-1.0
|
|
|
|
-I#{pixman.opt_include}/pixman-1
|
|
|
|
-D_REENTRANT
|
|
|
|
-L#{atk.opt_lib}
|
|
|
|
-L#{cairo.opt_lib}
|
|
|
|
-L#{gdk_pixbuf.opt_lib}
|
|
|
|
-L#{gettext.opt_lib}
|
|
|
|
-L#{glib.opt_lib}
|
|
|
|
-L#{gtkx.opt_lib}
|
|
|
|
-L#{lib}
|
|
|
|
-L#{pango.opt_lib}
|
|
|
|
-latk-1.0
|
|
|
|
-lcairo
|
|
|
|
-lgdk-quartz-2.0
|
|
|
|
-lgdk_pixbuf-2.0
|
|
|
|
-lgio-2.0
|
2016-06-25 14:49:01 +00:00
|
|
|
-lgladeui-2
|
2016-01-11 13:51:51 +00:00
|
|
|
-lglib-2.0
|
|
|
|
-lgobject-2.0
|
|
|
|
-lgtk-quartz-2.0
|
|
|
|
-lintl
|
|
|
|
-lpango-1.0
|
|
|
|
-lpangocairo-1.0
|
|
|
|
-lxml2
|
|
|
|
]
|
|
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|