2012-06-10 16:22:24 +00:00
|
|
|
class Cogl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Low level OpenGL abstraction library developed for Clutter"
|
2015-03-31 23:53:25 +00:00
|
|
|
homepage "https://developer.gnome.org/cogl/"
|
2016-08-27 08:51:50 +00:00
|
|
|
url "https://download.gnome.org/sources/cogl/1.22/cogl-1.22.2.tar.xz"
|
|
|
|
sha256 "39a718cdb64ea45225a7e94f88dddec1869ab37a21b339ad058a9d898782c00d"
|
2012-06-10 16:22:24 +00:00
|
|
|
|
2015-06-17 19:04:01 +00:00
|
|
|
bottle do
|
2016-09-27 01:47:43 +00:00
|
|
|
sha256 "59fcc7da30bf5df62481f5a469bfa2cbcd652b6e433efed593d966c32e2bbd48" => :sierra
|
2016-08-27 09:27:01 +00:00
|
|
|
sha256 "8b453f9b6f993a5e160266768b5fbdde47cdc5c21a3ab0474ff7c0992f1e762b" => :el_capitan
|
|
|
|
sha256 "0375322c23427755b7a3c2ca43778c6d1da2792a109cc0c9a58806078214440d" => :yosemite
|
|
|
|
sha256 "732b19cd457e124d4a89d6ddd6a6ed7ed8d14da2586d9a6908ccc95ad3bbaa9b" => :mavericks
|
2015-06-17 19:04:01 +00:00
|
|
|
end
|
|
|
|
|
2014-03-13 23:15:08 +00:00
|
|
|
head do
|
2016-02-29 12:21:54 +00:00
|
|
|
url "https://git.gnome.org/browse/cogl.git"
|
2014-03-13 23:15:08 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2012-06-10 16:22:24 +00:00
|
|
|
|
2014-04-27 22:58:03 +00:00
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "cairo"
|
|
|
|
depends_on "glib"
|
2015-04-19 05:24:22 +00:00
|
|
|
depends_on "gobject-introspection"
|
|
|
|
depends_on "gtk-doc"
|
2014-04-27 22:58:03 +00:00
|
|
|
depends_on "pango"
|
2015-04-19 05:24:22 +00:00
|
|
|
|
2014-08-25 04:18:07 +00:00
|
|
|
# Lion's grep fails, which later results in compilation failures:
|
|
|
|
# libtool: link: /usr/bin/grep -E -e [really long regexp] ".libs/libcogl.exp" > ".libs/libcogl.expT"
|
|
|
|
# grep: Regular expression too big
|
2015-04-19 05:24:22 +00:00
|
|
|
if MacOS.version == :lion
|
|
|
|
resource "grep" do
|
2016-07-02 20:59:53 +00:00
|
|
|
url "https://ftpmirror.gnu.org/grep/grep-2.20.tar.xz"
|
2015-04-19 05:24:22 +00:00
|
|
|
mirror "https://ftp.gnu.org/gnu/grep/grep-2.20.tar.xz"
|
|
|
|
sha256 "f0af452bc0d09464b6d089b6d56a0a3c16672e9ed9118fbe37b0b6aeaf069a65"
|
|
|
|
end
|
|
|
|
end
|
2013-10-07 01:56:54 +00:00
|
|
|
|
2012-06-10 16:22:24 +00:00
|
|
|
def install
|
2014-10-23 09:13:58 +00:00
|
|
|
# Don't dump files in $HOME.
|
|
|
|
ENV["GI_SCANNER_DISABLE_CACHE"] = "yes"
|
|
|
|
|
2015-04-19 05:24:22 +00:00
|
|
|
if MacOS.version == :lion
|
|
|
|
resource("grep").stage do
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--disable-nls",
|
|
|
|
"--prefix=#{buildpath}/grep"
|
|
|
|
system "make", "install"
|
|
|
|
ENV["GREP"] = "#{buildpath}/grep/bin/grep"
|
|
|
|
end
|
|
|
|
end
|
2014-08-25 04:18:07 +00:00
|
|
|
|
2012-10-24 05:55:46 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-dependency-tracking
|
2013-10-07 01:56:55 +00:00
|
|
|
--disable-silent-rules
|
2012-10-24 05:55:46 +00:00
|
|
|
--prefix=#{prefix}
|
2013-10-07 01:56:55 +00:00
|
|
|
--enable-cogl-pango=yes
|
2014-04-27 22:58:03 +00:00
|
|
|
--enable-introspection=yes
|
2015-04-19 05:24:22 +00:00
|
|
|
--disable-glx
|
2015-05-18 15:45:25 +00:00
|
|
|
--without-x
|
2012-10-24 05:55:46 +00:00
|
|
|
]
|
2015-04-19 05:24:22 +00:00
|
|
|
|
|
|
|
if build.head?
|
|
|
|
system "./autogen.sh", *args
|
|
|
|
else
|
|
|
|
system "./configure", *args
|
|
|
|
end
|
|
|
|
system "make", "install"
|
|
|
|
doc.install "examples"
|
2012-06-10 16:22:24 +00:00
|
|
|
end
|
2015-04-19 05:24:22 +00:00
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <cogl/cogl.h>
|
2014-03-06 20:40:26 +00:00
|
|
|
|
2015-04-19 05:24:22 +00:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
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"
|
|
|
|
system "./test"
|
|
|
|
end
|
|
|
|
end
|