73 lines
2.2 KiB
Ruby
73 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.4/gegl-0.4.6.tar.bz2"
|
|
sha256 "f397eb43f6b8ec387d177b21a0002070c78c38a94a1a0ca6575226f081519ae5"
|
|
|
|
bottle do
|
|
sha256 "3687f6337da3cebe1b67d11d5871e882731fb6ce3121c95c17c03e46973e8554" => :high_sierra
|
|
sha256 "c334b1f677938254fa7c5c463f6045d5fbe2110ffae84d2428bf0324b1074cd4" => :sierra
|
|
sha256 "40e2567f527ae2e7b66240802b23891683e4bb35f4cb51022e9bf5b9d672dc2c" => :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 "jpeg"
|
|
depends_on "json-glib"
|
|
depends_on "libpng"
|
|
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
|
|
args = %W[
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--disable-docs
|
|
--without-jasper
|
|
--without-umfpack
|
|
]
|
|
|
|
args << "--without-cairo" if build.without? "cairo"
|
|
|
|
system "./autogen.sh" if build.head?
|
|
system "./configure", *args
|
|
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.4", "-L#{lib}", "-lgegl-0.4",
|
|
"-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
|