<commit_before>require 'formula'

class Valgrind < Formula
  homepage 'http://www.valgrind.org/'

  # Valgrind 3.7.0 drops support for OS X 10.5
  if MACOS_VERSION >= 10.6
    url 'http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2'
    md5 'a855fda56edf05614f099dca316d1775'
  else
    url "http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2"
    md5 "2c3aa122498baecc9d69194057ca88f5"
  end

  skip_clean 'lib'

  def install
    args = ["--prefix=#{prefix}", "--mandir=#{man}"]
    args << "--enable-only64bit" << "--build=amd64-darwin" if MacOS.prefer_64_bit?

    system "./configure", *args
    system "make"
    system "make install"
  end

  def test
    system "valgrind ls -l"
  end
end<commit_msg>Valgrind: fix build on 32-bit Snow Leopard<commit_after>require 'formula'

class Valgrind < Formula
  homepage 'http://www.valgrind.org/'

  # Valgrind 3.7.0 drops support for OS X 10.5
  if MACOS_VERSION >= 10.6
    url 'http://valgrind.org/downloads/valgrind-3.7.0.tar.bz2'
    md5 'a855fda56edf05614f099dca316d1775'
  else
    url "http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2"
    md5 "2c3aa122498baecc9d69194057ca88f5"
  end

  skip_clean 'lib'

  def install
    args = ["--prefix=#{prefix}", "--mandir=#{man}"]
    if MacOS.prefer_64_bit?
      args << "--enable-only64bit" << "--build=amd64-darwin"
    else
      args << "--enable-only32bit"
    end

    system "./configure", *args
    system "make"
    system "make install"
  end

  def test
    system "valgrind ls -l"
  end
end
{'fraction_non_alphanumeric': 0.14228987425545997, 'fraction_numerical': 0.08868299139642621, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1025874', 'n_tokens_mistral': 683, 'n_tokens_neox': 603, 'n_words': 123}