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 <manphiz@gmail.com>
This commit is contained in:
Paul Wagland authored and Xiyue Deng committed 2013-11-01 16:08:55 -07:00
1 parent d27d7f2d45
commit ce669ebb96
1 file changed
+6 -7
+6 -7
View File
@@ -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'