<commit_before>require 'formula'

class Djview4 < Formula
  url 'http://sourceforge.net/projects/djvu/files/DjView/4.6/djview4-4.6.tar.gz'
  homepage 'http://djvu.sourceforge.net/djview4.html'
  md5 '642105970467cf0864c0073140d1fa11'

  depends_on 'djvulibre'
  depends_on 'qt'

  def install
    # Added bug upstream to fix this:
    # https://sourceforge.net/tracker/?func=detail&aid=3146507&group_id=32953&atid=406583
    inreplace "Makefile.in" do |s|
       s.gsub! '${INSTALL_PROGRAM} src/djview ${DESTDIR}${bindir}/djview4', '/bin/cp -r src/djview.app ${DESTDIR}${prefix}'
    end
    system "./configure", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-x=no",
                          "--disable-desktopfiles"
    system "make"
    system "make install"
    # Remove bad symlink created by make install
    bin.rmtree
  end

  def caveats; <<-EOS
    djview.app was installed in:
      #{prefix}

    To symlink into ~/Applications, you can do:
      brew linkapps
    EOS
  end
end<commit_msg>djview4: add missing pkg-config dependency<commit_after>require 'formula'

class Djview4 < Formula
  url 'http://sourceforge.net/projects/djvu/files/DjView/4.6/djview4-4.6.tar.gz'
  homepage 'http://djvu.sourceforge.net/djview4.html'
  md5 '642105970467cf0864c0073140d1fa11'

  depends_on 'pkg-config' => :build
  depends_on 'djvulibre'
  depends_on 'qt'

  def install
    # Added bug upstream to fix this:
    # https://sourceforge.net/tracker/?func=detail&aid=3146507&group_id=32953&atid=406583
    inreplace "Makefile.in" do |s|
       s.gsub! '${INSTALL_PROGRAM} src/djview ${DESTDIR}${bindir}/djview4', '/bin/cp -r src/djview.app ${DESTDIR}${prefix}'
    end
    system "./configure", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--prefix=#{prefix}",
                          "--with-x=no",
                          "--disable-desktopfiles"
    system "make"
    system "make install"
    # Remove bad symlink created by make install
    bin.rmtree
  end

  def caveats; <<-EOS
    djview.app was installed in:
      #{prefix}

    To symlink into ~/Applications, you can do:
      brew linkapps
    EOS
  end
end
{'fraction_non_alphanumeric': 0.13147583804962995, 'fraction_numerical': 0.04658249891162386, 'mean_word_length': 2.414561664190193, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 4, 'https://': 2, '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': '6392228', 'n_tokens_mistral': 879, 'n_tokens_neox': 781, 'n_words': 162}