44 lines
1.6 KiB
Ruby
44 lines
1.6 KiB
Ruby
class GobjectIntrospection < Formula
|
|
desc "Generate introspection data for GObject libraries"
|
|
homepage "https://wiki.gnome.org/Projects/GObjectIntrospection"
|
|
url "https://download.gnome.org/sources/gobject-introspection/1.58/gobject-introspection-1.58.1.tar.xz"
|
|
sha256 "4954681fa5c5ed95451d914de89de1263a5b35158b1ded1a8b870042c0d0df89"
|
|
|
|
bottle do
|
|
sha256 "270d0f673e7a2cad2af015ce18d93df877344b3a4b786c8e53e649585fb9b065" => :mojave
|
|
sha256 "8fd867527473c06c65cee9e4152cbcf58c6028ccdd04f40db8f21fbd472709b3" => :high_sierra
|
|
sha256 "6cbfa48bdd280a5bd97304f10efe23d84accebfec64fb2ab71f0caf694f3ab7d" => :sierra
|
|
end
|
|
|
|
depends_on "cairo"
|
|
depends_on "glib"
|
|
depends_on "libffi"
|
|
depends_on "pkg-config"
|
|
depends_on "python@2"
|
|
|
|
resource "tutorial" do
|
|
url "https://gist.github.com/7a0023656ccfe309337a.git",
|
|
:revision => "499ac89f8a9ad17d250e907f74912159ea216416"
|
|
end
|
|
|
|
def install
|
|
ENV["GI_SCANNER_DISABLE_CACHE"] = "true"
|
|
inreplace "giscanner/transformer.py", "/usr/share", "#{HOMEBREW_PREFIX}/share"
|
|
inreplace "configure" do |s|
|
|
s.change_make_var! "GOBJECT_INTROSPECTION_LIBDIR", "#{HOMEBREW_PREFIX}/lib"
|
|
end
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
"--prefix=#{prefix}",
|
|
"--with-python=#{Formula["python@2"].opt_bin}/python2"
|
|
system "make"
|
|
system "make", "install"
|
|
end
|
|
|
|
test do
|
|
ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig"
|
|
resource("tutorial").stage testpath
|
|
system "make"
|
|
assert_predicate testpath/"Tut-0.1.typelib", :exist?
|
|
end
|
|
end
|