From 32a59ac43d73dbe2aa33e3c06c3209daf5b7a769 Mon Sep 17 00:00:00 2001 From: Denis Jacquerye Date: Fri, 7 Aug 2015 16:43:47 +0100 Subject: [PATCH 1/2] gobject-introspection: add head --- Library/Formula/gobject-introspection.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Formula/gobject-introspection.rb b/Library/Formula/gobject-introspection.rb index ced2d58784e7..2d092ae24608 100644 --- a/Library/Formula/gobject-introspection.rb +++ b/Library/Formula/gobject-introspection.rb @@ -4,6 +4,14 @@ class GobjectIntrospection < Formula url "https://download.gnome.org/sources/gobject-introspection/1.46/gobject-introspection-1.46.0.tar.xz" sha256 "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233" + head do + url "https://github.com/GNOME/gobject-introspection.git" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + end + bottle do sha256 "8cc016da6173e849904b707d9183f77078770bcda5db26838c28808b18b93dc0" => :el_capitan sha256 "55644f76743a7d0ff9536876272ad3de9c40fe13e411fb34ccec0f4d4536c96f" => :yosemite From 40b7ced8b10f10659c1e9c57ae2a6d588ccc35c9 Mon Sep 17 00:00:00 2001 From: Denis Jacquerye Date: Thu, 29 Oct 2015 06:05:04 +0000 Subject: [PATCH 2/2] gobject-introspection: python3 requires head --- Library/Formula/gobject-introspection.rb | 28 +++++++++++++++++++----- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/Library/Formula/gobject-introspection.rb b/Library/Formula/gobject-introspection.rb index 2d092ae24608..0e2986252b97 100644 --- a/Library/Formula/gobject-introspection.rb +++ b/Library/Formula/gobject-introspection.rb @@ -10,6 +10,7 @@ class GobjectIntrospection < Formula depends_on "autoconf" => :build depends_on "automake" => :build depends_on "libtool" => :build + depends_on :python3 => :optional end bottle do @@ -35,13 +36,25 @@ def install ENV["GI_SCANNER_DISABLE_CACHE"] = "true" ENV.universal_binary if build.universal? 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}" - system "make" - system "make", "install" + if build.head? + Language::Python.each_python(build) do |python, _version| + system "./autogen.sh" + inreplace "configure" do |s| + s.change_make_var! "GOBJECT_INTROSPECTION_LIBDIR", "#{HOMEBREW_PREFIX}/lib" + end + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "PYTHON=#{python}" + system "make" + system "make", "install" + end + else + inreplace "configure" do |s| + s.change_make_var! "GOBJECT_INTROSPECTION_LIBDIR", "#{HOMEBREW_PREFIX}/lib" + end + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}", "PYTHON=#{python}" + system "make" + system "make", "install" + end end test do @@ -49,5 +62,8 @@ def install resource("tutorial").stage testpath system "make" assert (testpath/"Tut-0.1.typelib").exist? + Language::Python.each_python(build) do |python, _version| + system python, "-c", "import gi" + end end end