109 lines
3.3 KiB
Ruby
109 lines
3.3 KiB
Ruby
class Libchamplain < Formula
|
|
desc "ClutterActor for displaying maps"
|
|
homepage "https://wiki.gnome.org/Projects/libchamplain"
|
|
url "https://download.gnome.org/sources/libchamplain/0.12/libchamplain-0.12.11.tar.xz"
|
|
sha256 "851e24888d967c10acb8fd878df1292a84b8180eb4c48fc5bfbf1a48896d4aa5"
|
|
|
|
bottle do
|
|
revision 1
|
|
sha256 "b47d4c49d9f7d6bfc8e51de2ccd1912c49acbe5f4a7468a0cb2983350a38709d" => :el_capitan
|
|
sha256 "511afec4f201270a963900311dfae5e0cbf4d25bc1742501225f2ddd1ad5c952" => :yosemite
|
|
sha256 "d9ecb9dbb31ca73260f7fe08887f21c15ffd87b835df66bd1b1759bf6ba9dd30" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "clutter"
|
|
depends_on "libsoup"
|
|
depends_on "gobject-introspection"
|
|
depends_on "gtk+3"
|
|
depends_on "clutter-gtk"
|
|
depends_on "vala" => :optional
|
|
|
|
def install
|
|
system "./configure", "--disable-debug",
|
|
"--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
#include <champlain/champlain.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
GType type = champlain_license_get_type();
|
|
return 0;
|
|
}
|
|
EOS
|
|
ENV.libxml2
|
|
atk = Formula["atk"]
|
|
cairo = Formula["cairo"]
|
|
clutter = Formula["clutter"]
|
|
cogl = Formula["cogl"]
|
|
fontconfig = Formula["fontconfig"]
|
|
freetype = Formula["freetype"]
|
|
gdk_pixbuf = Formula["gdk-pixbuf"]
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
gtkx3 = Formula["gtk+3"]
|
|
harfbuzz = Formula["harfbuzz"]
|
|
json_glib = Formula["json-glib"]
|
|
libepoxy = Formula["libepoxy"]
|
|
libpng = Formula["libpng"]
|
|
libsoup = Formula["libsoup"]
|
|
pango = Formula["pango"]
|
|
pixman = Formula["pixman"]
|
|
flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
|
|
flags += %W[
|
|
-I#{atk.opt_include}/atk-1.0
|
|
-I#{cairo.opt_include}/cairo
|
|
-I#{clutter.opt_include}/clutter-1.0
|
|
-I#{cogl.opt_include}/cogl
|
|
-I#{fontconfig.opt_include}
|
|
-I#{freetype.opt_include}/freetype2
|
|
-I#{gdk_pixbuf.opt_include}/gdk-pixbuf-2.0
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/gio-unix-2.0/
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{gtkx3.opt_include}/gtk-3.0
|
|
-I#{harfbuzz.opt_include}/harfbuzz
|
|
-I#{include}/libchamplain-0.12
|
|
-I#{json_glib.opt_include}/json-glib-1.0
|
|
-I#{libepoxy.opt_include}
|
|
-I#{libpng.opt_include}/libpng16
|
|
-I#{libsoup.opt_include}/libsoup-2.4
|
|
-I#{pango.opt_include}/pango-1.0
|
|
-I#{pixman.opt_include}/pixman-1
|
|
-D_REENTRANT
|
|
-L#{atk.opt_lib}
|
|
-L#{cairo.opt_lib}
|
|
-L#{clutter.opt_lib}
|
|
-L#{cogl.opt_lib}
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{json_glib.opt_lib}
|
|
-L#{lib}
|
|
-L#{pango.opt_lib}
|
|
-latk-1.0
|
|
-lcairo
|
|
-lcairo-gobject
|
|
-lchamplain-0.12
|
|
-lclutter-1.0
|
|
-lcogl
|
|
-lcogl-pango
|
|
-lcogl-path
|
|
-lgio-2.0
|
|
-lglib-2.0
|
|
-lgmodule-2.0
|
|
-lgobject-2.0
|
|
-lintl
|
|
-ljson-glib-1.0
|
|
-lpango-1.0
|
|
-lpangocairo-1.0
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|