diff --git a/extra/texlive-bin/PKGBUILD b/extra/texlive-bin/PKGBUILD index 9c5d9f5e5..8758beac8 100644 --- a/extra/texlive-bin/PKGBUILD +++ b/extra/texlive-bin/PKGBUILD @@ -9,7 +9,7 @@ pkgname=('texlive-bin' 'libsynctex') pkgver=2019.51075 -pkgrel=4 +pkgrel=5 license=('GPL') arch=('x86_64') makedepends=('git' 'cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler' @@ -19,9 +19,11 @@ makedepends=('git' 'cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler' url='https://tug.org/texlive/' _commit=74c2495978a4a84ffae10252c0fd244f1140228e # texlive-2019.2 r51075 source=("git+https://github.com/Tex-Live/texlive-source.git#commit=${_commit}" - "pdftex-poppler0.76.patch") + "pdftex-poppler0.76.patch" texlive-poppler-0.83.patch texlive-poppler-0.84.patch) sha256sums=('SKIP' - '5da9f5356ca14d950c222108b431baaf5c27667460ffab9597b29ef11b426c0f') + '5da9f5356ca14d950c222108b431baaf5c27667460ffab9597b29ef11b426c0f' + 'ae68858b3ed60f6ef49cf29f31f601d0660908551484afe86283bc6054e9d9f8' + '4a4ff82c85cecafc5bbf544e568d80022e9456c3223648fa8d64e699526646c5') prepare() { cd "$srcdir/texlive-source" @@ -33,6 +35,9 @@ prepare() { patch -Np1 -i "$srcdir/pdftex-poppler0.76.patch" cp -pv texk/web2c/pdftexdir/pdftoepdf{-poppler0.76.0,}.cc cp -pv texk/web2c/pdftexdir/pdftosrc{-poppler0.76.0,}.cc + + patch -p1 -i ../texlive-poppler-0.83.patch + patch -p1 -i ../texlive-poppler-0.84.patch # Gentoo patch } build() { diff --git a/extra/texlive-bin/texlive-poppler-0.83.patch b/extra/texlive-bin/texlive-poppler-0.83.patch new file mode 100644 index 000000000..afc5e4a72 --- /dev/null +++ b/extra/texlive-bin/texlive-poppler-0.83.patch @@ -0,0 +1,46 @@ +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf.cc texlive-source/texk/web2c/pdftexdir/pdftoepdf.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf.cc 2020-01-07 22:42:03.717667766 +0000 ++++ texlive-source/texk/web2c/pdftexdir/pdftoepdf.cc 2020-01-07 22:47:42.818888622 +0000 +@@ -723,7 +723,7 @@ + #endif + // initialize + if (!isInit) { +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + globalParams->setErrQuiet(false); + isInit = true; + } +@@ -1108,6 +1108,5 @@ + delete_document(p); + } + // see above for globalParams +- delete globalParams; + } + } +diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc.cc texlive-source/texk/web2c/pdftexdir/pdftosrc.cc +--- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc.cc 2020-01-07 22:42:03.714334387 +0000 ++++ texlive-source/texk/web2c/pdftexdir/pdftosrc.cc 2020-01-07 22:50:08.070708640 +0000 +@@ -79,7 +79,7 @@ + exit(1); + } + fileName = new GString(argv[1]); +- globalParams = new GlobalParams(); ++ globalParams.reset(new GlobalParams()); + doc = new PDFDoc(fileName); + if (!doc->isOk()) { + fprintf(stderr, "Invalid PDF file\n"); +@@ -100,7 +100,7 @@ + if (objnum == 0) { + srcStream = catalogDict.dictLookup("SourceObject"); + static char const_SourceFile[] = "SourceFile"; +- if (!srcStream.isStream(const_SourceFile)) { ++ if (!srcStream.isDict(const_SourceFile)) { + fprintf(stderr, "No SourceObject found\n"); + exit(1); + } +@@ -202,5 +202,4 @@ + fprintf(stderr, "Cross-reference table extracted to %s\n", outname); + fclose(outfile); + delete doc; +- delete globalParams; + } diff --git a/extra/texlive-bin/texlive-poppler-0.84.patch b/extra/texlive-bin/texlive-poppler-0.84.patch new file mode 100644 index 000000000..c8d8bef86 --- /dev/null +++ b/extra/texlive-bin/texlive-poppler-0.84.patch @@ -0,0 +1,44 @@ +From cf05aae9685e5c6a46b4313e7bfce49edc6f51f9 Mon Sep 17 00:00:00 2001 +From: Mikle Kolyada +Date: Tue, 31 Dec 2019 11:29:30 +0300 +Subject: [PATCH] poppler-0.84 compat + +Upstream report: https://tug.org/pipermail/tex-k/2019-December/003096.html + +Signed-off-by: Mikle Kolyada +--- + texk/web2c/pdftexdir/utils.c | 1 - + texk/web2c/xetexdir/XeTeX_ext.c | 3 +++ + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/texk/web2c/pdftexdir/utils.c b/texk/web2c/pdftexdir/utils.c +index c93a8781..6f866e76 100644 +--- a/texk/web2c/pdftexdir/utils.c ++++ b/texk/web2c/pdftexdir/utils.c +@@ -33,7 +33,6 @@ with this program. If not, see . + #include "ptexlib.h" + #include + #ifdef POPPLER_VERSION +-#include + #define xpdfVersion POPPLER_VERSION + #define xpdfString "poppler" + #else +diff --git a/texk/web2c/xetexdir/XeTeX_ext.c b/texk/web2c/xetexdir/XeTeX_ext.c +index 4968ee41..0aee4ee3 100644 +--- a/texk/web2c/xetexdir/XeTeX_ext.c ++++ b/texk/web2c/xetexdir/XeTeX_ext.c +@@ -38,7 +38,10 @@ authorization from the copyright holders. + + #include + ++#ifndef POPPLER_VERSION + #include ++#endif ++ + #include + #include + #include +-- +2.24.1 + +