<commit_before>class Libmspub < Formula
  desc "Interpret and import Microsoft Publisher content"
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
  url "http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.2.tar.xz"
  sha256 "b0baabf82d20c08ad000e80fa02154ce2f2ffde1ee60240d6e3a917c3b35560f"

  bottle do
    cellar :any
    revision 1
    sha256 "36884363243b833417a5e67d7736ec9248c0f51690147cb1281ad43131c951ec" => :yosemite
    sha256 "9edf701810bf5a7759a0d904b850499f8844a9832c2e8e1586a06609863d743d" => :mavericks
    sha256 "8c1dd1e2707a7f0846c16ff631be7158043b8e24485bcc5f9a1a8d249831c074" => :mountain_lion
  end

  depends_on "pkg-config" => :build
  depends_on "boost" => :build
  depends_on "libwpg" => :build
  depends_on "libwpd"
  depends_on "icu4c"
  depends_on "librevenge"

  def install
    system "./configure", "--without-docs",
                          "--disable-dependency-tracking",
                          "--enable-static=no",
                          "--disable-werror",
                          "--disable-tests",
                          "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
    #include <librevenge-stream/librevenge-stream.h>
    #include <libmspub/MSPUBDocument.h>
    int main() {<commit_msg>libmspub: revision for icu4c<commit_after>class Libmspub < Formula
  desc "Interpret and import Microsoft Publisher content"
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libmspub"
  url "http://dev-www.libreoffice.org/src/libmspub/libmspub-0.1.2.tar.xz"
  sha256 "b0baabf82d20c08ad000e80fa02154ce2f2ffde1ee60240d6e3a917c3b35560f"
  revision 1

  bottle do
    cellar :any
    revision 1
    sha256 "36884363243b833417a5e67d7736ec9248c0f51690147cb1281ad43131c951ec" => :yosemite
    sha256 "9edf701810bf5a7759a0d904b850499f8844a9832c2e8e1586a06609863d743d" => :mavericks
    sha256 "8c1dd1e2707a7f0846c16ff631be7158043b8e24485bcc5f9a1a8d249831c074" => :mountain_lion
  end

  depends_on "pkg-config" => :build
  depends_on "boost" => :build
  depends_on "libwpg" => :build
  depends_on "libwpd"
  depends_on "icu4c"
  depends_on "librevenge"

  def install
    system "./configure", "--without-docs",
                          "--disable-dependency-tracking",
                          "--enable-static=no",
                          "--disable-werror",
                          "--disable-tests",
                          "--prefix=#{prefix}"
    system "make", "install"
  end

  test do
    (testpath/"test.cpp").write <<-EOS.undent
    #include <librevenge-stream/librevenge-stream.h>
    #include <libmspub/MSPUBDocument.h>
    int main() {
{'fraction_non_alphanumeric': 0.11008154188287621, 'fraction_numerical': 0.1430689399555226, 'mean_word_length': 2.945906432748538, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '6094536', 'n_tokens_mistral': 1244, 'n_tokens_neox': 1054, 'n_words': 147}