2011-03-10 05:11:03 +00:00
|
|
|
class Glibmm < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "C++ interface to glib"
|
2014-09-23 05:20:56 +00:00
|
|
|
homepage "http://www.gtkmm.org/"
|
2015-09-22 12:05:23 +00:00
|
|
|
url "https://download.gnome.org/sources/glibmm/2.46/glibmm-2.46.1.tar.xz"
|
|
|
|
sha256 "9647e596c1081d2ea202bd3da2824ec2ea359498fa86eb59a55b1b307dd8c4aa"
|
2010-06-15 06:06:18 +00:00
|
|
|
|
2014-02-24 15:49:34 +00:00
|
|
|
bottle do
|
2015-09-22 10:46:38 +00:00
|
|
|
cellar :any
|
2015-10-02 15:03:54 +00:00
|
|
|
sha256 "906327e1af5daccc547fc0a256d6f13bd524604e7769dd8c3a3dd0b74d23c851" => :el_capitan
|
|
|
|
sha256 "0b253dbccc04c0f2fb1eebb99f2fc3a343782d0de92dbc403c17f14737968c07" => :yosemite
|
|
|
|
sha256 "e6a2de7475d7d0fd494511a9eebcc5046caa3aa31f15c4941df5624ff977a74f" => :mavericks
|
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
|
|
|
|
2015-09-21 20:25:54 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2010-06-15 06:06:18 +00:00
|
|
|
def install
|
2015-09-21 20:25:54 +00:00
|
|
|
ENV.cxx11
|
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
|
|
|
|
]
|
2015-09-21 20:25:54 +00:00
|
|
|
system ENV.cxx, "-std=c++11", "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
|