texlive-bin: update to 2021 version
Specifically svn tag 58837. Texlive now depends on xpdf instead of poppler. We have xpdf in x11-packages, but it depends on qt5-qtbase, so moving it to termux-packages would mean moving pretty much all x11 packages to the main repo. Use the xpdf source shipped with texlive instead for now.
This commit is contained in:
parent
235785d403
commit
d3d202979a
@ -2,12 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/
|
||||
TERMUX_PKG_DESCRIPTION="TeX Live is a distribution of the TeX typesetting system. This package contains architecture dependent binaries."
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=20200406
|
||||
_SVN_VERSION=54456
|
||||
TERMUX_PKG_REVISION=10
|
||||
TERMUX_PKG_VERSION=20210325
|
||||
_SVN_VERSION=58837
|
||||
TERMUX_PKG_SRCURL=https://github.com/TeX-Live/texlive-source/archive/svn${_SVN_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=093caf1e502f80219342e137d53222ad9f0d59916d8e5323eefc1e211056b86f
|
||||
TERMUX_PKG_DEPENDS="libc++, libiconv, freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua52, poppler, libgraphite, harfbuzz, harfbuzz-icu, teckit, libpixman, libcairo, zlib, zziplib"
|
||||
TERMUX_PKG_SHA256=0afa6919e44675b7afe0fa45344747afef07b6ee98eeb14ff6a2ef78f458fc12
|
||||
TERMUX_PKG_DEPENDS="libc++, libiconv, freetype, libpng, libgd, libgmp, libmpfr, libicu, liblua52, libgraphite, harfbuzz, harfbuzz-icu, teckit, libpixman, libcairo, zlib, zziplib"
|
||||
# libpcre, glib, fonconfig are dependencies to libcairo. pkg-config gives an error if they are missing
|
||||
# libuuid, libxml2 are needed by fontconfig
|
||||
TERMUX_PKG_BUILD_DEPENDS="icu-devtools, pcre, glib, fontconfig, libuuid, libxml2"
|
||||
@ -57,9 +56,7 @@ RANLIB=ranlib
|
||||
--with-system-gmp
|
||||
--with-system-icu
|
||||
--with-system-mpfr
|
||||
--with-system-poppler
|
||||
--with-system-zlib
|
||||
--with-system-xpdf
|
||||
--with-system-lua
|
||||
--with-system-teckit
|
||||
--with-system-zziplib
|
||||
@ -121,17 +118,4 @@ termux_step_pre_configure() {
|
||||
export CTANGLEBOOT=$TERMUX_PKG_HOSTBUILD_DIR/texk/web2c/ctangleboot
|
||||
export TIE=$TERMUX_PKG_HOSTBUILD_DIR/texk/web2c/tie
|
||||
export OTANGLE=$TERMUX_PKG_HOSTBUILD_DIR/texk/web2c/otangle
|
||||
|
||||
find "$TERMUX_PKG_SRCDIR"/texk/web2c/luatexdir -type f -exec sed -i \
|
||||
-e 's|gTrue|true|g' \
|
||||
-e 's|gFalse|false|g' \
|
||||
-e 's|GBool|bool|g' \
|
||||
-e 's|getCString|c_str|g' \
|
||||
-e 's|Guint|unsigned int|g' \
|
||||
-e 's|Guchar|unsigned char|g' \
|
||||
{} +
|
||||
|
||||
# These files are from upstream master:
|
||||
cp "$TERMUX_PKG_BUILDER_DIR"/pdftoepdf-poppler0.86.0.cc "$TERMUX_PKG_SRCDIR"/texk/web2c/pdftexdir/pdftoepdf.cc # commit 7cabe29
|
||||
cp "$TERMUX_PKG_BUILDER_DIR"/pdftosrc-poppler0.83.0.cc "$TERMUX_PKG_SRCDIR"/texk/web2c/pdftexdir/pdftosrc.cc # commit f0d0598b
|
||||
}
|
||||
|
32
packages/texlive-bin/eptex-bool.patch
Normal file
32
packages/texlive-bin/eptex-bool.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- ./texk/web2c/eptexdir/pdfutils.ch.orig 2021-06-25 10:41:05.076465982 +0000
|
||||
+++ ./texk/web2c/eptexdir/pdfutils.ch 2021-06-25 10:41:26.523183653 +0000
|
||||
@@ -932,7 +932,7 @@
|
||||
@!save_scanner_status:small_number; {|scanner_status| upon entry}
|
||||
@!save_def_ref: pointer; {|def_ref| upon entry, important if inside `\.{\\message}'}
|
||||
@!save_warning_index: pointer;
|
||||
-@!bool: boolean; {temp boolean}
|
||||
+@!mybool: boolean; {temp boolean}
|
||||
@!u: str_number; {saved current string string}
|
||||
@!s: str_number; {first temp string}
|
||||
@!i: integer;
|
||||
@@ -1038,9 +1038,9 @@
|
||||
save_warning_index := warning_index;
|
||||
save_def_ref := def_ref;
|
||||
save_cur_string;
|
||||
- bool := scan_keyword("file");
|
||||
+ mybool := scan_keyword("file");
|
||||
scan_pdf_ext_toks;
|
||||
- if bool then s := tokens_to_string(def_ref)
|
||||
+ if mybool then s := tokens_to_string(def_ref)
|
||||
else begin
|
||||
isprint_utf8:=true; s := tokens_to_string(def_ref); isprint_utf8:=false;
|
||||
end;
|
||||
@@ -1049,7 +1049,7 @@
|
||||
warning_index := save_warning_index;
|
||||
scanner_status := save_scanner_status;
|
||||
b := pool_ptr;
|
||||
- getmd5sum(s, bool);
|
||||
+ getmd5sum(s, mybool);
|
||||
link(garbage) := str_toks(b);
|
||||
flush_str(s);
|
||||
ins_list(link(temp_head));
|
65
packages/texlive-bin/pdftex-bool.patch
Normal file
65
packages/texlive-bin/pdftex-bool.patch
Normal file
@ -0,0 +1,65 @@
|
||||
--- ./texk/web2c/pdftexdir/pdftex.web.orig 2021-06-25 11:05:46.198310283 +0000
|
||||
+++ ./texk/web2c/pdftexdir/pdftex.web 2021-06-25 11:06:42.138353401 +0000
|
||||
@@ -10932,7 +10932,7 @@
|
||||
@!save_scanner_status:small_number; {|scanner_status| upon entry}
|
||||
@!save_def_ref: pointer; {|def_ref| upon entry, important if inside `\.{\\message}'}
|
||||
@!save_warning_index: pointer;
|
||||
-@!bool: boolean; {temp boolean}
|
||||
+@!mybool: boolean; {temp boolean}
|
||||
@!i: integer; {first temp integer}
|
||||
@!j: integer; {second temp integer}
|
||||
@!b:pool_pointer; {base of temporary string}
|
||||
@@ -11132,7 +11132,7 @@
|
||||
save_warning_index := warning_index;
|
||||
save_def_ref := def_ref;
|
||||
save_cur_string;
|
||||
- bool := scan_keyword("file");
|
||||
+ mybool := scan_keyword("file");
|
||||
scan_pdf_ext_toks;
|
||||
s := tokens_to_string(def_ref);
|
||||
delete_token_ref(def_ref);
|
||||
@@ -11140,7 +11140,7 @@
|
||||
warning_index := save_warning_index;
|
||||
scanner_status := save_scanner_status;
|
||||
b := pool_ptr;
|
||||
- getmd5sum(s, bool);
|
||||
+ getmd5sum(s, mybool);
|
||||
link(garbage) := str_toks(b);
|
||||
flush_str(s);
|
||||
ins_list(link(temp_head));
|
||||
@@ -11203,7 +11203,7 @@
|
||||
save_def_ref := def_ref;
|
||||
save_cur_string;
|
||||
{scan for icase}
|
||||
- bool := scan_keyword("icase");
|
||||
+ mybool := scan_keyword("icase");
|
||||
{scan for subcount}
|
||||
i := -1; {default for subcount}
|
||||
if scan_keyword("subcount") then begin
|
||||
@@ -11220,7 +11220,7 @@
|
||||
warning_index := save_warning_index;
|
||||
scanner_status := save_scanner_status;
|
||||
b := pool_ptr;
|
||||
- matchstrings(s, t, i, bool);
|
||||
+ matchstrings(s, t, i, mybool);
|
||||
link(garbage) := str_toks(b);
|
||||
flush_str(t);
|
||||
flush_str(s);
|
||||
@@ -11259,7 +11259,7 @@
|
||||
end;
|
||||
pdf_colorstack_init_code:
|
||||
begin
|
||||
- bool := scan_keyword("page");
|
||||
+ mybool := scan_keyword("page");
|
||||
if scan_keyword("direct") then
|
||||
cur_val := direct_always
|
||||
else
|
||||
@@ -11277,7 +11277,7 @@
|
||||
def_ref := save_def_ref;
|
||||
warning_index := save_warning_index;
|
||||
scanner_status := save_scanner_status;
|
||||
- cur_val := newcolorstack(s, cur_val, bool);
|
||||
+ cur_val := newcolorstack(s, cur_val, mybool);
|
||||
flush_str(s);
|
||||
cur_val_level := int_val;
|
||||
if cur_val < 0 then begin
|
File diff suppressed because it is too large
Load Diff
@ -1,205 +0,0 @@
|
||||
/*
|
||||
Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org>
|
||||
|
||||
This file is part of pdfTeX.
|
||||
|
||||
pdfTeX is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
pdfTeX is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
This is based on the patch texlive-poppler-0.59.patch <2017-09-19> at
|
||||
https://git.archlinux.org/svntogit/packages.git/plain/texlive-bin/trunk
|
||||
by Arch Linux. The poppler should be 0.83.0 or newer versions.
|
||||
POPPLER_VERSION should be defined.
|
||||
*/
|
||||
|
||||
#include <w2c/config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef POPPLER_VERSION
|
||||
#define GString GooString
|
||||
#define xpdfVersion POPPLER_VERSION
|
||||
#include <dirent.h>
|
||||
#include <goo/GooString.h>
|
||||
#include <goo/gmem.h>
|
||||
#include <goo/gfile.h>
|
||||
#else
|
||||
#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
#include "Object.h"
|
||||
#include "Stream.h"
|
||||
#include "Lexer.h"
|
||||
#include "Parser.h"
|
||||
#include "Array.h"
|
||||
#include "Dict.h"
|
||||
#include "XRef.h"
|
||||
#include "Catalog.h"
|
||||
#include "Page.h"
|
||||
#include "GfxFont.h"
|
||||
#include "PDFDoc.h"
|
||||
#include "GlobalParams.h"
|
||||
#include "Error.h"
|
||||
|
||||
static XRef *xref = 0;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *p, buf[1024];
|
||||
PDFDoc *doc;
|
||||
GString *fileName;
|
||||
Stream *s;
|
||||
Object srcStream, srcName, catalogDict;
|
||||
FILE *outfile;
|
||||
char *outname;
|
||||
int objnum = 0, objgen = 0;
|
||||
bool extract_xref_table = false;
|
||||
int c;
|
||||
fprintf(stderr, "pdftosrc version %s\n", xpdfVersion);
|
||||
if (argc < 2) {
|
||||
fprintf(stderr,
|
||||
"Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
|
||||
exit(1);
|
||||
}
|
||||
fileName = new GString(argv[1]);
|
||||
globalParams.reset(new GlobalParams());
|
||||
doc = new PDFDoc(fileName);
|
||||
if (!doc->isOk()) {
|
||||
fprintf(stderr, "Invalid PDF file\n");
|
||||
exit(1);
|
||||
}
|
||||
if (argc >= 3) {
|
||||
objnum = atoi(argv[2]);
|
||||
if (argc >= 4)
|
||||
objgen = atoi(argv[3]);
|
||||
}
|
||||
xref = doc->getXRef();
|
||||
catalogDict = xref->getCatalog();
|
||||
if (!catalogDict.isDict("Catalog")) {
|
||||
fprintf(stderr, "No Catalog found\n");
|
||||
exit(1);
|
||||
}
|
||||
srcStream = Object(objNull);
|
||||
if (objnum == 0) {
|
||||
srcStream = catalogDict.dictLookup("SourceObject");
|
||||
static const char *const_SourceFile = "SourceFile";
|
||||
if (!srcStream.isDict(const_SourceFile)) {
|
||||
fprintf(stderr, "No SourceObject found\n");
|
||||
exit(1);
|
||||
}
|
||||
srcName = srcStream.getStream()->getDict()->lookup("SourceName");
|
||||
if (!srcName.isString()) {
|
||||
fprintf(stderr, "No SourceName found\n");
|
||||
exit(1);
|
||||
}
|
||||
outname = (char *)srcName.getString()->c_str();
|
||||
// We cannot free srcName, as objname shares its string.
|
||||
// srcName.free();
|
||||
} else if (objnum > 0) {
|
||||
srcStream = xref->fetch(objnum, objgen);
|
||||
if (!srcStream.isStream()) {
|
||||
fprintf(stderr, "Not a Stream object\n");
|
||||
exit(1);
|
||||
}
|
||||
sprintf(buf, "%s", fileName->c_str());
|
||||
if ((p = strrchr(buf, '.')) == 0)
|
||||
p = strchr(buf, 0);
|
||||
if (objgen == 0)
|
||||
sprintf(p, ".%i", objnum);
|
||||
else
|
||||
sprintf(p, ".%i+%i", objnum, objgen);
|
||||
outname = buf;
|
||||
} else { // objnum < 0 means we are extracting the XRef table
|
||||
extract_xref_table = true;
|
||||
sprintf(buf, "%s", fileName->c_str());
|
||||
if ((p = strrchr(buf, '.')) == 0)
|
||||
p = strchr(buf, 0);
|
||||
sprintf(p, ".xref");
|
||||
outname = buf;
|
||||
}
|
||||
if (!(outfile = fopen(outname, "wb"))) {
|
||||
fprintf(stderr, "Cannot open file \"%s\" for writing\n", outname);
|
||||
exit(1);
|
||||
}
|
||||
if (extract_xref_table) {
|
||||
int size = xref->getNumObjects();
|
||||
int i;
|
||||
for (i = 0; i < size; i++) {
|
||||
if (xref->getEntry(i)->offset == 0xffffffff)
|
||||
break;
|
||||
}
|
||||
size = i;
|
||||
fprintf(outfile, "xref\n");
|
||||
fprintf(outfile, "0 %i\n", size);
|
||||
for (i = 0; i < size; i++) {
|
||||
XRefEntry *e = xref->getEntry(i);
|
||||
if (e->type != xrefEntryCompressed)
|
||||
fprintf(outfile, "%.10lu %.5i %s\n",
|
||||
(long unsigned) e->offset, e->gen,
|
||||
(e->type == xrefEntryFree ? "f" : "n"));
|
||||
else { // e->offset is the object number of the object stream
|
||||
Stream *str;
|
||||
Lexer *lexer;
|
||||
Parser *parser;
|
||||
Object objStr, obj1, obj2;
|
||||
int nObjects, first, n;
|
||||
int localOffset = 0;
|
||||
unsigned int firstOffset;
|
||||
|
||||
objStr = xref->fetch(e->offset, 0);
|
||||
assert(objStr.isStream());
|
||||
obj1 = objStr.streamGetDict()->lookup("N");
|
||||
nObjects = obj1.getInt();
|
||||
obj1 = objStr.streamGetDict()->lookup("First");
|
||||
first = obj1.getInt();
|
||||
firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
|
||||
|
||||
// parse the header: object numbers and offsets
|
||||
objStr.streamReset();
|
||||
str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
|
||||
parser = new Parser(xref, str, false);
|
||||
for (n = 0; n < nObjects; ++n) {
|
||||
obj1 = parser->getObj();
|
||||
obj2 = parser->getObj();
|
||||
if (n == e->gen)
|
||||
localOffset = obj2.getInt();
|
||||
}
|
||||
while (str->getChar() != EOF) ;
|
||||
delete parser;
|
||||
|
||||
fprintf(outfile, "%.10lu 00000 n\n",
|
||||
(long unsigned)(firstOffset + localOffset));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s = srcStream.getStream();
|
||||
s->reset();
|
||||
while ((c = s->getChar()) != EOF)
|
||||
fputc(c, outfile);
|
||||
}
|
||||
if (objnum == 0)
|
||||
fprintf(stderr, "Source file extracted to %s\n", outname);
|
||||
else if (objnum > 0)
|
||||
fprintf(stderr, "Stream object extracted to %s\n", outname);
|
||||
else
|
||||
fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
|
||||
fclose(outfile);
|
||||
delete doc;
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
From 729755bcb60695221cb368202822fc3181197ef7 Mon Sep 17 00:00:00 2001
|
||||
From: Akira Kakuto <kakuto@fuk.kindai.ac.jp>
|
||||
Date: Mon, 22 Oct 2018 04:01:42 +0000
|
||||
Subject: [PATCH] cast types to support new poppler
|
||||
|
||||
git-svn-id: svn://tug.org/texlive/trunk/Build/source@48969 c570f23f-e606-0410-a88d-b1316a301751
|
||||
---
|
||||
texk/web2c/xetexdir/ChangeLog | 4 ++++
|
||||
texk/web2c/xetexdir/pdfimage.cpp | 10 +++++-----
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/texk/web2c/xetexdir/pdfimage.cpp b/texk/web2c/xetexdir/pdfimage.cpp
|
||||
index fc3e32693..8a38f1ee5 100644
|
||||
--- a/texk/web2c/xetexdir/pdfimage.cpp
|
||||
+++ b/texk/web2c/xetexdir/pdfimage.cpp
|
||||
@@ -82,19 +82,19 @@ pdf_get_rect(char* filename, int page_num, int pdf_box, realrect* box)
|
||||
switch (pdf_box) {
|
||||
default:
|
||||
case pdfbox_crop:
|
||||
- r = page->getCropBox();
|
||||
+ r = (PDFRectangle *)page->getCropBox();
|
||||
break;
|
||||
case pdfbox_media:
|
||||
- r = page->getMediaBox();
|
||||
+ r = (PDFRectangle *)page->getMediaBox();
|
||||
break;
|
||||
case pdfbox_bleed:
|
||||
- r = page->getBleedBox();
|
||||
+ r = (PDFRectangle *)page->getBleedBox();
|
||||
break;
|
||||
case pdfbox_trim:
|
||||
- r = page->getTrimBox();
|
||||
+ r = (PDFRectangle *)page->getTrimBox();
|
||||
break;
|
||||
case pdfbox_art:
|
||||
- r = page->getArtBox();
|
||||
+ r = (PDFRectangle *)page->getArtBox();
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user