gnu: poppler: Update to 0.77.0.

* gnu/packages/patches/inkscape-poppler-0.76.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/inkscape.scm (inkscape)[source](patches): New field.
* gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch: Add two new hunks.
* gnu/packages/pdf.scm (poppler): Update to 0.77.0.
* gnu/packages/tex.scm (texlive-bin)[source]: Update Arch patches.
[arguments]: Adjust accordingly.
* gnu/packages/scribus.scm (scribus)[source](patches): Add two new origins.
This commit is contained in:
Marius Bakke 2019-06-15 12:31:49 +02:00
parent e9b27c70e3
commit 1a753d5673
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
7 changed files with 106 additions and 9 deletions

View File

@ -938,6 +938,7 @@ dist_patch_DATA = \
%D%/packages/patches/idris-test-no-node.patch \ %D%/packages/patches/idris-test-no-node.patch \
%D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \
%D%/packages/patches/inkscape-poppler-compat3.patch \ %D%/packages/patches/inkscape-poppler-compat3.patch \
%D%/packages/patches/inkscape-poppler-0.76.patch \
%D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \
%D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \

View File

@ -52,6 +52,7 @@
(uri (string-append "https://media.inkscape.org/dl/" (uri (string-append "https://media.inkscape.org/dl/"
"resources/file/" "resources/file/"
"inkscape-" version ".tar.bz2")) "inkscape-" version ".tar.bz2"))
(patches (search-patches "inkscape-poppler-0.76.patch"))
(sha256 (sha256
(base32 (base32
"0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p")))) "0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"))))

View File

@ -0,0 +1,36 @@
This patch adds support for Poppler 0.76 and later.
Taken from upstream:
<https://gitlab.com/inkscape/inkscape/commit/e831b034746f8dc3c3c1b88372751f6dcb974831>
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
index 8484984bdf..4f798e35bf 100644
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
@@ -421,7 +421,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) {
error(errInternal, -1, "Weird page contents");
return;
}
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
+ parser = new _POPPLER_NEW_PARSER(xref, obj);
go(topLevel);
delete parser;
parser = nullptr;
diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
index 61a15083a0..5e8bc4ae90 100644
--- a/src/extension/internal/pdfinput/poppler-transition-api.h
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
@@ -14,6 +14,13 @@
#include <glib/poppler-features.h>
+#if POPPLER_CHECK_VERSION(0, 76, 0)
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
+#else
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
+#endif
+
+
#if POPPLER_CHECK_VERSION(0, 72, 0)
#define getCString c_str
#endif

View File

@ -257,3 +257,37 @@ diff --git a/texk/web2c/luatexdir/lua/lepdflib.cc b/texk/web2c/luatexdir/lua/lep
uout = new_StructTreeRoot_userdata(L); uout = new_StructTreeRoot_userdata(L);
uout->d = obj; uout->d = obj;
uout->pc = uin->pc; uout->pc = uin->pc;
--- texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc.orig 2019-04-24 09:41:05.090522664 +0000
+++ texlive-source/texk/web2c/luatexdir/lua/lepdflib.cc 2019-04-24 09:43:37.119184926 +0000
@@ -994,7 +994,8 @@
pdfdoc_changed_error(L);
num = luaL_checkint(L, 2);
gen = luaL_checkint(L, 3);
- i = ((Catalog *) uin->d)->findPage(num, gen);
+ Ref numgen = {num, gen};
+ i = ((Catalog *) uin->d)->findPage(numgen);
if (i > 0)
lua_pushinteger(L, i);
else
@@ -2596,8 +2597,9 @@
pdfdoc_changed_error(L);
num = luaL_checkint(L, 2);
gen = luaL_checkint(L, 3);
+ Ref numgen = {num, gen};
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
- i = ((PdfDocument *) uin->d)->doc->findPage(num, gen);
+ i = ((PdfDocument *) uin->d)->doc->findPage(numgen);
if (i > 0)
lua_pushinteger(L, i);
else
--- texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w.orig 2019-04-24 09:56:38.406498975 +0000
+++ texlive-source/texk/web2c/luatexdir/image/pdftoepdf.w 2019-04-24 09:56:57.020081327 +0000
@@ -630,7 +630,7 @@
if (link == NULL || !link->isOk())
formatted_error("pdf inclusion","invalid destination '%s'",img_pagename(idict));
Ref ref = link->getPageRef();
- img_pagenum(idict) = catalog->findPage(ref.num, ref.gen);
+ img_pagenum(idict) = catalog->findPage(ref);
if (img_pagenum(idict) == 0)
formatted_error("pdf inclusion","destination is not a page '%s'",img_pagename(idict));
delete link;

View File

@ -84,14 +84,14 @@
(define-public poppler (define-public poppler
(package (package
(name "poppler") (name "poppler")
(version "0.75.0") (version "0.77.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "https://poppler.freedesktop.org/poppler-" (uri (string-append "https://poppler.freedesktop.org/poppler-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"16hr0y3pv66s01bcd4k8xjgd1r038ca9srd06g4wm5r7zaqfvfiv")))) "0szk09hk8r98ck9cx97nqwrbzdn1q41ic8dq8j1aar6dpi6fnrvj"))))
(build-system cmake-build-system) (build-system cmake-build-system)
;; FIXME: ;; FIXME:
;; use libcurl: no ;; use libcurl: no

View File

@ -3,6 +3,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr> ;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -97,9 +98,33 @@
(file-name "scribus-poppler-0.70.patch") (file-name "scribus-poppler-0.70.patch")
(sha256 (sha256
(base32 (base32
"0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))) "0dw7ix3jaj0y1q97cmmqwb2qgdx760yhxx86wa8rnx0xhfi5x6qr")))
;; This and the preceding patch are taken from Arch Linux
;; because they are adjusted for the Scribus release tarball
;; rather than the upstream master branch.
(origin
(method url-fetch)
(uri (string-append "https://git.archlinux.org/svntogit/"
"community.git/plain/trunk/scribus-"
"poppler-0.75.patch?h=packages/scribus&id="
"4d35c4ad4869c1dcce9243c4786ff303bdd5c601"))
(file-name "scribus-poppler-0.75.patch")
(sha256
(base32
"1lhf2srp7iv44zzdbr3kqa0lfjmm77nalxnx80jqaixhr5yq2s8f")))
(origin
(method url-fetch)
(uri (string-append
"https://github.com/scribusproject/scribus/commit/"
"9449265592a5195153d72c2a511d2010b0cf5b0b.patch"))
(file-name "scribus-poppler-0.76.patch")
(sha256
(base32
"0zghiqra9s6f6v06fdr97gdhiw41zr8r6vqh4ar4yw7rqn2771jd"))))
(search-patches "scribus-poppler-0.73.patch"))) (search-patches "scribus-poppler-0.73.patch")))
;; The --binary flag is required for 'scribus-poppler-0.75.patch', because
;; we need to retain the CRLF line endings.
(patch-flags '("-p1" "--binary"))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin

View File

@ -111,12 +111,12 @@
"&id=" revision)) "&id=" revision))
(file-name (string-append "texlive-bin-" name)) (file-name (string-append "texlive-bin-" name))
(sha256 (base32 hash))))) (sha256 (base32 hash)))))
(arch-revision "418dd6f008c3d41a461353fdb60f2d73d87c58ed")) (arch-revision "c4b99aba97213ea554b6592a4916d3c7394a6d7b"))
(append (search-patches "texlive-bin-CVE-2018-17407.patch" (append (search-patches "texlive-bin-CVE-2018-17407.patch"
"texlive-bin-luatex-poppler-compat.patch") "texlive-bin-luatex-poppler-compat.patch")
(list (list
(arch-patch "pdftex-poppler0.75.patch" arch-revision (arch-patch "pdftex-poppler0.76.patch" arch-revision
"1cqpcp7h1qyxyp3wjbpcmx2wgvj9ywpz60hvy280mp9w633yzyg3") "15ypbh21amfsdxy7ca825x28lkmmkklxk1w660gpgvzdi7s70h0b")
(arch-patch "xetex-poppler-fixes.patch" arch-revision (arch-patch "xetex-poppler-fixes.patch" arch-revision
"1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx"))))))) "1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx")))))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -194,9 +194,9 @@
#t)) #t))
(add-after 'unpack 'use-code-for-new-poppler (add-after 'unpack 'use-code-for-new-poppler
(lambda _ (lambda _
(copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc" (copy-file "texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc"
"texk/web2c/pdftexdir/pdftoepdf.cc") "texk/web2c/pdftexdir/pdftoepdf.cc")
(copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.75.0.cc" (copy-file "texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc"
"texk/web2c/pdftexdir/pdftosrc.cc") "texk/web2c/pdftexdir/pdftosrc.cc")
#t)) #t))
(add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler (add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler