poppler: 0.56.0 → 0.62.0
This commit is contained in:
parent
c70c9649ea
commit
1f6bdeaa97
|
@ -1,24 +1,22 @@
|
||||||
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
|
{ stdenv, lib, fetchurl, cmake, ninja, pkgconfig, libiconv, libintlOrEmpty
|
||||||
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
||||||
, withData ? true, poppler_data
|
, withData ? true, poppler_data
|
||||||
, qt4Support ? false, qt4 ? null
|
|
||||||
, qt5Support ? false, qtbase ? null
|
, qt5Support ? false, qtbase ? null
|
||||||
, introspectionSupport ? false, gobjectIntrospection ? null
|
, introspectionSupport ? false, gobjectIntrospection ? null
|
||||||
, utils ? false
|
, utils ? false
|
||||||
, minimal ? false, suffix ? "glib"
|
, minimal ? false, suffix ? "glib"
|
||||||
, hostPlatform
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let # beware: updates often break cups-filters build
|
let # beware: updates often break cups-filters build
|
||||||
version = "0.56.0";
|
version = "0.62.0";
|
||||||
sha256 = "0wviayidfv2ix2ql0d4nl9r1ia6qi5kc1nybd9vjx27dk7gvm7c6";
|
mkFlag = optset: flag: "-DENABLE_${flag}=${if optset then "on" else "off"}";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "poppler-${suffix}-${version}";
|
name = "poppler-${suffix}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "${meta.homepage}/poppler-${version}.tar.xz";
|
url = "${meta.homepage}/poppler-${version}.tar.xz";
|
||||||
inherit sha256;
|
sha256 = "1ii9ly1pngyvs0aiq2wxpya08hidpl54y7nsb8b1vxnnskgp76jv";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
@ -29,36 +27,19 @@ stdenv.mkDerivation rec {
|
||||||
propagatedBuildInputs = with lib;
|
propagatedBuildInputs = with lib;
|
||||||
[ zlib freetype fontconfig libjpeg openjpeg ]
|
[ zlib freetype fontconfig libjpeg openjpeg ]
|
||||||
++ optionals (!minimal) [ cairo lcms curl ]
|
++ optionals (!minimal) [ cairo lcms curl ]
|
||||||
++ optional qt4Support qt4
|
|
||||||
++ optional qt5Support qtbase
|
++ optional qt5Support qtbase
|
||||||
++ optional introspectionSupport gobjectIntrospection;
|
++ optional introspectionSupport gobjectIntrospection;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ cmake ninja pkgconfig ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ];
|
cmakeFlags = [
|
||||||
|
(mkFlag true "XPDF_HEADERS")
|
||||||
CXXFLAGS = lib.optional qt5Support "-std=c++11";
|
(mkFlag (!minimal) "GLIB")
|
||||||
|
(mkFlag (!minimal) "CPP")
|
||||||
configureFlags = with lib;
|
(mkFlag (!minimal) "LIBCURL")
|
||||||
[
|
(mkFlag utils "UTILS")
|
||||||
"--enable-xpdf-headers"
|
(mkFlag qt5Support "QT5")
|
||||||
"--enable-libcurl"
|
];
|
||||||
"--enable-zlib"
|
|
||||||
"--enable-build-type=release"
|
|
||||||
]
|
|
||||||
++ optionals minimal [
|
|
||||||
"--disable-poppler-glib" "--disable-poppler-cpp"
|
|
||||||
"--disable-libcurl"
|
|
||||||
]
|
|
||||||
++ optional (!utils) "--disable-utils"
|
|
||||||
++ optional introspectionSupport "--enable-introspection";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
crossAttrs.postPatch =
|
|
||||||
# there are tests using `strXXX_s` functions that are missing apparently
|
|
||||||
stdenv.lib.optionalString (hostPlatform.libc or null == "msvcrt")
|
|
||||||
"sed '/^SUBDIRS =/s/ test / /' -i Makefile.in";
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = https://poppler.freedesktop.org/;
|
homepage = https://poppler.freedesktop.org/;
|
||||||
|
|
Loading…
Reference in New Issue