125 lines
3.7 KiB
Ruby
125 lines
3.7 KiB
Ruby
class Gtkmm3 < Formula
|
|
desc "C++ interfaces for GTK+ and GNOME"
|
|
homepage "http://www.gtkmm.org/"
|
|
url "https://download.gnome.org/sources/gtkmm/3.18/gtkmm-3.18.0.tar.xz"
|
|
sha256 "829fa113daed74398c49c3f2b7672807f58ba85d0fa463f5bc726e1b0138b86b"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "91c073b5a17bbea4ae29540ebfe99f797ea021f874478d49665815bd4fd9994d" => :el_capitan
|
|
sha256 "5d790c3d68103e841562ca6121523b64259cefc9c0bc815a932bc026f72da91b" => :yosemite
|
|
sha256 "5a4111549e565c6ea3aea1161f195cc597e7a6b7a8fda295e77be663968e6c60" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gtk+3"
|
|
depends_on "pangomm"
|
|
depends_on "atkmm"
|
|
|
|
needs :cxx11
|
|
|
|
def install
|
|
ENV.cxx11
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
#include <gtkmm.h>
|
|
class MyLabel : public Gtk::Label {
|
|
MyLabel(Glib::ustring text) : Gtk::Label(text) {}
|
|
};
|
|
int main(int argc, char *argv[]) {
|
|
return 0;
|
|
}
|
|
EOS
|
|
atk = Formula["atk"]
|
|
atkmm = Formula["atkmm"]
|
|
cairo = Formula["cairo"]
|
|
cairomm = Formula["cairomm"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gdk_pixbuf = Formula["gdk-pixbuf"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
glibmm = Formula["glibmm"]
|
|
gtkx3 = Formula["gtk+3"]
|
|
libepoxy = Formula["libepoxy"]
|
|
libpng = Formula["libpng"]
|
|
libsigcxx = Formula["libsigc++"]
|
|
pango = Formula["pango"]
|
|
pangomm = Formula["pangomm"]
|
|
pixman = Formula["pixman"]
|
|
flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
|
|
flags += %W[
|
|
-I#{atk.opt_include}/atk-1.0
|
|
-I#{atkmm.opt_include}/atkmm-1.6
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{cairomm.opt_include}/cairomm-1.0
|
|
-I#{cairomm.opt_lib}/cairomm-1.0/include
|
|
-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}/gio-unix-2.0/
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{glibmm.opt_include}/giomm-2.4
|
|
-I#{glibmm.opt_include}/glibmm-2.4
|
|
-I#{glibmm.opt_lib}/giomm-2.4/include
|
|
-I#{glibmm.opt_lib}/glibmm-2.4/include
|
|
-I#{gtkx3.opt_include}
|
|
-I#{gtkx3.opt_include}/gtk-3.0
|
|
-I#{gtkx3.opt_include}/gtk-3.0/unix-print
|
|
-I#{include}/gdkmm-3.0
|
|
-I#{include}/gtkmm-3.0
|
|
-I#{libepoxy.opt_include}
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libsigcxx.opt_include}/sigc++-2.0
|
|
-I#{libsigcxx.opt_lib}/sigc++-2.0/include
|
|
-I#{lib}/gdkmm-3.0/include
|
|
-I#{lib}/gtkmm-3.0/include
|
|
-I#{pango.opt_include}/pango-1.0
|
|
-I#{pangomm.opt_include}/pangomm-1.4
|
|
-I#{pangomm.opt_lib}/pangomm-1.4/include
|
|
-I#{pixman.opt_include}/pixman-1
|
|
-D_REENTRANT
|
|
-L#{atk.opt_lib}
|
|
-L#{atkmm.opt_lib}
|
|
-L#{cairo.opt_lib}
|
|
-L#{cairomm.opt_lib}
|
|
-L#{gdk_pixbuf.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{glibmm.opt_lib}
|
|
-L#{gtkx3.opt_lib}
|
|
-L#{libsigcxx.opt_lib}
|
|
-L#{lib}
|
|
-L#{pango.opt_lib}
|
|
-L#{pangomm.opt_lib}
|
|
-latk-1.0
|
|
-latkmm-1.6
|
|
-lcairo
|
|
-lcairo-gobject
|
|
-lcairomm-1.0
|
|
-lgdk-3
|
|
-lgdk_pixbuf-2.0
|
|
-lgdkmm-3.0
|
|
-lgio-2.0
|
|
-lgiomm-2.4
|
|
-lglib-2.0
|
|
-lglibmm-2.4
|
|
-lgobject-2.0
|
|
-lgtk-3
|
|
-lgtkmm-3.0
|
|
-lintl
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
-lpangomm-1.4
|
|
-lsigc-2.0
|
|
]
|
|
system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|