66 lines
2.1 KiB
Ruby
66 lines
2.1 KiB
Ruby
class Libpeas < Formula
|
|
desc "GObject plugin library"
|
|
homepage "https://developer.gnome.org/libpeas/stable/"
|
|
url "https://download.gnome.org/sources/libpeas/1.18/libpeas-1.18.0.tar.xz"
|
|
sha256 "bf49842c64c36925bbc41d954de490b6ff7faa29b45f6fd9e91ddcc779165e26"
|
|
|
|
bottle do
|
|
sha256 "3b0f9886e70837b50625c03d60f298e9bd3c0cdd10e303609171e034934fe2a9" => :el_capitan
|
|
sha256 "68af54ac53211987d4336e7016c563bab8ba3dcd7cb1d4b8284f95c389941787" => :yosemite
|
|
sha256 "6aefbee1878b76cad8ad0029a078d80bdbc6dcdf9ec4e75fa144d19bae08671e" => :mavericks
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "intltool" => :build
|
|
depends_on "gettext" => :build
|
|
depends_on "gnome-common" => :build
|
|
depends_on "glib"
|
|
depends_on "gobject-introspection"
|
|
depends_on "gtk+3"
|
|
|
|
def install
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--disable-silent-rules",
|
|
"--prefix=#{prefix}",
|
|
"--enable-gtk"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<-EOS.undent
|
|
#include <libpeas/peas.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
PeasObjectModule *mod = peas_object_module_new("test", "test", FALSE);
|
|
return 0;
|
|
}
|
|
EOS
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
gobject_introspection = Formula["gobject-introspection"]
|
|
libffi = Formula["libffi"]
|
|
flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
|
|
flags += %W[
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{gobject_introspection.opt_include}/gobject-introspection-1.0
|
|
-I#{include}/libpeas-1.0
|
|
-I#{libffi.opt_lib}/libffi-3.0.13/include
|
|
-D_REENTRANT
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{gobject_introspection.opt_lib}
|
|
-L#{lib}
|
|
-lgio-2.0
|
|
-lgirepository-1.0
|
|
-lglib-2.0
|
|
-lgmodule-2.0
|
|
-lgobject-2.0
|
|
-lintl
|
|
-lpeas-1.0
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|