<commit_before>require 'formula'

class Mpfr < Formula
  url 'http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2'
  homepage 'http://www.mpfr.org/'
  md5 '238ae4a15cc3a5049b723daef5d17938'

  depends_on 'gmp'

  def options
    [["--32-bit", "Force 32-bit."]]
  end

  def install
    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]

    # Build 32-bit where appropriate, and help configure find 64-bit CPUs
    # Note: This logic should match what the GMP formula does.
    if MacOS.prefer_64_bit? and not ARGV.include? "--32-bit"
      ENV.m64
      args << "--build=x86_64-apple-darwin"
    else
      ENV.m32
      args << "--build=none-apple-darwin"
    end

    system "./configure", *args
    system "make install"
  end
end
<commit_msg>mpfr: apply upstream cumulative patch<commit_after>require 'formula'

class Mpfr < Formula
  url 'http://www.mpfr.org/mpfr-3.1.0/mpfr-3.1.0.tar.bz2'
  homepage 'http://www.mpfr.org/'
  md5 '238ae4a15cc3a5049b723daef5d17938'

  depends_on 'gmp'

  def options
    [["--32-bit", "Force 32-bit."]]
  end

  def patches
    { :p1 => "http://www.mpfr.org/mpfr-3.1.0/allpatches" }
  end

  def install
    args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]

    # Build 32-bit where appropriate, and help configure find 64-bit CPUs
    # Note: This logic should match what the GMP formula does.
    if MacOS.prefer_64_bit? and not ARGV.include? "--32-bit"
      ENV.m64
      args << "--build=x86_64-apple-darwin"
    else
      ENV.m32
      args << "--build=none-apple-darwin"
    end

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

{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.06172839506172839, 'mean_word_length': 2.69248291571754, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7341569', 'n_tokens_mistral': 676, 'n_tokens_neox': 606, 'n_words': 141}