aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-05-10 20:37:19 -0700
committerAdam Vandenberg2010-05-10 20:48:19 -0700
commit3b052c55a5489b3a692cd4960dca19387b24aa8e (patch)
treef9b3165110adf514a8b592e42ec3176902f10b78 /Library
parent41e22cacf09088157e6ff154348d6be567928978 (diff)
downloadhomebrew-3b052c55a5489b3a692cd4960dca19387b24aa8e.tar.bz2
Subversion: --universal for Java-based IDE bindings
* Warn if Java bindings are built non-Universal
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/subversion.rb38
1 files changed, 35 insertions, 3 deletions
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb
index 88a58aea6..347e3f8cd 100644
--- a/Library/Formula/subversion.rb
+++ b/Library/Formula/subversion.rb
@@ -18,14 +18,47 @@ class Subversion <Formula
# builds it.
depends_on 'neon' if MACOS_VERSION >= 10.6
+ def options
+ [
+ ['--java', 'Build Java bindings.'],
+ ['--universal', 'Build as a Universal Intel binary.']
+ ]
+ end
+
def setup_leopard
# Slot dependencies into place
d=Pathname.getwd
SubversionDeps.new.brew { d.install Dir['*'] }
end
+ def setup_snow_leopard
+ # Check that Neon was built universal if we are building w/ --universal
+ if ARGV.include? '--universal'
+ neon = Formula.factory('neon')
+ unless neon.installed?
+ neon_arch = archs_for_command(neon.lib+'libneon.dylib')
+ unless neon_arch.universal?
+ opoo "A universal build was requested, but neon was already built for a single arch."
+ puts "You may need to `brew rm neon` first."
+ end
+ end
+ end
+ end
+
def install
- setup_leopard if MACOS_VERSION < 10.6
+ if ARGV.include? "--java" and not ARGV.include? '--universal'
+ opoo "A non-Universal Java build was requested."
+ puts "To use Java bindings with various Java IDEs, you might need a universal build:"
+ puts " brew install --universal --java subversion"
+ end
+
+ ENV.universal_binary if ARGV.include? '--universal'
+
+ if MACOS_VERSION < 10.6
+ setup_leopard
+ else
+ setup_snow_leopard
+ end
# Use existing system zlib
# Use dep-provided other libraries
@@ -45,12 +78,11 @@ class Subversion <Formula
end
system "./configure", *args
-
system "make"
system "make install"
if ARGV.include? "--java"
- ENV.j1
+ ENV.j1 # This build isn't parallel safe
system "make javahl"
system "make install-javahl"
end