<commit_before>require 'formula'

class Gnuplot < Formula
  url 'http://downloads.sourceforge.net/project/gnuplot/gnuplot/4.4.2/gnuplot-4.4.2.tar.gz'
  homepage 'http://www.gnuplot.info'
  md5 'a4f0dd89f9b9334890464f687ddd9f50'

  depends_on 'pkg-config' => :build
  depends_on 'readline'
  depends_on 'gd' unless ARGV.include? "--nogd"
  depends_on 'pdflib-lite' if ARGV.include? "--pdf"

  def options
    [
      ["--pdf", "Build with pdf support."],
      ["--without-lua", "Build without lua support."],
      ["--nogd", "Build without gd support."]
    ]
  end

  def install
    ENV.x11
    args = ["--disable-debug", "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--with-readline=#{prefix}",
            "--disable-wxwidgets"]
    args << "--without-lua" if ARGV.include? "--without-lua"

    system "./configure", *args
    system "make install"
  end
end<commit_msg>gnuplot 4.4.3<commit_after>require 'formula'

class Gnuplot < Formula
  url 'http://downloads.sourceforge.net/project/gnuplot/gnuplot/4.4.3/gnuplot-4.4.3.tar.gz'
  homepage 'http://www.gnuplot.info'
  md5 '639603752996f4923bc02c895fa03b45'

  depends_on 'pkg-config' => :build
  depends_on 'readline'
  depends_on 'pango' # cairo support
  depends_on 'pdflib-lite' if ARGV.include? "--pdf"
  depends_on 'lua' unless ARGV.include? '--nolua'
  depends_on 'gd' unless ARGV.include? "--nogd"

  def options
    [
      ["--pdf", "Build with pdflib-lite support."],
      ["--nolua", "Build without lua support."],
      ["--nogd", "Build without gd support."]
    ]
  end

  def install
    # Without this I got:
    # ld: rel32 out of range in _fit_command from fit.o
    # - adamv
    ENV.j1

    # Help configure find libraries
    ENV.x11
    readline = Formula.factory 'readline'
    pdflib = Formula.factory 'pdflib-lite'
    gd = Formula.factory 'gd'

    args = ["--disable-debug", "--disable-dependency-tracking",
            "--prefix=#{prefix}",
            "--with-readline=#{readline.prefix}",
            "--disable-wxwidgets"]
    args << "--with-pdf=#{pdflib.prefix}" if ARGV.include? '--pdf'
    args << "--without-lua" if ARGV.include? "--nolua"
    if ARGV.include? '--nogd'
      args << '--without-gd'
    else
      args << "--with-gd=#{gd.prefix}"
    end

    system "./configure", *args
    system "make install"
  end
end
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.02976190476190476, 'mean_word_length': 2.6424148606811144, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4792103', 'n_tokens_mistral': 887, 'n_tokens_neox': 833, 'n_words': 183}