66 lines
2.2 KiB
Ruby
66 lines
2.2 KiB
Ruby
class Gegl < Formula
|
|
desc "Graph based image processing framework"
|
|
homepage "http://www.gegl.org/"
|
|
url "https://download.gimp.org/pub/gegl/0.3/gegl-0.3.22.tar.bz2"
|
|
mirror "https://mirrors.kernel.org/debian/pool/main/g/gegl/gegl_0.3.22.orig.tar.bz2"
|
|
sha256 "b14e95f1666c47043b7156000fce41715480b29e50dd09cbf818f5b2a97a258b"
|
|
|
|
bottle do
|
|
sha256 "d0d42ae18feb97466ce16eec5062aeb5e777b5544e612af79b51575419a2d849" => :high_sierra
|
|
sha256 "2fc083a929eba241a59155c92d525e9f6011381989879acfbbf232645b66850f" => :sierra
|
|
sha256 "58cc74f6a98a1b0a3fb77dbf8a1cafca3102a147e668e517263615ae3412913e" => :el_capitan
|
|
end
|
|
|
|
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
|
|
|
|
depends_on "intltool" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "babl"
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
depends_on "json-glib"
|
|
depends_on "libpng"
|
|
depends_on "jpeg"
|
|
depends_on "cairo" => :optional
|
|
depends_on "librsvg" => :optional
|
|
depends_on "lua" => :optional
|
|
depends_on "pango" => :optional
|
|
depends_on "sdl" => :optional
|
|
|
|
conflicts_with "coreutils", :because => "both install `gcut` binaries"
|
|
|
|
def install
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--disable-docs"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#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
|
|
end
|