Skip to content

Commit

Permalink
subversion: fix perl bindings.
Browse files Browse the repository at this point in the history
* 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 Homebrew/legacy-homebrew#20932.
Closes Homebrew/legacy-homebrew#22668.
  • Loading branch information
manphiz committed Oct 27, 2013
1 parent f728a0e commit ba923fc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Formula/subversion.rb
Expand Up @@ -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'
Expand Down Expand Up @@ -107,6 +111,8 @@ def install
# 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"
Expand All @@ -115,6 +121,12 @@ def install
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"
Expand Down

0 comments on commit ba923fc

Please sign in to comment.