graphene 1.2.6 (new formula)
Closes Homebrew/homebrew#42898. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
544701514f
commit
cd0c93cf73
1 changed files with 44 additions and 0 deletions
44
Formula/graphene.rb
Normal file
44
Formula/graphene.rb
Normal file
|
@ -0,0 +1,44 @@
|
|||
class Graphene < Formula
|
||||
desc "Thin layer of graphic data types"
|
||||
homepage "https://ebassi.github.io/graphene/"
|
||||
url "https://download.gnome.org/sources/graphene/1.2/graphene-1.2.6.tar.xz"
|
||||
sha256 "987a83be0b9e634805d8bb949d11422a42e627fd40f78c68c3b1ac7b3243cda2"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "glib"
|
||||
|
||||
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
|
Loading…
Reference in a new issue