diff --git a/Formula/cogl.rb b/Formula/cogl.rb index bac51c15ce..f9e780050a 100644 --- a/Formula/cogl.rb +++ b/Formula/cogl.rb @@ -1,9 +1,8 @@ class Cogl < Formula desc "Low level OpenGL abstraction library developed for Clutter" homepage "https://developer.gnome.org/cogl/" - url "https://download.gnome.org/sources/cogl/1.22/cogl-1.22.2.tar.xz" - sha256 "39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d" - revision 1 + url "https://download.gnome.org/sources/cogl/1.22/cogl-1.22.4.tar.xz" + sha256 "5217bf94cbca3df63268a3b79d017725382b9e592b891d1e7dc6212590ce0de0" bottle do sha256 "e8101f1075c0f7754670e94355b6adee2981cbc06f2cd06221e06009a730213f" => :mojave @@ -14,14 +13,18 @@ class Cogl < Formula head do url "https://gitlab.gnome.org/GNOME/cogl.git" - depends_on "autoconf" => :build - depends_on "automake" => :build - depends_on "libtool" => :build end + # The tarball contains a malfunctioning GNU Autotools setup + # Running autoreconf is necessary to fix the build + # Reported upstream at https://gitlab.gnome.org/GNOME/cogl/issues/8 + depends_on "autoconf" => :build + depends_on "automake" => :build depends_on "gobject-introspection" => :build + depends_on "libtool" => :build depends_on "pkg-config" => :build depends_on "cairo" + depends_on "gdk-pixbuf" depends_on "glib" depends_on "gtk-doc" depends_on "pango" @@ -40,11 +43,8 @@ class Cogl < Formula --without-x ] - if build.head? - system "./autogen.sh", *args - else - system "./configure", *args - end + system "autoreconf", "-fi" + system "./configure", *args system "make", "install" doc.install "examples" end @@ -54,13 +54,16 @@ class Cogl < Formula int main() { + CoglColor *color = cogl_color_new(); + cogl_color_free(color); return 0; } EOS system ENV.cc, "-I#{include}/cogl", "-I#{Formula["glib"].opt_include}/glib-2.0", "-I#{Formula["glib"].opt_lib}/glib-2.0/include", - testpath/"test.c", "-o", testpath/"test" + testpath/"test.c", "-o", testpath/"test", + "-L#{lib}", "-lcogl" system "./test" end end