3
0
Fork 0
forked from mirrors/nixpkgs

poppler: update, include qt4+cairo patches

The patches should provide smoother font rendering, like it's with poppler+gtk+cairo.
The code was taken from @mornfall f4fce48c #470, thanks.
This commit is contained in:
Vladimír Čunát 2013-04-18 20:54:47 +02:00
parent 808a5bd2d8
commit b37b73a56c
3 changed files with 32 additions and 16 deletions

View file

@ -1,7 +1,7 @@
{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib
, libjpeg, curl, libpthreadstubs, xorg, openjpeg
, libxml2, pkgconfig, cmake, lcms2
, gtkSupport ? false, glib ? null, gtk3 ? null # gtk2 no longer accepted
, glibSupport ? false, glib, gtk3Support ? false, gtk3 # gtk2 no longer accepted
, qt4Support ? false, qt4 ? null
}:
@ -17,9 +17,10 @@ stdenv.mkDerivation rec {
[ zlib cairo freetype fontconfig libjpeg lcms2 curl
libpthreadstubs libxml2 stdenv.gcc.libc
libXau libXdmcp libxcb libXrender libXext
#openjpeg # not detected
openjpeg
]
++ stdenv.lib.optionals gtkSupport [ glib /*gtk3*/ ]
++ stdenv.lib.optional glibSupport glib
++ stdenv.lib.optional gtk3Support gtk3
++ stdenv.lib.optional qt4Support qt4;
nativeBuildInputs = [ pkgconfig cmake ];

View file

@ -1,32 +1,44 @@
{ fetchurl, stdenv, cairo, freetype, fontconfig, zlib
{ stdenv, fetchurl, fetchgit, cairo, freetype, fontconfig, zlib
, libjpeg, curl, libpthreadstubs, xorg, openjpeg
, libxml2, pkgconfig, cmake, lcms2
, gtkSupport ? false, glib ? null, gtk3 ? null # gtk2 no longer accepted
, glibSupport ? false, glib, gtk3Support ? false, gtk3 # gtk2 no longer accepted
, qt4Support ? false, qt4 ? null
}:
stdenv.mkDerivation rec {
name = "poppler-0.22.1";
name = "poppler-0.22.3";
src = fetchurl {
url = "${meta.homepage}${name}.tar.gz";
sha256 = "1h4p241k7ysm7mb8wgwi7ilp69z297d7ql5padb0dnmzq39sddhj";
sha256 = "0ca4jci8xmbdz4fhahdcck0cqms6ax55yggi2ih3clgrpqf96sli";
};
qtcairo_patches =
let qtcairo = fetchgit { # the version for poppler-0.22
url = "git://github.com/giddie/poppler-qt4-cairo-backend.git";
rev = "7a12c58e5cefc2b7a5179c53b387fca8963195c0";
sha256 = "1jg2d5y62d0bv206nijb63x426zfb2awy70505nx22d0fx1v1p9k";
}; in
[ "${qtcairo}/0001-Cairo-backend-added-to-Qt4-wrapper.patch"
"${qtcairo}/0002-Setting-default-Qt4-backend-to-Cairo.patch"
"${qtcairo}/0003-Forcing-subpixel-rendering-in-Cairo-backend.patch" ];
propagatedBuildInputs = with xorg;
[ zlib cairo freetype fontconfig libjpeg lcms2 curl
libpthreadstubs libxml2 stdenv.gcc.libc
libXau libXdmcp libxcb libXrender libXext
#openjpeg # not detected
openjpeg
]
++ stdenv.lib.optionals gtkSupport [ glib /*gtk3*/ ]
++ stdenv.lib.optional glibSupport glib
++ stdenv.lib.optional gtk3Support gtk3
++ stdenv.lib.optional qt4Support qt4;
nativeBuildInputs = [ pkgconfig cmake ];
cmakeFlags = "-DENABLE_XPDF_HEADERS=ON -DENABLE_LIBCURL=ON -DENABLE_ZLIB=ON";
patches = [ ./datadir_env.patch ];
patches = [ ./datadir_env.patch ] ++ stdenv.lib.optionals qt4Support qtcairo_patches;
# XXX: The Poppler/Qt4 test suite refers to non-existent PDF files
# such as `../../../test/unittestcases/UseNone.pdf'.

View file

@ -4811,17 +4811,20 @@ let
policykit = callPackage ../development/libraries/policykit { };
poppler = callPackage ../development/libraries/poppler {
gtkSupport = true;
qt4Support = false;
glibSupport = true;
gtk3Support = false;
qt4Support = false;
};
poppler_0_18 = callPackage ../development/libraries/poppler/0.18.nix {
gtkSupport = true;
qt4Support = false;
glibSupport = true;
gtk3Support = false;
qt4Support = false;
};
popplerQt4 = poppler.override {
gtkSupport = false;
qt4Support = true;
glibSupport = false;
gtk3Support = false;
qt4Support = true;
};
popt = callPackage ../development/libraries/popt { };