subversion: always build Python bindings

This commit is contained in:
Vinyl Darkscratch 2018-01-09 23:18:05 -08:00 committed by ilovezfs
parent 8cb78e1ec6
commit b48c8ab7da

View file

@ -4,7 +4,7 @@ class Subversion < Formula
url "https://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.9.7.tar.bz2"
mirror "https://archive.apache.org/dist/subversion/subversion-1.9.7.tar.bz2"
sha256 "c3b118333ce12e501d509e66bb0a47bcc34d053990acab45559431ac3e491623"
revision 2
revision 3
bottle do
sha256 "2de1e1d3691d8adc101cdb39a62792907f879fe5462c9870f07edef6c3c4160c" => :high_sierra
@ -22,18 +22,13 @@ class Subversion < Formula
option "with-gpg-agent", "Build with support for GPG Agent"
depends_on "pkg-config" => :build
depends_on "swig" => :build
depends_on "apr-util"
depends_on "apr"
# Always build against Homebrew versions instead of system versions for consistency.
depends_on "sqlite"
depends_on "perl" => :recommended
depends_on "python" => :optional
# Bindings require swig
if build.with?("perl") || build.with?("python") || build.with?("ruby")
depends_on "swig" => :build
end
# For Serf
depends_on "scons" => :build
@ -65,6 +60,8 @@ class Subversion < Formula
end
def install
ENV.prepend_path "PATH", "/System/Library/Frameworks/Python.framework/Versions/2.7/bin"
serf_prefix = libexec/"serf"
resource("serf").stage do
@ -130,11 +127,9 @@ class Subversion < Formula
system "make", "tools"
system "make", "install-tools"
if build.with? "python"
system "make", "swig-py"
system "make", "install-swig-py"
(lib/"python2.7/site-packages").install_symlink Dir["#{lib}/svn-python/*"]
end
system "make", "swig-py"
system "make", "install-swig-py"
(lib/"python2.7/site-packages").install_symlink Dir["#{lib}/svn-python/*"]
if build.with? "perl"
# In theory SWIG can be built in parallel, in practice...