diff options
| author | Dan Fabulich | 2011-11-04 16:02:58 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-04 12:09:53 -0800 |
| commit | d89bf83e75dc62914b4a164c030de42b8d471505 (patch) | |
| tree | 8f5be877c0c3281d10286b455319ec233b2fbb19 /Library/Formula | |
| parent | 9b8b9dfcad075a379ee5e17012a69992c6ddf083 (diff) | |
| download | homebrew-d89bf83e75dc62914b4a164c030de42b8d471505.tar.bz2 | |
Subversion to 1.7.2
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/subversion.rb | 80 |
1 files changed, 17 insertions, 63 deletions
diff --git a/Library/Formula/subversion.rb b/Library/Formula/subversion.rb index 706b19bfd..8bc206d79 100644 --- a/Library/Formula/subversion.rb +++ b/Library/Formula/subversion.rb @@ -1,28 +1,22 @@ require 'formula' -def build_java?; ARGV.include? "--java"; end -def build_perl?; ARGV.include? "--perl"; end -def build_python?; ARGV.include? "--python"; end -def build_ruby?; ARGV.include? "--ruby"; end -def build_universal?; ARGV.build_universal?; end -def with_unicode_path?; ARGV.include? '--unicode-path'; end - -# On 10.5 we need newer versions of apr, neon etc. -# On 10.6 we only need a newer version of neon -class SubversionDeps < Formula - url 'http://subversion.tigris.org/downloads/subversion-deps-1.6.17.tar.bz2' - sha1 'ebfda3416c09a91dbcf744a22ea83ed827ad3495' -end +def build_java?; ARGV.include? "--java"; end +def build_perl?; ARGV.include? "--perl"; end +def build_python?; ARGV.include? "--python"; end +def build_ruby?; ARGV.include? "--ruby"; end class Subversion < Formula homepage 'http://subversion.apache.org/' - url 'http://subversion.tigris.org/downloads/subversion-1.6.17.tar.bz2' - sha1 '6e3ed7c87d98fdf5f0a999050ab601dcec6155a1' + url 'http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.2.tar.bz2' + sha1 '8c0824aeb7f42da1ff4f7cd296877af7f59812bb' depends_on 'pkg-config' => :build - # On Snow Leopard, build a new neon. For Leopard, the deps above include this. - depends_on 'neon' if MacOS.snow_leopard? + # If Subversion can use the Lion versions of these, please + # open an issue with a patch. Build against Homebrewed versions + # for consistency. - @adamv + depends_on 'neon' + depends_on 'sqlite' def options [ @@ -31,30 +25,9 @@ class Subversion < Formula ['--python', 'Build Python bindings.'], ['--ruby', 'Build Ruby bindings.'], ['--universal', 'Build as a Universal Intel binary.'], - ['--unicode-path', 'Include support for OS X unicode (but see caveats!)'] ] end - def patches - # Patch to find Java headers - p = { :p0 => - "http://trac.macports.org/export/73004/trunk/dports/devel/subversion-javahlbindings/files/patch-configure.diff" - } - - # Patch for subversion handling of OS X Unicode paths (see caveats) - if with_unicode_path? - p[:p1] = "https://gist.github.com/raw/434424/subversion-unicode-path.patch" - end - - return p - end - - def setup_leopard - # Slot dependencies into place - d=Pathname.getwd - SubversionDeps.new.brew { d.install Dir['*'] } - end - def check_neon_arch # Check that Neon was built universal if we are building w/ --universal neon = Formula.factory('neon') @@ -69,7 +42,7 @@ class Subversion < Formula def install if build_java? - unless build_universal? + unless ARGV.build_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 subversion --universal --java" @@ -80,12 +53,9 @@ class Subversion < Formula end end - ENV.universal_binary if build_universal? - - if MacOS.leopard? - setup_leopard - else - check_neon_arch if build_universal? + if ARGV.build_universal? + ENV.universal_binary + check_neon_arch end # Use existing system zlib @@ -95,7 +65,7 @@ class Subversion < Formula "--prefix=#{prefix}", "--with-ssl", "--with-zlib=/usr", - "--with-sqlite=/usr", + "--with-sqlite=/usr/local", # use our neon, not OS X's "--disable-neon-version-check", "--disable-mod-activation", @@ -104,10 +74,6 @@ class Subversion < Formula args << "--enable-javahl" << "--without-jikes" if build_java? args << "--with-ruby-sitedir=#{lib}/ruby" if build_ruby? - args << "--with-unicode-path" if with_unicode_path? - - # Undo a bit of the MacPorts patch - inreplace "configure", "@@DESTROOT@@/", "" system "./configure", *args system "make" @@ -121,7 +87,7 @@ class Subversion < Formula if build_perl? ENV.j1 # This build isn't parallel safe # Remove hard-coded ppc target, add appropriate ones - if build_universal? + if ARGV.build_universal? arches = "-arch x86_64 -arch i386" elsif MacOS.leopard? arches = "-arch i386" @@ -160,18 +126,6 @@ class Subversion < Formula def caveats s = "" - if with_unicode_path? - s += <<-EOS.undent - This unicode-path version implements a hack to deal with composed/decomposed - unicode handling on Mac OS X which is different from linux and windows. - It is an implementation of solution 1 from - http://svn.collab.net/repos/svn/trunk/notes/unicode-composition-for-filenames - which _WILL_ break some setups. Please be sure you understand what you - are asking for when you install this version. - - EOS - end - if build_python? s += <<-EOS.undent You may need to add the Python bindings to your PYTHONPATH from: |
