<commit_before>require 'formula'

class Symphony < Formula
  homepage 'http://www.coin-or.org/projects/SYMPHONY.xml'
  url 'http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz'
  md5 '8c34f9fa49ebff325b984408ff1f92fc'

  def options
    [
     ["--enable-openmp", "Enable openmp support"],
     ["--with-gmpl", "Add in GNU Modeling Lang. support via GLPK"]
    ]
  end

  def install
    args = ["--disable-debug", "--disable-dependency-tracking",
            "--enable-shared=no", # can't get shared libs to work
            "--enable-static-executable",
            "--prefix=#{prefix}"]

    if ARGV.include? "--with-gmpl"
      # Symphony uses a patched version of GLPK for reading MPL files.
      # Use a private version rather than require the Homebrew version of GLPK.
      cd 'ThirdParty/Glpk' do
        system "./get.Glpk"
      end
      dir_glpk = Pathname.getwd + 'ThirdParty/Glpk/glpk/src'
      ENV.append "CPPFLAGS", "-I#{dir_glpk}"
      ENV.append "CDEFS", "-DUSE_GLPMPL"
      args << "--with-gmpl"
    end

    if ARGV.include? "--enable-openmp"
      inreplace 'SYMPHONY/config', /^SYM_COMPILE_IN_LP = TRUE/, "SYM_COMPILE_IN_LP = FALSE"
      args << "--enable-openmp"
    end

    system "./configure",  *args
    system "make"
    system "make install"
  end
end
<commit_msg>symphony: use buildpath instead of Pathname.pwd<commit_after>require 'formula'

class Symphony < Formula
  homepage 'http://www.coin-or.org/projects/SYMPHONY.xml'
  url 'http://www.coin-or.org/download/source/SYMPHONY/SYMPHONY-5.3.3.tgz'
  md5 '8c34f9fa49ebff325b984408ff1f92fc'

  def options
    [
     ["--enable-openmp", "Enable openmp support"],
     ["--with-gmpl", "Add in GNU Modeling Lang. support via GLPK"]
    ]
  end

  def install
    args = ["--disable-debug", "--disable-dependency-tracking",
            "--enable-shared=no", # can't get shared libs to work
            "--enable-static-executable",
            "--prefix=#{prefix}"]

    if ARGV.include? "--with-gmpl"
      # Symphony uses a patched version of GLPK for reading MPL files.
      # Use a private version rather than require the Homebrew version of GLPK.
      cd 'ThirdParty/Glpk' do
        system "./get.Glpk"
      end

      ENV.append "CPPFLAGS", "-I#{buildpath}/ThirdParty/Glpk/glpk/src"
      ENV.append "CDEFS", "-DUSE_GLPMPL"
      args << "--with-gmpl"
    end

    if ARGV.include? "--enable-openmp"
      inreplace 'SYMPHONY/config', /^SYM_COMPILE_IN_LP = TRUE/, "SYM_COMPILE_IN_LP = FALSE"
      args << "--enable-openmp"
    end

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

{'fraction_non_alphanumeric': 0.14068441064638784, 'fraction_numerical': 0.016730038022813688, 'mean_word_length': 2.5506072874493926, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4183198', 'n_tokens_mistral': 972, 'n_tokens_neox': 912, 'n_words': 216}