diff options
| author | Jack Nagel | 2013-10-18 19:34:12 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2013-10-18 19:47:04 -0500 | 
| commit | f89a21d31cfb713fbcc2feaa03614acff0d16e04 (patch) | |
| tree | 1def2330b5902b6c21a1d63fef062509e804fc1e | |
| parent | 93bb1c1d7d5093dc7b4d86dcda3d3b43cd0ec882 (diff) | |
| download | homebrew-f89a21d31cfb713fbcc2feaa03614acff0d16e04.tar.bz2 | |
gobject-introspection: add option to run tests
cf. #22314.
| -rw-r--r-- | Library/Formula/gobject-introspection.rb | 16 | 
1 files changed, 14 insertions, 2 deletions
| diff --git a/Library/Formula/gobject-introspection.rb b/Library/Formula/gobject-introspection.rb index 474638143..90140c6d0 100644 --- a/Library/Formula/gobject-introspection.rb +++ b/Library/Formula/gobject-introspection.rb @@ -13,6 +13,12 @@ class GobjectIntrospection < Formula    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) +  def patches +    "https://gist.github.com/krrk/6958869/raw/de8d83009d58eefa680a590f5839e61a6e76ff76/gobject-introspection-tests.patch" +  end if build.with? 'tests'    def install      ENV.universal_binary if build.universal? @@ -20,7 +26,13 @@ class GobjectIntrospection < Formula      inreplace 'configure' do |s|        s.change_make_var! 'GOBJECT_INTROSPECTION_LIBDIR', HOMEBREW_PREFIX/'lib'      end -    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" -    system "make install" + +    args = %W[--disable-dependency-tracking --prefix=#{prefix}] +    args << "--with-cairo" if build.with? "tests" + +    system "./configure", *args +    system "make" +    system "make", "check" if build.with? "tests" +    system "make", "install"    end  end | 
