2011-07-11 14:04:38 +01:00
|
|
|
{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib
|
2013-02-12 20:40:20 +00:00
|
|
|
, libjpeg, curl, libpthreadstubs, xorg, openjpeg
|
|
|
|
, libxml2, pkgconfig, cmake, lcms2
|
|
|
|
, gtkSupport ? false, glib ? null, gtk3 ? null # gtk2 no longer accepted
|
2011-07-11 14:04:38 +01:00
|
|
|
, qt4Support ? false, qt4 ? null
|
|
|
|
}:
|
2008-07-17 16:02:57 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-02-12 20:40:20 +00:00
|
|
|
name = "poppler-0.22.1";
|
2008-07-17 16:02:57 +01: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";
|
2013-02-12 20:40:20 +00:00
|
|
|
sha256 = "1h4p241k7ysm7mb8wgwi7ilp69z297d7ql5padb0dnmzq39sddhj";
|
2009-02-20 23:43:29 +00:00
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2013-02-12 20:40:20 +00: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 14:04:38 +01:00
|
|
|
]
|
2013-02-12 20:40:20 +00:00
|
|
|
++ stdenv.lib.optionals gtkSupport [ glib /*gtk3*/ ]
|
2011-07-11 14:04:38 +01:00
|
|
|
++ stdenv.lib.optional qt4Support qt4;
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ 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 16:02:57 +01:00
|
|
|
|
2011-09-19 09:35:30 +01:00
|
|
|
patches = [ ./datadir_env.patch ];
|
|
|
|
|
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 14:04:38 +01:00
|
|
|
#doCheck = !qt4Support;
|
2010-12-14 13:30:06 +00:00
|
|
|
checkTarget = "test";
|
2008-07-17 16:02:57 +01:00
|
|
|
|
2011-07-11 14:04:38 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-07-17 16:02:57 +01: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 16:02:57 +01:00
|
|
|
license = "GPLv2";
|
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
}
|