3
0
Fork 0
forked from mirrors/nixpkgs

poppler: add _min variant that doesn't bring X stuff

This commit is contained in:
Vladimír Čunát 2015-09-17 17:54:32 +02:00
parent fa33b083eb
commit fe5c8d78a0
2 changed files with 19 additions and 11 deletions

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
, qt4Support ? false, qt4 ? null, qt5Support ? false, qt5 ? null
, minimal ? false, qt4Support ? false, qt4 ? null, qt5Support ? false, qt5 ? null
, utils ? false, suffix ? "glib"
}:
@ -16,28 +16,31 @@ stdenv.mkDerivation rec {
inherit sha256;
};
outputs = [ "out" "doc" ];
outputs = [ "out" ] ++ lib.optional (!minimal) "doc";
patches = [ ./datadir_env.patch ];
propagatedBuildInputs = with stdenv.lib;
[ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ]
# TODO: reduce propagation to necessary libs
propagatedBuildInputs = with lib;
[ zlib freetype fontconfig libjpeg lcms curl openjpeg ]
++ optional (!minimal) cairo
++ optional qt4Support qt4
++ optional qt5Support qt5.base;
nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
configureFlags =
configureFlags = with lib;
[
"--enable-xpdf-headers"
"--enable-libcurl"
"--enable-zlib"
]
++ stdenv.lib.optional (!utils) "--disable-utils";
++ optionals minimal [ "--disable-poppler-glib" "--disable-poppler-cpp" ]
++ optional (!utils) "--disable-utils";
enableParallelBuilding = true;
meta = {
meta = with lib; {
homepage = http://poppler.freedesktop.org/;
description = "A PDF rendering library";
@ -45,8 +48,8 @@ stdenv.mkDerivation rec {
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
'';
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.all;
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
license = licenses.gpl2;
platforms = platforms.all;
maintainers = with maintainers; [ ttuegel ];
};
}

View file

@ -7780,6 +7780,11 @@ let
poppler = callPackage ../development/libraries/poppler { lcms = lcms2; };
poppler_min = poppler.override { # TODO: maybe reduce even more
minimal = true;
suffix = "min";
};
poppler_qt4 = poppler.override {
qt4Support = true;
suffix = "qt4";