Merge pull request #74558 from r-ryantm/auto-update/poppler-utils

poppler: 0.81.0 -> 0.83.0
This commit is contained in:
Jan Tojnar 2019-12-03 16:50:55 +01:00 committed by GitHub
commit d2da3202ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 18 deletions

View File

@ -25,6 +25,16 @@ stdenv.mkDerivation rec {
url = "https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831.diff";
sha256 = "096rdyi6ppjq1h9jwwsm9hb99nggfrfinik8rm23jkn4h2zl01zf";
})
(fetchpatch {
name = "inkscape-poppler_0_82_compat.patch";
url = "https://gitlab.com/inkscape/inkscape/commit/835b6bb62be565efab986d5a3f30a672ad56c7eb.patch";
sha256 = "02c6sxi2w52b885vr3pgani6kvxp9gdqqk2jgiykkdzv70hhrnm7";
})
(fetchpatch {
name = "inkscape-poppler_0_83_compat.patch";
url = "https://gitlab.com/inkscape/inkscape/commit/b5360a807b12d4e8318475ffd0464b84882788b5.patch";
sha256 = "1p44rr2q2i3zkd1y1j7xgdcbgx8yvlq6hq92im8s0bkjby6p5cpz";
})
];
# Inkscape hits the ARGMAX when linking on macOS. It appears to be

View File

@ -12,11 +12,11 @@ let
in
stdenv.mkDerivation rec {
name = "poppler-${suffix}-${version}";
version = "0.81.0"; # beware: updates often break cups-filters build
version = "0.83.0"; # beware: updates often break cups-filters build
src = fetchurl {
url = "${meta.homepage}/poppler-${version}.tar.xz";
sha256 = "00pykc7nym3xg0wc60awv0i35zwdfyn0igb6jrnb6rsv0c5h4b91";
sha256 = "16vr1g5qsqwyxfnyikqw37i04x9zpp45far2x90c7qbijw6nap38";
};
outputs = [ "out" "dev" ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, djvulibre, poppler, fontconfig, libjpeg }:
{ stdenv, fetchurl, fetchpatch, pkgconfig, djvulibre, poppler, fontconfig, libjpeg }:
stdenv.mkDerivation rec {
version = "0.9.14";
@ -9,6 +9,18 @@ stdenv.mkDerivation rec {
sha256 = "05z2bbg54pfsi668fwcjrcr5iz9llf9gprzdsrn6fw5wjv4876zi";
};
patches = [
# fix build with Poppler 0.83
(fetchpatch {
url = "https://github.com/jwilk/pdf2djvu/commit/0aa17bb79dbcdfc249e4841f5b5398e27cfdfd41.patch";
sha256 = "0mr14nz5w7z4ri2556bxkf3cnn2f7dhwsld7csrh6z5qqb7d5805";
})
(fetchpatch {
url = "https://github.com/jwilk/pdf2djvu/commit/27b9e028091a2f370367e9eaf37b4bb1cde87b62.patch";
sha256 = "03apsg1487jl800q8j70hicvg6xsndd593bg7babm4vgivkxb0da";
})
];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ djvulibre poppler fontconfig libjpeg ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch
{ stdenv, fetchurl, fetchpatch, patchutils
, texlive
, zlib, libiconv, libpng, libX11
, freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
@ -27,27 +27,47 @@ let
};
patches = [
] ++ stdenv.lib.optionals (stdenv.lib.versionAtLeast (stdenv.lib.getVersion poppler) "0.76") [
(fetchpatch {
name = "pdftex-poppler0.76.patch";
url = "https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk/pdftex-poppler0.76.patch?id=8cb784073cfd2299a6c301ce7bb0d89126a47f4e";
sha256 = "04x7myzysranddzjifxhahl7gjy407zkiyzfs5l9cbwzp6pqh7gh";
includes = [
"texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
"texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
];
})
];
postPatch = let
popplerSuffix = if (stdenv.lib.versionAtLeast (stdenv.lib.getVersion poppler) "0.76") then "-poppler0.76.0" else "-poppler0.72.0";
# The source compatible with Poppler ${popplerVersion} not yet available in TeXLive ${year}
# so we need to use files introduced in https://www.tug.org/svn/texlive?view=revision&revision=52959
popplerVersion = "0.83.0";
pdftoepdf = let
revert-pdfmajorversion = fetchpatch {
name = "pdftoepdf-revert-pdfmajorversion.patch";
url = "https://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc?view=patch&r1=52953&r2=52952&pathrev=52953";
sha256 = "19jiv5xbvnfdk8lj6yd6mdxgs8f313a4dwg8svjj90dd35kjcfh8";
revert = true;
postFetch = ''
# The default file, changed by this patch, contains a branch for vendored Poppler
# The version-specific file replaces the section with an error, so we need to drop that part from the patch.
# Fortunately, there is not anything else in the patch after #else.
sed '/ #else/q' $out > "$tmpfile"
${patchutils}/bin/recountdiff "$tmpfile" > "$out"
'';
};
in fetchurl {
name = "pdftoepdf-poppler${popplerVersion}.cc";
url = "https://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftoepdf-poppler${popplerVersion}.cc?revision=52959&view=co";
sha256 = "0pngvw1jgnm4cqskrzf5a3z8rj4ssl10007n3wbblj50hvvzjph3";
postFetch = ''
# The trunk added some extra arguments to certain functions so we need to revert that
# https://www.tug.org/svn/texlive?view=revision&revision=52953
patch $out < ${revert-pdfmajorversion}
'';
};
pdftosrc = fetchurl {
name = "pdftosrc-poppler${popplerVersion}.cc";
url = "https://www.tug.org/svn/texlive/trunk/Build/source/texk/web2c/pdftexdir/pdftosrc-poppler${popplerVersion}.cc?revision=52959&view=co";
sha256 = "0iq2cmwvf2lxy32sygrafwqgcwvvbdnvxm5l3mrg9cb2a1g06380";
};
in ''
for i in texk/kpathsea/mktex*; do
sed -i '/^mydir=/d' "$i"
done
cp -pv texk/web2c/pdftexdir/pdftoepdf{${popplerSuffix},}.cc
cp -pv texk/web2c/pdftexdir/pdftosrc{${popplerSuffix},}.cc
cp -pv ${pdftoepdf} texk/web2c/pdftexdir/pdftoepdf.cc
cp -pv ${pdftosrc} texk/web2c/pdftexdir/pdftosrc.cc
'';
# remove when removing synctex-missing-header.patch