<commit_before>require 'formula'

class Libconfig < Formula
  desc "Configuration file processing library"
  homepage 'http://www.hyperrealm.com/libconfig/'
  url 'http://www.hyperrealm.com/libconfig/libconfig-1.4.9.tar.gz'
  sha1 'b7a3c307dfb388e57d9a35c7f13f6232116930ec'

  bottle do
    cellar :any
    revision 1
    sha1 "28fca89d671c8ebf4f97ac7a6706675e8b957b2f" => :yosemite
    sha1 "21f6d02c17ab809a63b076dec69d0bc5dbc8f605" => :mavericks
  end

  option :universal

  def install
    ENV.universal_binary if build.universal?
    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
    system "make"
    system "make install"
  end
end<commit_msg>libconfig 1.5<commit_after>class Libconfig < Formula
  desc "Configuration file processing library"
  homepage "http://www.hyperrealm.com/libconfig/"
  url "http://www.hyperrealm.com/libconfig/libconfig-1.5.tar.gz"
  sha256 "e31daa390d8e4461c8830512fe2e13ba1a3d6a02a2305a02429eec61e68703f6"

  bottle do
    cellar :any
    revision 1
    sha1 "28fca89d671c8ebf4f97ac7a6706675e8b957b2f" => :yosemite
    sha1 "21f6d02c17ab809a63b076dec69d0bc5dbc8f605" => :mavericks
  end

  head do
    url "https://github.com/hyperrealm/libconfig.git"
    depends_on "automake" => :build
    depends_on "autoconf" => :build
    depends_on "libtool" => :build
  end

  option :universal

  def install
    ENV.universal_binary if build.universal?
    system "autoreconf", "-i" if build.head?
    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<-EOS.undent
      #include <libconfig.h>
      int main() {
        config_t cfg;
        config_init(&cfg);
        config_destroy(&cfg);
        return 0;
      }
    EOS
    system ENV.cc, "-I#{include}", "-L#{lib}", "-lconfig",
           testpath/"test.c", "-o", testpath/"test"
    system "./test"
  end
end
{'fraction_non_alphanumeric': 0.12448132780082988, 'fraction_numerical': 0.09336099585062241, 'mean_word_length': 3.444700460829493, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 4, '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': '6570882', 'n_tokens_mistral': 820, 'n_tokens_neox': 727, 'n_words': 135}