extra/texlive-bin to 2019.51075-5

This commit is contained in:
Kevin Mihelich 2020-01-11 15:29:24 +00:00
parent 9d77676fe4
commit 24e371e7bc
3 changed files with 98 additions and 3 deletions

View file

@ -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() {

View file

@ -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;
}

View file

@ -0,0 +1,44 @@
From cf05aae9685e5c6a46b4313e7bfce49edc6f51f9 Mon Sep 17 00:00:00 2001
From: Mikle Kolyada <zlogene@gentoo.org>
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 <zlogene@gentoo.org>
---
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 <http://www.gnu.org/licenses/>.
#include "ptexlib.h"
#include <png.h>
#ifdef POPPLER_VERSION
-#include <poppler-config.h>
#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 <w2c/config.h>
+#ifndef POPPLER_VERSION
#include <poppler-config.h>
+#endif
+
#include <png.h>
#include <zlib.h>
#include <graphite2/Font.h>
--
2.24.1