<commit_before>require 'formula'

class Exonerate < Formula
  homepage 'http://www.ebi.ac.uk/~guy/exonerate/'
  #doi '10.1186/1471-2105-6-31'
  #tag "bioinformatics"
  url 'http://www.ebi.ac.uk/~guy/exonerate/exonerate-2.2.0.tar.gz'
  sha1 'ad4de207511e4d421e5cc28dda2261421c515bf0'

  devel do
    url "http://www.ebi.ac.uk/~guy/exonerate/exonerate-2.4.0.tar.gz"
    sha1 "5b119c0aef0fa08c3f4a11014544f2ac5ca8afde"
  end

  depends_on 'pkg-config' => :build
  depends_on 'glib'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    ENV.j1
    system "make"
    system "make install"
  end

  test do
    system "#{bin}/exonerate --version |grep exonerate"
  end
end<commit_msg>exonerate 2.2.0: Fix undefined reference error<commit_after>require 'formula'

class Exonerate < Formula
  homepage 'http://www.ebi.ac.uk/~guy/exonerate/'
  #doi '10.1186/1471-2105-6-31'
  #tag "bioinformatics"
  url 'http://www.ebi.ac.uk/~guy/exonerate/exonerate-2.2.0.tar.gz'
  sha1 'ad4de207511e4d421e5cc28dda2261421c515bf0'

  devel do
    url "http://www.ebi.ac.uk/~guy/exonerate/exonerate-2.4.0.tar.gz"
    sha1 "5b119c0aef0fa08c3f4a11014544f2ac5ca8afde"
  end

  depends_on 'pkg-config' => :build
  depends_on 'glib'

  def install
    # Fix the following error. This issue is fixed upstream in 2.4.0.
    # /usr/bin/ld: socket.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
    # /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
    inreplace "configure", 'LDFLAGS="$LDFLAGS -lpthread"', 'LIBS="$LIBS -lpthread"' unless build.devel?

    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          "--prefix=#{prefix}"
    ENV.j1
    system "make"
    system "make install"
  end

  test do
    system "#{bin}/exonerate --version |grep exonerate"
  end
end
{'fraction_non_alphanumeric': 0.1455958549222798, 'fraction_numerical': 0.08186528497409326, 'mean_word_length': 3.152688172043011, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '2298898', 'n_tokens_mistral': 872, 'n_tokens_neox': 754, 'n_words': 139}