aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-06-15 12:31:49 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-06-15 23:47:34 +0200
commit1a753d5673b7613727177cb1d3b4c7e343534545 (patch)
tree367afa0abfe27a1245efadab8a2d6c976732a0cb
parente9b27c70e3b4bca441d5c2d9f5b743da3cce182a (diff)
downloadpatches-1a753d5673b7613727177cb1d3b4c7e343534545.tar
patches-1a753d5673b7613727177cb1d3b4c7e343534545.tar.gz
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.
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/inkscape.scm1
-rw-r--r--gnu/packages/patches/inkscape-poppler-0.76.patch36
-rw-r--r--gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch34
-rw-r--r--gnu/packages/pdf.scm4
-rw-r--r--gnu/packages/scribus.scm29
-rw-r--r--gnu/packages/tex.scm10
7 files changed, 106 insertions, 9 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 7c68b40976..2a6908d4bb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -938,6 +938,7 @@ dist_patch_DATA = \
%D%/packages/patches/idris-test-no-node.patch \
%D%/packages/patches/ilmbase-fix-tests.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/irrlicht-use-system-libs.patch \
%D%/packages/patches/isl-0.11.1-aarch64-support.patch \
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index a2c6778b57..1ad23a92d4 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -52,6 +52,7 @@
(uri (string-append "https://media.inkscape.org/dl/"
"resources/file/"
"inkscape-" version ".tar.bz2"))
+ (patches (search-patches "inkscape-poppler-0.76.patch"))
(sha256
(base32
"0pjinhjibfsz1aywdpgpj3k23xrsszpj4a1ya5562dkv2yl2vv2p"))))
diff --git a/gnu/packages/patches/inkscape-poppler-0.76.patch b/gnu/packages/patches/inkscape-poppler-0.76.patch
new file mode 100644
index 0000000000..08e8303892
--- /dev/null
+++ b/gnu/packages/patches/inkscape-poppler-0.76.patch
@@ -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
diff --git a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch b/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch
index df6121c6e1..024ff416af 100644
--- a/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch
+++ b/gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch
@@ -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->d = obj;
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;
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index eab97a1a52..9cfac6fb9d 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -84,14 +84,14 @@
(define-public poppler
(package
(name "poppler")
- (version "0.75.0")
+ (version "0.77.0")
(source (origin
(method url-fetch)
(uri (string-append "https://poppler.freedesktop.org/poppler-"
version ".tar.xz"))
(sha256
(base32
- "16hr0y3pv66s01bcd4k8xjgd1r038ca9srd06g4wm5r7zaqfvfiv"))))
+ "0szk09hk8r98ck9cx97nqwrbzdn1q41ic8dq8j1aar6dpi6fnrvj"))))
(build-system cmake-build-system)
;; FIXME:
;; use libcurl: no
diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm
index 5b770fd696..322a096414 100644
--- a/gnu/packages/scribus.scm
+++ b/gnu/packages/scribus.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -97,9 +98,33 @@
(file-name "scribus-poppler-0.70.patch")
(sha256
(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")))
+ ;; 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)))
(snippet
'(begin
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index e28b36fd98..10233a05b7 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -111,12 +111,12 @@
"&id=" revision))
(file-name (string-append "texlive-bin-" name))
(sha256 (base32 hash)))))
- (arch-revision "418dd6f008c3d41a461353fdb60f2d73d87c58ed"))
+ (arch-revision "c4b99aba97213ea554b6592a4916d3c7394a6d7b"))
(append (search-patches "texlive-bin-CVE-2018-17407.patch"
"texlive-bin-luatex-poppler-compat.patch")
(list
- (arch-patch "pdftex-poppler0.75.patch" arch-revision
- "1cqpcp7h1qyxyp3wjbpcmx2wgvj9ywpz60hvy280mp9w633yzyg3")
+ (arch-patch "pdftex-poppler0.76.patch" arch-revision
+ "15ypbh21amfsdxy7ca825x28lkmmkklxk1w660gpgvzdi7s70h0b")
(arch-patch "xetex-poppler-fixes.patch" arch-revision
"1jj1p5zkjljb7id9pjv29cw0cf8mwrgrh4ackgzz9c200vaqpsvx")))))))
(build-system gnu-build-system)
@@ -194,9 +194,9 @@
#t))
(add-after 'unpack 'use-code-for-new-poppler
(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")
- (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")
#t))
(add-after 'use-code-for-new-poppler 'use-code-for-even-newer-poppler