2011-07-11 15:04:38 +02:00
|
|
|
{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib
|
2013-02-12 21:40:20 +01:00
|
|
|
, libjpeg, curl, libpthreadstubs, xorg, openjpeg
|
|
|
|
, libxml2, pkgconfig, cmake, lcms2
|
|
|
|
, gtkSupport ? false, glib ? null, gtk3 ? null # gtk2 no longer accepted
|
2011-07-11 15:04:38 +02:00
|
|
|
, qt4Support ? false, qt4 ? null
|
|
|
|
}:
|
2008-07-17 17:02:57 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-02-12 21:40:20 +01:00
|
|
|
name = "poppler-0.22.1";
|
2008-07-17 17:02:57 +02:00
|
|
|
|
2009-02-21 00:43:29 +01:00
|
|
|
src = fetchurl {
|
2010-12-14 14:30:06 +01:00
|
|
|
url = "${meta.homepage}${name}.tar.gz";
|
2013-02-12 21:40:20 +01:00
|
|
|
sha256 = "1h4p241k7ysm7mb8wgwi7ilp69z297d7ql5padb0dnmzq39sddhj";
|
2009-02-21 00:43:29 +01:00
|
|
|
};
|
2007-11-11 17:00:51 +01:00
|
|
|
|
2013-02-12 21:40:20 +01:00
|
|
|
propagatedBuildInputs = with xorg;
|
|
|
|
[ zlib cairo freetype fontconfig libjpeg lcms2 curl
|
|
|
|
libpthreadstubs libxml2 stdenv.gcc.libc
|
|
|
|
libXau libXdmcp libxcb libXrender libXext
|
|
|
|
#openjpeg # not detected
|
2011-07-11 15:04:38 +02:00
|
|
|
]
|
2013-02-12 21:40:20 +01:00
|
|
|
++ stdenv.lib.optionals gtkSupport [ glib /*gtk3*/ ]
|
2011-07-11 15:04:38 +02:00
|
|
|
++ stdenv.lib.optional qt4Support qt4;
|
2007-11-11 17:00:51 +01:00
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
2007-11-11 17:00:51 +01:00
|
|
|
|
2010-12-14 14:30:06 +01:00
|
|
|
cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON";
|
2008-07-17 17:02:57 +02:00
|
|
|
|
2011-09-19 10:35:30 +02:00
|
|
|
patches = [ ./datadir_env.patch ];
|
|
|
|
|
2009-02-21 22:53:50 +01:00
|
|
|
# XXX: The Poppler/Qt4 test suite refers to non-existent PDF files
|
|
|
|
# such as `../../../test/unittestcases/UseNone.pdf'.
|
2011-07-11 15:04:38 +02:00
|
|
|
#doCheck = !qt4Support;
|
2010-12-14 14:30:06 +01:00
|
|
|
checkTarget = "test";
|
2008-07-17 17:02:57 +02:00
|
|
|
|
2011-07-11 15:04:38 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-07-17 17:02:57 +02:00
|
|
|
meta = {
|
|
|
|
homepage = http://poppler.freedesktop.org/;
|
|
|
|
description = "Poppler, a PDF rendering library";
|
2009-02-21 00:43:29 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
|
|
|
|
'';
|
|
|
|
|
2010-12-14 14:30:06 +01:00
|
|
|
platforms = if qt4Support
|
|
|
|
then qt4.meta.platforms
|
|
|
|
else stdenv.lib.platforms.all;
|
|
|
|
|
2008-07-17 17:02:57 +02:00
|
|
|
license = "GPLv2";
|
|
|
|
};
|
2007-11-11 17:00:51 +01:00
|
|
|
}
|