<commit_before>require 'formula'

class Subversion <Formula
  @url='http://subversion.tigris.org/downloads/subversion-1.6.5.tar.bz2'
  @homepage='http://subversion.tigris.org/'
  @md5='1a53a0e72bee0bf814f4da83a9b6a636'

  depends_on 'neon'

  def install
    # Force LDFLAGS to load the HOMEBREW lib directory first. Necessary because SVN configure will
    # otherwise link to OS X neon libs in /usr/lib (and ignore --with-neon anyway)
    ENV['LDFLAGS'] += " -L#{Formula.factory('neon').lib}"

    # Use existing system zlib, dep-provided other libraries
    # Don't mess with Apache modules (since we're not sudo)
    system "./configure", "--disable-debug",
                          "--prefix=#{prefix}",
                          "--with-ssl",
                          "--with-zlib=/usr/lib",
                          "--disable-mod-activation",
                          "--without-apache-libexecdir",
                          "--without-berkeley-db"
    system "make"
    system "make install"
  end
end<commit_msg>Update Subversion to 1.6.6 and fix on Leopard.<commit_after>require 'formula'

# This formula is forked between 10.5 and 10.6.
# On 10.6, we can make use of system-install deps.
# (At least, until Subversion 1.7 comes out and the system deps break again.)
#
# On 10.5, the provided Subversion is too old, so we go ahead and
# make the deps ourselves.

class SubversionDeps <Formula
  url 'http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.bz2'
  md5 '8ec2a0daea27f86a75939d3ed09618a0'
  
  def keg_only?
    "Subversion dependencies needed on 10.5."
  end
end

class Subversion <Formula
  url 'http://subversion.tigris.org/downloads/subversion-1.6.6.tar.bz2'
  homepage 'http://subversion.tigris.org/'
  md5 'e5109da756d74c7d98f683f004a539af'

  # Only need this on Snow Leopard; for Leopard the deps package 
  # builds it.
  if MACOS_VERSION >= 10.6
    depends_on 'neon'
  end

  def setup_snow_leopard
    # Force LDFLAGS to load the HOMEBREW lib directory first. Necessary because SVN configure will
    # otherwise link to OS X neon libs in /usr/lib (and ignore --with-neon anyway)
    ENV['LDFLAGS'] += " -L#{Formula.factory('neon').lib}"
  end
  
  def setup_leopard
    # Slot dependencies into place
    d=Pathname.getwd
    SubversionDeps.new.brew do
      d.install Dir['*']
    end
  end

  def install
    if MACOS_VERSION >= 10.6
      setup_snow_leopard
    else
      setup_leopard
    end

    # Use existing system zlib
    # Use dep-provided other libraries
    # Don't mess with Apache modules (since we're not sudo)
    system "./configure", "--disable-debug",
                          "--prefix=#{prefix}",
                          "--with-ssl",
                          "--with-zlib=/usr/lib",
                          "--disable-mod-activation",
                          "--without-apache-libexecdir",
                          "--without-berkeley-db"
    system "make"
    system "make install"
  end
end
{'fraction_non_alphanumeric': 0.1105510752688172, 'fraction_numerical': 0.03326612903225806, 'mean_word_length': 2.232356134636265, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2842080', 'n_tokens_mistral': 1025, 'n_tokens_neox': 939, 'n_words': 259}