<commit_before>require 'formula'

class PopplerData < Formula
  url 'http://poppler.freedesktop.org/poppler-data-0.4.5.tar.gz'
  sha256 '3190bc457bafe4b158f79a08e8a3f1824031ec12acefc359e68e0f04da0f70fd'
end

class Poppler < Formula
  homepage 'http://poppler.freedesktop.org'
  url 'http://poppler.freedesktop.org/poppler-0.20.2.tar.gz'
  sha256 '2debc5034e0e85402957d84fb2674737658a3dbe8a3c631e1792e3f8c88ce369'

  option 'with-qt4', 'Build Qt backend'
  option 'with-glib', 'Build Glib backend'

  depends_on 'pkg-config' => :build

  depends_on :fontconfig
  depends_on 'openjpeg'

  depends_on 'qt' if build.include? 'with-qt4'
  depends_on 'glib' if build.include? 'with-glib'
  depends_on 'cairo' if build.include? 'with-glib' # Needs a newer Cairo build than OS X 10.6.7 provides

  def install
    if build.include? 'with-qt4'<commit_msg>poppler: Update to 0.20.5<commit_after>require 'formula'

class PopplerData < Formula
  url 'http://poppler.freedesktop.org/poppler-data-0.4.6.tar.gz'
  sha1 'f030563eed9f93912b1a546e6d87936d07d7f27d'
end

class Poppler < Formula
  homepage 'http://poppler.freedesktop.org'
  url 'http://poppler.freedesktop.org/poppler-0.20.5.tar.gz'
  sha1 '5eb351381e6d7994bdf7f09bb5c1075f41d79381'

  option 'with-qt4', 'Build Qt backend'
  option 'with-glib', 'Build Glib backend'

  depends_on 'pkg-config' => :build

  depends_on :fontconfig
  depends_on 'openjpeg'

  depends_on 'qt' if build.include? 'with-qt4'
  depends_on 'glib' if build.include? 'with-glib'
  depends_on 'cairo' if build.include? 'with-glib' # Needs a newer Cairo build than OS X 10.6.7 provides

  def install
    if build.include? 'with-qt4'
{'fraction_non_alphanumeric': 0.11682808716707022, 'fraction_numerical': 0.1053268765133172, 'mean_word_length': 4.546979865771812, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3663777', 'n_tokens_mistral': 765, 'n_tokens_neox': 680, 'n_words': 134}