2011-07-11 13:04:38 +00:00
|
|
|
{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib
|
|
|
|
, libjpeg, pixman, curl, libpthreadstubs, libXau, libXdmcp, openjpeg
|
|
|
|
, libxml2, pkgconfig, cmake, lcms
|
|
|
|
, gtkSupport ? false, glib ? null, gtk ? null
|
|
|
|
, qt4Support ? false, qt4 ? null
|
|
|
|
}:
|
2008-07-17 15:02:57 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-07-11 13:04:38 +00:00
|
|
|
name = "poppler-0.16.7";
|
2008-07-17 15:02:57 +00:00
|
|
|
|
2009-02-20 23:43:29 +00:00
|
|
|
src = fetchurl {
|
2010-12-14 13:30:06 +00:00
|
|
|
url = "${meta.homepage}${name}.tar.gz";
|
2011-07-11 13:04:38 +00:00
|
|
|
sha256 = "1k9by922qkn9pkkf03jjxxqhp4s0gmsgs6c8f4m19m1l5npyid7s";
|
2009-02-20 23:43:29 +00:00
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2011-07-11 13:04:38 +00:00
|
|
|
propagatedBuildInputs =
|
|
|
|
[ zlib cairo freetype fontconfig libjpeg lcms pixman curl
|
|
|
|
libpthreadstubs libXau libXdmcp openjpeg libxml2 stdenv.gcc.libc
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optionals gtkSupport [ glib gtk ]
|
|
|
|
++ stdenv.lib.optional qt4Support qt4;
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2010-12-14 13:30:06 +00:00
|
|
|
buildInputs = [ pkgconfig cmake ];
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2010-12-14 13:30:06 +00:00
|
|
|
cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON";
|
2008-07-17 15:02:57 +00:00
|
|
|
|
2009-02-21 21:53:50 +00:00
|
|
|
# XXX: The Poppler/Qt4 test suite refers to non-existent PDF files
|
|
|
|
# such as `../../../test/unittestcases/UseNone.pdf'.
|
2011-07-11 13:04:38 +00:00
|
|
|
#doCheck = !qt4Support;
|
2010-12-14 13:30:06 +00:00
|
|
|
checkTarget = "test";
|
2008-07-17 15:02:57 +00:00
|
|
|
|
2011-07-11 13:04:38 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-07-17 15:02:57 +00:00
|
|
|
meta = {
|
|
|
|
homepage = http://poppler.freedesktop.org/;
|
|
|
|
description = "Poppler, a PDF rendering library";
|
2009-02-20 23:43:29 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
|
|
|
|
'';
|
|
|
|
|
2010-12-14 13:30:06 +00:00
|
|
|
platforms = if qt4Support
|
|
|
|
then qt4.meta.platforms
|
|
|
|
else stdenv.lib.platforms.all;
|
|
|
|
|
2008-07-17 15:02:57 +00:00
|
|
|
license = "GPLv2";
|
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
}
|