2015-08-14 18:44:41 +00:00
|
|
|
class Graphene < Formula
|
|
|
|
desc "Thin layer of graphic data types"
|
|
|
|
homepage "https://ebassi.github.io/graphene/"
|
2015-09-11 12:05:56 +00:00
|
|
|
url "https://download.gnome.org/sources/graphene/1.2/graphene-1.2.10.tar.xz"
|
|
|
|
sha256 "e7b58334a91ae75b776fda987c29867710008673040fc996949933f2c5f17fdb"
|
2015-08-14 18:44:41 +00:00
|
|
|
|
2015-08-14 22:02:38 +00:00
|
|
|
bottle do
|
2015-09-11 12:32:41 +00:00
|
|
|
sha256 "27eca42a5917f791f1a7797575faa3a1952481ffe02295f4dcdcfc04028cd1f9" => :yosemite
|
|
|
|
sha256 "2f648859da057200b6f056d45f4041a8e055049b5123b9ded4fdd76967f3dd28" => :mavericks
|
|
|
|
sha256 "8072477f15c69a336a63cb86c75610ab6e1b1d11eadb9b05244a4f565abf6b79" => :mountain_lion
|
2015-08-14 22:02:38 +00:00
|
|
|
end
|
|
|
|
|
2015-08-14 18:44:41 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "glib"
|
2015-09-09 14:32:09 +00:00
|
|
|
depends_on "gobject-introspection"
|
2015-08-14 18:44:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make", "check"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <graphene-gobject.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
|
|
|
GType type = graphene_point_get_type();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
gettext = Formula["gettext"]
|
|
|
|
glib = Formula["glib"]
|
|
|
|
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}/graphene-1.0
|
|
|
|
-I#{lib}/graphene-1.0/include
|
|
|
|
-L#{lib}
|
|
|
|
-lgraphene-1.0
|
|
|
|
]
|
|
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|