From ce669ebb96be7ea61fc385906d93f7170fb42ca3 Mon Sep 17 00:00:00 2001 From: Paul Wagland Date: Thu, 31 Oct 2013 13:26:41 +0100 Subject: Fix building of Perl libaries for subversion. * SWIG cannot build in parallel, so disable that. * Move all libraries to the correct location. * Remove filter than removes -isystem flag. This is no longer generated, and so doesn't need to be removed. This prevents warnings from being shown subversion --perl is built. * Depend on swig if we try to compile the ruby bindings. Closes #23829. Signed-off-by: Xiyue Deng --- Library/Formula/subversion.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Library') diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb index 679189bbc..930554ea5 100644 --- a/Library/Formula/subversion.rb +++ b/Library/Formula/subversion.rb @@ -35,7 +35,7 @@ class Subversion < Formula depends_on :libtool # Bindings require swig - depends_on 'swig' if build.include? 'perl' or build.include? 'python' or build.include? 'python' + depends_on 'swig' if build.include? 'perl' or build.include? 'python' or build.include? 'ruby' # For Serf depends_on 'scons' => :build @@ -148,18 +148,14 @@ 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" end if build.include? 'perl' + # In theory SWIG can be built in parallel, in practice... + ENV.deparallelize # Remove hard-coded ppc target, add appropriate ones if build.universal? arches = Hardware::CPU.universal_archs.as_arch_flags @@ -180,6 +176,9 @@ class Subversion < Formula end system "make swig-pl" system "make", "install-swig-pl", "DESTDIR=#{prefix}" + # Some of the libraries get installed into the wrong place, they end up having the + # prefix in the directory name twice. + mv Dir.glob("#{prefix}/#{lib}/*"), "#{lib}" end if build.include? 'java' -- cgit v1.2.3