From 9b438ceee1aeab3e958415665e0168697bc9976b Mon Sep 17 00:00:00 2001 From: Xiyue Deng Date: Thu, 24 Oct 2013 16:24:13 -0700 Subject: subversion: fix perl bindings. * Add swig as dependency for bindings. * Regenerate autotools as advice by upstream. - Depends on autotools for this purpose. * Filter out "-isystem" flags from Makefiles after installing main components. - Homebrew uses "-isystem" in CPPFLAGS to help detecting system componenets, but subversion passes it to swig which doesn't understand this. Manually filtering them out make it compile. Closes #20932. Closes #22668. --- Library/Formula/subversion.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb index 8fe124ce5..131fe71b0 100644 --- a/Library/Formula/subversion.rb +++ b/Library/Formula/subversion.rb @@ -25,8 +25,12 @@ class Subversion < Formula depends_on 'sqlite' depends_on :python => :optional - # Building Ruby bindings requires libtool - depends_on :libtool if build.include? 'ruby' + depends_on :autoconf + depends_on :automake + depends_on :libtool + + # Bindings require swig + depends_on 'swig' if build.include? 'perl' or build.include? 'python' or build.include? 'python' # If building bindings, allow non-system interpreters env :userpaths if build.include? 'perl' or build.include? 'ruby' @@ -107,6 +111,8 @@ class Subversion < Formula # variable to prevent failures due to incompatible CFLAGS ENV['ac_cv_python_compile'] = ENV.cc + # Suggestion by upstream. http://svn.haxx.se/users/archive-2013-09/0188.shtml + system "./autogen.sh" system "./configure", *args system "make" system "make install" @@ -115,6 +121,12 @@ class Subversion < Formula system "make tools" system "make install-tools" + # Swig don't understand "-isystem" flags added by Homebrew, so + # filter them out from makefiles. + Dir.glob(buildpath/"**/Makefile*").each do |mkfile| + inreplace mkfile, /\-isystem[^[:space:]]*/, '' + end + python do system "make swig-py" system "make install-swig-py" -- cgit v1.2.3