aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
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 /gnu/packages/patches
parente9b27c70e3b4bca441d5c2d9f5b743da3cce182a (diff)
downloadguix-1a753d5673b7613727177cb1d3b4c7e343534545.tar
guix-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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/inkscape-poppler-0.76.patch36
-rw-r--r--gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch34
2 files changed, 70 insertions, 0 deletions
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;