<commit_before>require "formula"

class Libwps < Formula
  homepage 'http://libwps.sourceforge.net'
  url 'http://dev-www.libreoffice.org/src/libwps-0.3.0.tar.bz2'
  sha1 '526323bd59b5f59f8533882fb455e5886bf1f6dc'

  bottle do
    cellar :any
    sha1 "8c76c7efb60f8c268f7d6e7b8a1428fdcf2e9fc4" => :mavericks
    sha1 "699410ea39b599ba65faf6741e6e8a9636dc58e3" => :mountain_lion
    sha1 "2dcfb58aee6a117f78aae21596b683abda9d399d" => :lion
  end

  depends_on 'pkg-config' => :build
  depends_on 'boost' => :build
  depends_on 'libwpd'
  depends_on 'librevenge'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          # Installing Doxygen docs trips up make install
                          "--prefix=#{prefix}", "--without-docs"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <libwps/libwps.h>
      int main() {
        return libwps::WPS_OK;
      }
    EOS
    system ENV.cc, "test.cpp", "-o", "test",
                  "-lrevenge-0.0",
                  "-I#{Formula["librevenge"].include}/librevenge-0.0",
                  "-L#{Formula["librevenge"].lib}",
                  "-lwpd-0.10",
                  "-I#{Formula["libwpd"].include}/libwpd-0.10",
                  "-L#{Formula["libwpd"].lib}",
                  "-lwps-0.3", "-I#{include}/libwps-0.3", "-L#{lib}"
    system "./test"
  end
end
<commit_msg>libwps: update 0.3.0 bottle.<commit_after>require "formula"

class Libwps < Formula
  homepage 'http://libwps.sourceforge.net'
  url 'http://dev-www.libreoffice.org/src/libwps-0.3.0.tar.bz2'
  sha1 '526323bd59b5f59f8533882fb455e5886bf1f6dc'

  bottle do
    cellar :any
    revision 1
    sha1 "6da56fae08558950c9134a762f6e7491fabbb7b8" => :yosemite
    sha1 "a1785cc9c07420d3e88a7000e7b42bb96091baea" => :mavericks
  end

  depends_on 'pkg-config' => :build
  depends_on 'boost' => :build
  depends_on 'libwpd'
  depends_on 'librevenge'

  def install
    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                          # Installing Doxygen docs trips up make install
                          "--prefix=#{prefix}", "--without-docs"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <libwps/libwps.h>
      int main() {
        return libwps::WPS_OK;
      }
    EOS
    system ENV.cc, "test.cpp", "-o", "test",
                  "-lrevenge-0.0",
                  "-I#{Formula["librevenge"].include}/librevenge-0.0",
                  "-L#{Formula["librevenge"].lib}",
                  "-lwpd-0.10",
                  "-I#{Formula["libwpd"].include}/libwpd-0.10",
                  "-L#{Formula["libwpd"].lib}",
                  "-lwps-0.3", "-I#{include}/libwps-0.3", "-L#{lib}"
    system "./test"
  end
end

{'fraction_non_alphanumeric': 0.15894736842105264, 'fraction_numerical': 0.07684210526315789, 'mean_word_length': 2.236095346197503, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '629998', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1091, 'n_words': 168}