<commit_before>{ fetchurl, stdenv, qt4Support ? false, qt4 ? null
, cairo, freetype, fontconfig, zlib, libjpeg
, pkgconfig, glib, gtk }:

assert qt4Support -> (qt4 != null);

stdenv.mkDerivation rec {
  name = "poppler-0.10.4";

  src = fetchurl {
    url = "http://poppler.freedesktop.org/${name}.tar.gz";
    sha256 = "15c53cn8ljhas0fbirp9s8sbgmaxpzg697c48zsdnz8zwm797gs1";
  };

  buildInputs = [pkgconfig zlib glib cairo freetype fontconfig libjpeg gtk]
    ++ (if qt4Support then [qt4] else []);

  configureFlags = "--enable-shared --disable-static --enable-exceptions
    --enable-cairo --enable-splash --enable-poppler-glib --enable-zlib "
    + (if qt4Support then "--enable-qt-poppler" else "--disable-qt-poppler");

  patches = [ ./GDir-const.patch ./use_exceptions.patch ];

  preConfigure = "sed -e '/jpeg_incdirs/s@/usr@${libjpeg}@' -i configure";

  doCheck = true;

  meta = {
    homepage = http://poppler.freedesktop.org/;
    description = "Poppler, a PDF rendering library";

    longDescription = ''
      Poppler is a PDF rendering library based on the xpdf-3.0 code base.
    '';<commit_msg>Poppler: Disable test suite when `qt4Support' is true.<commit_after>{ fetchurl, stdenv, qt4Support ? false, qt4 ? null
, cairo, freetype, fontconfig, zlib, libjpeg
, pkgconfig, glib, gtk }:

assert qt4Support -> (qt4 != null);

stdenv.mkDerivation rec {
  name = "poppler-0.10.4";

  src = fetchurl {
    url = "http://poppler.freedesktop.org/${name}.tar.gz";
    sha256 = "15c53cn8ljhas0fbirp9s8sbgmaxpzg697c48zsdnz8zwm797gs1";
  };

  buildInputs = [pkgconfig zlib glib cairo freetype fontconfig libjpeg gtk]
    ++ (if qt4Support then [qt4] else []);

  configureFlags = "--enable-shared --disable-static --enable-exceptions
    --enable-cairo --enable-splash --enable-poppler-glib --enable-zlib "
    + (if qt4Support then "--enable-qt-poppler" else "--disable-qt-poppler");

  patches = [ ./GDir-const.patch ./use_exceptions.patch ];

  preConfigure = "sed -e '/jpeg_incdirs/s@/usr@${libjpeg}@' -i configure";

  # XXX: The Poppler/Qt4 test suite refers to non-existent PDF files
  # such as `../../../test/unittestcases/UseNone.pdf'.
  doCheck = !qt4Support;

  meta = {
    homepage = http://poppler.freedesktop.org/;
    description = "Poppler, a PDF rendering library";

    longDescription = ''
      Poppler is a PDF rendering library based on the xpdf-3.0 code base.
    '';
{'fraction_non_alphanumeric': 0.14791666666666667, 'fraction_numerical': 0.029583333333333333, 'mean_word_length': 3.373406193078324, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7241008', 'n_tokens_mistral': 916, 'n_tokens_neox': 866, 'n_words': 200}