<commit_before>class Supersonic < Formula
  desc "C++ library providing a column oriented query engine"
  homepage "https://code.google.com/archive/p/supersonic/"
  url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/supersonic/supersonic-0.9.4.tar.gz"
  sha256 "1592dfd2dc73f0b97298e0d25e51528dc9a94e9e7f4ab525569f63db0442d769"
  revision 9

  bottle do
    cellar :any
    sha256 "394c7505ea220272eac96246fc9d73cbc95f1bdaa7b9c20963d526b43b1d21ac" => :mojave
    sha256 "57ef2a85b81a4581e2ee83f6dd8f931015c25888333f08e16411cc4340935d86" => :high_sierra
    sha256 "22004732b50e6175ba87623313f1d4871f89db9888fcab62fb4ba8ff44fffd0c" => :sierra
    sha256 "a14e0ddc6e7ad95f12a48aeeeeaaf884b628c6affcd4ddc13cc14f72fed48b1e" => :el_capitan
  end

  depends_on "pkg-config" => :build
  depends_on "boost"
  depends_on "gflags"
  depends_on "glog"
  depends_on "protobuf"

  needs :cxx11

  def install
    ENV.cxx11

    # gflags no longer supply .pc files; supersonic's compile expects them.
    ENV["GFLAGS_CFLAGS"] = "-I#{Formula["gflags"].opt_include}"
    ENV["GFLAGS_LIBS"] = "-L#{Formula["gflags"].opt_lib} -lgflags"

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--without-re2"
    system "make", "clean"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<~EOS
      #include <iostream>
      #include <supersonic/supersonic.h>
      using std::cout;<commit_msg>supersonic: remove checks for old compilers.<commit_after>class Supersonic < Formula
  desc "C++ library providing a column oriented query engine"
  homepage "https://code.google.com/archive/p/supersonic/"
  url "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/supersonic/supersonic-0.9.4.tar.gz"
  sha256 "1592dfd2dc73f0b97298e0d25e51528dc9a94e9e7f4ab525569f63db0442d769"
  revision 9

  bottle do
    cellar :any
    sha256 "394c7505ea220272eac96246fc9d73cbc95f1bdaa7b9c20963d526b43b1d21ac" => :mojave
    sha256 "57ef2a85b81a4581e2ee83f6dd8f931015c25888333f08e16411cc4340935d86" => :high_sierra
    sha256 "22004732b50e6175ba87623313f1d4871f89db9888fcab62fb4ba8ff44fffd0c" => :sierra
    sha256 "a14e0ddc6e7ad95f12a48aeeeeaaf884b628c6affcd4ddc13cc14f72fed48b1e" => :el_capitan
  end

  depends_on "pkg-config" => :build
  depends_on "boost"
  depends_on "gflags"
  depends_on "glog"
  depends_on "protobuf"

  def install
    ENV.cxx11

    # gflags no longer supply .pc files; supersonic's compile expects them.
    ENV["GFLAGS_CFLAGS"] = "-I#{Formula["gflags"].opt_include}"
    ENV["GFLAGS_LIBS"] = "-L#{Formula["gflags"].opt_lib} -lgflags"

    system "./configure", "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--without-re2"
    system "make", "clean"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<~EOS
      #include <iostream>
      #include <supersonic/supersonic.h>
      using std::cout;
{'fraction_non_alphanumeric': 0.11527093596059114, 'fraction_numerical': 0.1438423645320197, 'mean_word_length': 3.8814102564102564, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, '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': '3787398', 'n_tokens_mistral': 1431, 'n_tokens_neox': 1217, 'n_words': 182}