2011-11-28 09:15:47 +00:00
|
|
|
class Gegl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Graph based image processing framework"
|
2014-10-26 00:20:07 +00:00
|
|
|
homepage "http://www.gegl.org/"
|
2015-06-28 01:24:18 +00:00
|
|
|
url "http://download.gimp.org/pub/gegl/0.3/gegl-0.3.0.tar.bz2"
|
|
|
|
mirror "https://mirrors.kernel.org/debian/pool/main/g/gegl/gegl_0.3.0.orig.tar.bz2"
|
|
|
|
sha256 "f0fec8f2e7b8835979d3cf4e38b05d41bb79f68dc80cf899a846484da693bbf7"
|
2014-10-26 00:20:07 +00:00
|
|
|
|
2014-10-26 11:37:26 +00:00
|
|
|
bottle do
|
2015-06-30 04:39:28 +00:00
|
|
|
sha256 "6082fe8ebabb6dcd94a8efd95dd32072e7f99cc26b36838368fd5c5937259424" => :yosemite
|
|
|
|
sha256 "a94b94d6a7fc27012d3fca0fa665782896e6357deafd5762ecfa31936e20d69c" => :mavericks
|
|
|
|
sha256 "866ed590a4ae9803708e7b2c64f25fdda627781509010eb8bafc66c30ffb7bbc" => :mountain_lion
|
2014-10-26 11:37:26 +00:00
|
|
|
end
|
|
|
|
|
2014-10-26 00:20:07 +00:00
|
|
|
head do
|
|
|
|
# Use the Github mirror because official git unreliable.
|
|
|
|
url "https://github.com/GNOME/gegl.git"
|
|
|
|
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
2011-11-28 09:15:47 +00:00
|
|
|
|
2012-08-10 04:51:17 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-10-26 00:20:07 +00:00
|
|
|
depends_on "intltool" => :build
|
|
|
|
depends_on "pkg-config" => :build
|
|
|
|
depends_on "babl"
|
|
|
|
depends_on "gettext"
|
2015-06-28 01:24:18 +00:00
|
|
|
depends_on "glib"
|
|
|
|
depends_on "json-glib"
|
2014-10-26 00:20:07 +00:00
|
|
|
depends_on "libpng"
|
2015-06-28 01:24:18 +00:00
|
|
|
depends_on "cairo" => :optional
|
2014-10-26 00:20:07 +00:00
|
|
|
depends_on "jpeg" => :optional
|
2015-06-28 01:24:18 +00:00
|
|
|
depends_on "librsvg" => :optional
|
2014-10-26 00:20:07 +00:00
|
|
|
depends_on "lua" => :optional
|
|
|
|
depends_on "pango" => :optional
|
|
|
|
depends_on "sdl" => :optional
|
2011-11-28 09:15:47 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# ./configure breaks when optimization is enabled with llvm
|
|
|
|
ENV.no_optimization if ENV.compiler == :llvm
|
|
|
|
|
2012-08-10 04:51:17 +00:00
|
|
|
argv = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-docs
|
|
|
|
]
|
2014-10-26 00:20:07 +00:00
|
|
|
|
2012-08-10 04:51:17 +00:00
|
|
|
if build.universal?
|
2011-11-28 09:15:47 +00:00
|
|
|
ENV.universal_binary
|
|
|
|
# ffmpeg's formula is currently not universal-enabled
|
|
|
|
argv << "--without-libavformat"
|
|
|
|
|
2014-10-26 00:20:07 +00:00
|
|
|
opoo "Compilation may fail at gegl-cpuaccel.c using gcc for a universal build" if ENV.compiler == :gcc
|
2011-11-28 09:15:47 +00:00
|
|
|
end
|
|
|
|
|
2014-10-26 00:20:07 +00:00
|
|
|
system "./autogen.sh" if build.head?
|
2011-11-28 09:15:47 +00:00
|
|
|
system "./configure", *argv
|
2014-10-26 00:20:07 +00:00
|
|
|
system "make", "install"
|
2011-11-28 09:15:47 +00:00
|
|
|
end
|
2015-06-28 01:24:18 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
|
|
#include <gegl.h>
|
|
|
|
gint main(gint argc, gchar **argv) {
|
|
|
|
gegl_init(&argc, &argv);
|
|
|
|
GeglNode *gegl = gegl_node_new ();
|
|
|
|
gegl_exit();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
system ENV.cc, "-I#{include}/gegl-0.3", "-L#{lib}", "-lgegl-0.3",
|
|
|
|
"-I#{Formula["babl"].opt_include}/babl-0.1",
|
|
|
|
"-I#{Formula["glib"].opt_include}/glib-2.0",
|
|
|
|
"-I#{Formula["glib"].opt_lib}/glib-2.0/include",
|
|
|
|
"-L#{Formula["glib"].opt_lib}", "-lgobject-2.0", "-lglib-2.0",
|
|
|
|
testpath/"test.c", "-o", testpath/"test"
|
|
|
|
system "./test"
|
|
|
|
end
|
2011-11-28 09:15:47 +00:00
|
|
|
end
|