2008-07-17 15:02:57 +00:00
|
|
|
{ fetchurl, stdenv, qt4Support ? false, qt4 ? null
|
|
|
|
, cairo, freetype, fontconfig, zlib, libjpeg
|
|
|
|
, pkgconfig, glib, gtk }:
|
|
|
|
|
|
|
|
assert qt4Support -> (qt4 != null);
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2010-01-07 20:39:52 +00:00
|
|
|
name = "poppler-0.12.3";
|
2008-07-17 15:02:57 +00:00
|
|
|
|
2009-02-20 23:43:29 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://poppler.freedesktop.org/${name}.tar.gz";
|
2010-01-07 20:39:52 +00:00
|
|
|
sha256 = "1k7vilpz0ipnmw9dfpb3rqkhlm4rqcnkn3bhhp14di2h55nzwkvs";
|
2009-02-20 23:43:29 +00:00
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2009-02-20 23:43:29 +00:00
|
|
|
buildInputs = [pkgconfig zlib glib cairo freetype fontconfig libjpeg gtk]
|
2008-07-17 15:02:57 +00:00
|
|
|
++ (if qt4Support then [qt4] else []);
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2009-04-21 23:18:09 +00:00
|
|
|
configureFlags =
|
|
|
|
''
|
|
|
|
--enable-exceptions --enable-cairo --enable-splash
|
|
|
|
--enable-poppler-glib --enable-zlib --enable-xpdf-headers
|
|
|
|
''
|
2009-02-20 23:43:29 +00:00
|
|
|
+ (if qt4Support then "--enable-qt-poppler" else "--disable-qt-poppler");
|
2008-07-17 15:02:57 +00:00
|
|
|
|
2010-01-07 20:39:52 +00:00
|
|
|
patches = [ ./GDir-const.patch ];
|
2007-11-11 16:00:51 +00:00
|
|
|
|
2009-02-20 23:43:29 +00:00
|
|
|
preConfigure = "sed -e '/jpeg_incdirs/s@/usr@${libjpeg}@' -i configure";
|
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'.
|
|
|
|
doCheck = !qt4Support;
|
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.
|
|
|
|
'';
|
|
|
|
|
2008-07-17 15:02:57 +00:00
|
|
|
license = "GPLv2";
|
|
|
|
};
|
2007-11-11 16:00:51 +00:00
|
|
|
}
|