67 lines
2.3 KiB
Ruby
67 lines
2.3 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.20.tar.bz2"
|
|
mirror "https://mirrors.kernel.org/debian/pool/main/g/gegl/gegl_0.3.20.orig.tar.bz2"
|
|
sha256 "821568d17dc92a46f6105644c4f4d497daea2be794006140a016ed34e05eb084"
|
|
|
|
bottle do
|
|
sha256 "b4d34a41ea043965e04128dc62208b5845e273487aae2cd3fc777ddf72de06ef" => :high_sierra
|
|
sha256 "47259d001b9f169c0514af1e171d8178ffa1690b5985a33be8d19c431316e246" => :sierra
|
|
sha256 "52715a437f3311a576278669d32ed17c2cce469df531a99d740ffca7ff1c2ae3" => :el_capitan
|
|
sha256 "dbb07b8f6f434331c4a3f53776f5eece7f9fb1b78ce7dbcef2d82e1bfb90e8d0" => :yosemite
|
|
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
|