<commit_before>require 'formula'

class Couchdb <Formula
  url 'git://github.com/apache/couchdb.git'
  homepage "http://couchdb.apache.org/"
  version "0.11.0"
  @specs = {:tag => "origin/tags/0.11.0"}

  depends_on 'spidermonkey'
  depends_on 'icu4c'
  depends_on 'erlang'

  def install
    erlang = Formula.factory "erlang"
    js = Formula.factory "spidermonkey"
    system "./bootstrap" if File.exists? "bootstrap"
    system "./configure", "--prefix=#{prefix}",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}",
                          "--with-erlang=#{erlang.lib}/erlang/usr/include",
                          "--with-js-include=#{js.include}",
                          "--with-js-lib=#{js.lib}"
    system "make"
    system "make install"

    (lib+'couchdb/bin/couchjs').chmod 0755
    (var+'lib/couchdb').mkpath
    (var+'log/couchdb').mkpath
  end<commit_msg>CouchDB was not finding Erlang<commit_after>require 'formula'

class Couchdb <Formula
  url 'git://github.com/apache/couchdb.git'
  homepage "http://couchdb.apache.org/"
  version "0.11.0"
  @specs = {:tag => "origin/tags/0.11.0"}

  depends_on 'spidermonkey'
  depends_on 'icu4c'
  depends_on 'erlang'

  def install
    system "./bootstrap" if File.exists? "bootstrap"
    system "./configure", "--prefix=#{prefix}",
                          "--localstatedir=#{var}",
                          "--sysconfdir=#{etc}",
                          "--with-erlang=#{HOMEBREW_PREFIX}/lib/erlang/usr/include",
                          "--with-js-include=#{HOMEBREW_PREFIX}/include",
                          "--with-js-lib=#{HOMEBREW_PREFIX}/lib"
    system "make"
    system "make install"

    (lib+'couchdb/bin/couchjs').chmod 0755
    (var+'lib/couchdb').mkpath
    (var+'log/couchdb').mkpath
  end
{'fraction_non_alphanumeric': 0.16776315789473684, 'fraction_numerical': 0.01425438596491228, 'mean_word_length': 2.151986183074266, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7189502', 'n_tokens_mistral': 632, 'n_tokens_neox': 618, 'n_words': 99}