From c6731ddd0d28af9bb38d0ebadd290017b8269c1a Mon Sep 17 00:00:00 2001 From: Tim D. Smith Date: Fri, 10 Apr 2015 20:21:56 -0700 Subject: gobject-introspection: remove :python, add test The :python dependency was added in 270f2974 to resolve a build error but I don't see that the cause was identified. It introduces a Homebrew python dependency for all of gobject-introspection's dependencies, which is bad. I can't reproduce the error. Let's try removing the dependency. Added a test that exercises gobject-introspection using a tutorial project. Additionally recognize pkg-config as a runtime dep. Closes #38535. Signed-off-by: Tim D. Smith --- Library/Formula/gobject-introspection.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'Library/Formula/gobject-introspection.rb') diff --git a/Library/Formula/gobject-introspection.rb b/Library/Formula/gobject-introspection.rb index 48176479d..a39d1969e 100644 --- a/Library/Formula/gobject-introspection.rb +++ b/Library/Formula/gobject-introspection.rb @@ -12,11 +12,9 @@ class GobjectIntrospection < Formula option :universal option "with-tests", "Run tests in addition to the build (requires cairo)" - depends_on "pkg-config" => :build + depends_on "pkg-config" => :run depends_on "glib" depends_on "libffi" - # To avoid: ImportError: dlopen(./.libs/_giscanner.so, 2): Symbol not found: _PyList_Check - depends_on :python depends_on "cairo" => :build if build.with? "tests" # Allow tests to execute on OS X (.so => .dylib) @@ -25,6 +23,11 @@ class GobjectIntrospection < Formula sha1 "1f57849db76cd2ca26ddb35dc36c373606414dfc" end if build.with? "tests" + resource "tutorial" do + url "https://gist.github.com/7a0023656ccfe309337a.git", + :revision => "499ac89f8a9ad17d250e907f74912159ea216416" + end + def install ENV["GI_SCANNER_DISABLE_CACHE"] = "true" ENV.universal_binary if build.universal? @@ -43,6 +46,9 @@ class GobjectIntrospection < Formula end test do - system bin/"g-ir-annotation-tool", "--help" + ENV.prepend_path "PKG_CONFIG_PATH", Formula["libffi"].opt_lib/"pkgconfig" + resource("tutorial").stage testpath + system "make" + assert (testpath/"Tut-0.1.typelib").exist? end end -- cgit v1.2.3