gobject-introspection: add option to run tests
cf. Homebrew/homebrew#22314.
This commit is contained in:
parent
5ed377624b
commit
bd2012c6bd
1 changed files with 14 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue