77 lines
2.1 KiB
Ruby
77 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.26/libpeas-1.26.0.tar.xz"
|
|
sha256 "a976d77e20496479a8e955e6a38fb0e5c5de89cf64d9f44e75c2213ee14f7376"
|
|
revision 2
|
|
|
|
bottle do
|
|
sha256 "814ed5d3d4c27c2d831c5e2f4cd632283707e9e558d80bc61770a441abd8da0b" => :catalina
|
|
sha256 "e31b60a59aa04040766e6220bf732532e843e048fe197a87e82d217e79ac77b7" => :mojave
|
|
sha256 "ec9c9f97d99a774219e1cb280592264d90ceee1b4294c602d90df05f6694711b" => :high_sierra
|
|
end
|
|
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "vala" => :build
|
|
depends_on "glib"
|
|
depends_on "gobject-introspection"
|
|
depends_on "gtk+3"
|
|
depends_on "pygobject3"
|
|
depends_on "python@3.8"
|
|
|
|
def install
|
|
args = std_meson_args + %w[
|
|
-Dpython3=true
|
|
-Dintrospection=true
|
|
-Dvapi=true
|
|
-Dwidgetry=true
|
|
-Ddemos=false
|
|
]
|
|
|
|
mkdir "build" do
|
|
system "meson", *args, ".."
|
|
system "ninja", "-v"
|
|
system "ninja", "install", "-v"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#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 = %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
|