2011-03-10 05:11:03 +00:00
|
|
|
class Glibmm < Formula
|
2014-09-23 05:20:56 +00:00
|
|
|
homepage "http://www.gtkmm.org/"
|
2015-04-25 11:56:53 +00:00
|
|
|
url "https://download.gnome.org/sources/glibmm/2.44/glibmm-2.44.0.tar.xz"
|
2015-04-22 08:50:11 +00:00
|
|
|
sha256 "1b0ac0425d24895507c0e0e8088a464c7ae2d289c47afa1c11f63278fc672ea8"
|
2010-06-15 06:06:18 +00:00
|
|
|
|
2014-02-24 15:49:34 +00:00
|
|
|
bottle do
|
2015-04-22 08:59:13 +00:00
|
|
|
sha256 "441a1090b234db948a47ca1996dfab13c9d28d7ddbee74611ffd443c6088dca6" => :yosemite
|
|
|
|
sha256 "dc82204feb11ee31c04500c5a2327a42db838fb7e9c8ceeb0b9f0eb605dbaa76" => :mavericks
|
|
|
|
sha256 "53810b3d4d76b685fc9195be3162d73f973dea0596f3630724f3af049830458a" => :mountain_lion
|
2014-02-24 15:49:34 +00:00
|
|
|
end
|
|
|
|
|
2014-09-23 05:20:56 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "libsigc++"
|
|
|
|
depends_on "glib"
|
2010-06-15 06:06:18 +00:00
|
|
|
|
|
|
|
def install
|
2013-11-18 15:47:06 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
|
2015-04-22 08:50:11 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-05-12 06:33:15 +00:00
|
|
|
|
2015-04-22 08:50:11 +00:00
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <glibmm.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
Glib::ustring my_string("testing");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
2015-05-12 06:33:15 +00:00
|
|
|
gettext = Formula["gettext"]
|
|
|
|
glib = Formula["glib"]
|
|
|
|
libsigcxx = Formula["libsigc++"]
|
|
|
|
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}/glibmm-2.4
|
|
|
|
-I#{libsigcxx.opt_include}/sigc++-2.0
|
|
|
|
-I#{libsigcxx.opt_lib}/sigc++-2.0/include
|
|
|
|
-I#{lib}/glibmm-2.4/include
|
|
|
|
-L#{gettext.opt_lib}
|
|
|
|
-L#{glib.opt_lib}
|
|
|
|
-L#{libsigcxx.opt_lib}
|
|
|
|
-L#{lib}
|
|
|
|
-lglib-2.0
|
|
|
|
-lglibmm-2.4
|
|
|
|
-lgobject-2.0
|
|
|
|
-lintl
|
|
|
|
-lsigc-2.0
|
|
|
|
]
|
|
|
|
system ENV.cxx, "test.cpp", "-o", "test", *flags
|
2015-04-22 08:50:11 +00:00
|
|
|
system "./test"
|
2010-06-15 06:06:18 +00:00
|
|
|
end
|
|
|
|
end
|