<commit_before>require "formula"

class Libvisio < Formula
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
  url "http://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.0.tar.xz"
  sha1 "c82e5c7ad25e513c268032cda9febd01b8879504"
  revision 2

  bottle do
    cellar :any
    sha1 "bdfcdedd23af956b9368d2efcdcdd3a3c2ae149e" => :mavericks
    sha1 "f91823c71abf65d1badc48ea249f21d6f85b9e88" => :mountain_lion
    sha1 "6aec36a1622a98013865c6d3292eb4999fdccee5" => :lion
  end

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

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

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <librevenge-stream/librevenge-stream.h>
      #include <libvisio/VisioDocument.h>
      int main() {
        librevenge::RVNGStringStream docStream(0, 0);
        libvisio::VisioDocument::isSupported(&docStream);
        return 0;<commit_msg>libvisio: bump revision for icu4c upgrade<commit_after>require "formula"

class Libvisio < Formula
  homepage "https://wiki.documentfoundation.org/DLP/Libraries/libvisio"
  url "http://dev-www.libreoffice.org/src/libvisio/libvisio-0.1.0.tar.xz"
  sha1 "c82e5c7ad25e513c268032cda9febd01b8879504"
  revision 3

  bottle do
    cellar :any
    sha1 "bdfcdedd23af956b9368d2efcdcdd3a3c2ae149e" => :mavericks
    sha1 "f91823c71abf65d1badc48ea249f21d6f85b9e88" => :mountain_lion
    sha1 "6aec36a1622a98013865c6d3292eb4999fdccee5" => :lion
  end

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

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

  test do
    (testpath/"test.cpp").write <<-EOS.undent
      #include <librevenge-stream/librevenge-stream.h>
      #include <libvisio/VisioDocument.h>
      int main() {
        librevenge::RVNGStringStream docStream(0, 0);
        libvisio::VisioDocument::isSupported(&docStream);
        return 0;
{'fraction_non_alphanumeric': 0.11952998379254456, 'fraction_numerical': 0.08225283630470016, 'mean_word_length': 3.034313725490196, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '307674', 'n_tokens_mistral': 1042, 'n_tokens_neox': 950, 'n_words': 142}