69 lines
1.9 KiB
Ruby
69 lines
1.9 KiB
Ruby
class Gom < Formula
|
|
desc "GObject wrapper around SQLite"
|
|
homepage "https://wiki.gnome.org/Projects/Gom"
|
|
url "https://download.gnome.org/sources/gom/0.3/gom-0.3.3.tar.xz"
|
|
sha256 "ac57e34b5fe273ed306efaeabb346712c264e341502913044a782cdf8c1036d8"
|
|
revision 3
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "a3f9f89c5648aa2edc032ceba59d353ac78598e4c82bb2d4bb557bc67d79f4e6" => :high_sierra
|
|
sha256 "c4a10eb5ceb7c295994b401eafc490cd3fe6948de6e4f4490b98f1a1d335e254" => :sierra
|
|
sha256 "80f838e797f8336eb5e5dc3319e5a090622311163c03c5c5b394b6b371beef19" => :el_capitan
|
|
end
|
|
|
|
depends_on "gobject-introspection" => :build
|
|
depends_on "meson" => :build
|
|
depends_on "ninja" => :build
|
|
depends_on "gdk-pixbuf"
|
|
depends_on "gettext"
|
|
depends_on "glib"
|
|
depends_on "py3cairo"
|
|
depends_on "pygobject3" => "with-python"
|
|
depends_on "python"
|
|
depends_on "sqlite"
|
|
|
|
def install
|
|
ENV.refurbish_args
|
|
|
|
pyver = Language::Python.major_minor_version "python3"
|
|
|
|
# prevent sandbox violation
|
|
inreplace "bindings/python/meson.build",
|
|
"install_dir: pygobject_override_dir",
|
|
"install_dir: '#{lib}/python#{pyver}/site-packages'"
|
|
|
|
mkdir "build" do
|
|
system "meson", "--prefix=#{prefix}", ".."
|
|
system "ninja", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write <<~EOS
|
|
#include <gom/gom.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
GType type = gom_error_get_type();
|
|
return 0;
|
|
}
|
|
EOS
|
|
gettext = Formula["gettext"]
|
|
glib = Formula["glib"]
|
|
flags = %W[
|
|
-I#{gettext.opt_include}
|
|
-I#{glib.opt_include}/glib-2.0
|
|
-I#{glib.opt_lib}/glib-2.0/include
|
|
-I#{include}/gom-1.0
|
|
-L#{gettext.opt_lib}
|
|
-L#{glib.opt_lib}
|
|
-L#{lib}
|
|
-lglib-2.0
|
|
-lgobject-2.0
|
|
-lgom-1.0
|
|
-lintl
|
|
]
|
|
system ENV.cc, "test.c", "-o", "test", *flags
|
|
system "./test"
|
|
end
|
|
end
|