extra/texlive-bin to 2018.47465-4

This commit is contained in:
Kevin Mihelich 2018-10-30 00:17:14 +00:00
parent 1a56c8a587
commit e8566d57d2
4 changed files with 2618 additions and 109 deletions

View file

@ -1,4 +1,3 @@
# $Id$
# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: francois <francois.archlinux.org>
@ -10,7 +9,7 @@
pkgname=('texlive-bin' 'libsynctex')
pkgver=2018.47465
pkgrel=3
pkgrel=4
license=('GPL')
arch=('x86_64')
makedepends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler'
@ -19,11 +18,13 @@ makedepends=('cairo' 'pixman' 'graphite' 't1lib' 'gd' 'poppler'
'perl')
url='http://tug.org/texlive/'
source=("https://sources.archlinux.org/other/texlive/texlive-bin-source-${pkgver}.tar.xz"
"texlive-poppler-0.64.patch"
"poppler-compat-fixes-up-to-0.70.patch"
"luatex-poppler-0.70-const-fixes.patch"
"freetype-pkgconfig.patch"
"synctex-missing-header.patch")
sha256sums=('06d7a1c939cf7d6035850cefca1d01898ae51a879e20db684a202fd507a0cae5'
'1c444526e3967f82d68a003526b332e0401db7825e22b5542e6cd04f0e688310'
'1a76b4be5544e431b60dace28169870a8b275e6d80323f9ef7f49b7da8df0b29'
'f1d8b23f3072001fae5f2147aa4a50520d89fbc5b683c0da10b1417e52173c7a'
'bed44f4ccda369410e90eac527cf44b8c1afda7d987ae521b4fd5edb425eef3e'
'b6c81eb091b5910226e0359768edd178680debee56b63ab0a3753c3429c28ab0')
@ -43,13 +44,14 @@ prepare() {
## prevent compiling Xdvi with libXp
sed -i~ 's|-lXp ||' texk/xdvik/configure
# Poppler 0.64 now returns const char* in getCString()
patch -Np1 -i "${srcdir}/texlive-poppler-0.64.patch"
# upstream compat fixes for latest poppler
patch -Np1 -i "${srcdir}/poppler-compat-fixes-up-to-0.70.patch"
cp -pv texk/web2c/pdftexdir/pdftoepdf{-poppler0.70.0,}.cc
cp -pv texk/web2c/pdftexdir/pdftosrc{-newpoppler,}.cc
# Poppler 0.58 introduces API changes by hiding internal object
# management.
cp -pv texk/web2c/pdftexdir/pdftoepdf{-newpoppler.cc,.cc}
cp -pv texk/web2c/pdftexdir/pdftosrc{-newpoppler.cc,.cc}
# luatex switched from poppler to pplib in newer versions so
# upstream fixes aren't available; hopefully this is correct
patch -Np1 -i "${srcdir}/luatex-poppler-0.70-const-fixes.patch"
}
build() {

View file

@ -0,0 +1,122 @@
diff -upr source.orig/texk/web2c/luatexdir/image/pdftoepdf.w source/texk/web2c/luatexdir/image/pdftoepdf.w
--- source.orig/texk/web2c/luatexdir/image/pdftoepdf.w 2018-10-28 14:14:32.961111369 +0200
+++ source/texk/web2c/luatexdir/image/pdftoepdf.w 2018-10-28 14:24:21.735889333 +0200
@@ -363,7 +363,7 @@ void copyReal(PDF pdf, double d)
static void copyString(PDF pdf, GooString * string)
{
- char *p;
+ const char *p;
unsigned char c;
size_t i, l;
p = string->getCString();
@@ -393,7 +393,7 @@ static void copyString(PDF pdf, GooStrin
pdf->cave = true;
}
-static void copyName(PDF pdf, char *s)
+static void copyName(PDF pdf, const char *s)
{
pdf_out(pdf, '/');
for (; *s != 0; s++) {
@@ -475,7 +475,7 @@ static void copyObject(PDF pdf, PdfDocum
copyString(pdf, (GooString *)obj->getString());
break;
case objName:
- copyName(pdf, (char *)obj->getName());
+ copyName(pdf, obj->getName());
break;
case objNull:
pdf_add_null(pdf);
@@ -531,22 +531,22 @@ static PDFRectangle *get_pagebox(Page *
{
switch (pagebox_spec) {
case PDF_BOX_SPEC_MEDIA:
- return page->getMediaBox();
+ return (PDFRectangle *) page->getMediaBox();
break;
case PDF_BOX_SPEC_CROP:
- return page->getCropBox();
+ return (PDFRectangle *) page->getCropBox();
break;
case PDF_BOX_SPEC_BLEED:
- return page->getBleedBox();
+ return (PDFRectangle *) page->getBleedBox();
break;
case PDF_BOX_SPEC_TRIM:
- return page->getTrimBox();
+ return (PDFRectangle *) page->getTrimBox();
break;
case PDF_BOX_SPEC_ART:
- return page->getArtBox();
+ return (PDFRectangle *) page->getArtBox();
break;
default:
- return page->getMediaBox();
+ return (PDFRectangle *) page->getMediaBox();
break;
}
}
diff -upr source.orig/texk/web2c/luatexdir/lua/lepdflib.cc source/texk/web2c/luatexdir/lua/lepdflib.cc
--- source.orig/texk/web2c/luatexdir/lua/lepdflib.cc 2018-10-28 14:14:32.961111369 +0200
+++ source/texk/web2c/luatexdir/lua/lepdflib.cc 2018-10-28 14:19:28.093424519 +0200
@@ -596,7 +596,7 @@ static int m_##in##_##function(lua_State
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
pdfdoc_changed_error(L); \
- o = ((in *) uin->d)->function(); \
+ o = (out *) ((in *) uin->d)->function(); \
if (o != NULL) { \
uout = new_##out##_userdata(L); \
uout->d = o; \
@@ -1125,12 +1125,12 @@ m_poppler_get_INT(Dict, getLength);
static int m_Dict_add(lua_State * L)
{
- char *s;
+ const char *s;
udstruct *uin, *uobj;
uin = (udstruct *) luaL_checkudata(L, 1, M_Dict);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- s = copyString(luaL_checkstring(L, 2));
+ s = luaL_checkstring(L, 2);
uobj = (udstruct *) luaL_checkudata(L, 3, M_Object);
((Dict *) uin->d)->add(s, std::move(*((Object *) uobj->d)));
return 0;
@@ -2051,7 +2051,7 @@ static int m_Object_dictAdd(lua_State *
pdfdoc_changed_error(L);
if (!((Object *) uin->d)->isDict())
luaL_error(L, "Object is not a Dict");
- ((Object *) uin->d)->dictAdd(copyString(s), std::move(*((Object *) uobj->d)));
+ ((Object *) uin->d)->dictAdd(s, std::move(*((Object *) uobj->d)));
return 0;
}
@@ -2470,7 +2470,7 @@ static int m_PDFDoc_getFileName(lua_Stat
uin = (udstruct *) luaL_checkudata(L, 1, M_PDFDoc);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
- gs = ((PdfDocument *) uin->d)->doc->getFileName();
+ gs = (GooString *) ((PdfDocument *) uin->d)->doc->getFileName();
if (gs != NULL)
lua_pushlstring(L, gs->getCString(), gs->getLength());
else
@@ -2559,7 +2559,7 @@ static int m_PDFDoc_readMetadata(lua_Sta
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
- gs = ((PdfDocument *) uin->d)->doc->readMetadata();
+ gs = (GooString *) ((PdfDocument *) uin->d)->doc->readMetadata();
if (gs != NULL)
lua_pushlstring(L, gs->getCString(), gs->getLength());
else
@@ -2577,7 +2577,7 @@ static int m_PDFDoc_getStructTreeRoot(lu
if (uin->pd != NULL && uin->pd->pc != uin->pc)
pdfdoc_changed_error(L);
if (((PdfDocument *) uin->d)->doc->getCatalog()->isOk()) {
- obj = ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
+ obj = (StructTreeRoot *) ((PdfDocument *) uin->d)->doc->getStructTreeRoot();
uout = new_StructTreeRoot_userdata(L);
uout->d = obj;
uout->pc = uin->pc;

File diff suppressed because it is too large Load diff

View file

@ -1,99 +0,0 @@
diff -ur source/texk/web2c/luatexdir/image/pdftoepdf.w source.new/texk/web2c/luatexdir/image/pdftoepdf.w
--- source/texk/web2c/luatexdir/image/pdftoepdf.w 2018-04-23 08:46:00.031575505 +0200
+++ source.new/texk/web2c/luatexdir/image/pdftoepdf.w 2018-04-23 08:42:06.762986242 +0200
@@ -357,9 +357,9 @@
pdf->cave = true;
}
-static void copyString(PDF pdf, GooString * string)
+static void copyString(PDF pdf, const GooString * string)
{
- char *p;
+ const char *p;
unsigned char c;
size_t i, l;
p = string->getCString();
@@ -389,7 +389,7 @@
pdf->cave = true;
}
-static void copyName(PDF pdf, char *s)
+static void copyName(PDF pdf, const char *s)
{
pdf_out(pdf, '/');
for (; *s != 0; s++) {
diff -ur source/texk/web2c/luatexdir/lua/lepdflib.cc source.new/texk/web2c/luatexdir/lua/lepdflib.cc
--- source/texk/web2c/luatexdir/lua/lepdflib.cc 2018-04-23 08:46:00.032575486 +0200
+++ source.new/texk/web2c/luatexdir/lua/lepdflib.cc 2018-04-23 08:42:06.762986242 +0200
@@ -516,7 +516,7 @@
#define m_poppler_get_GOOSTRING(in, function) \
static int m_##in##_##function(lua_State * L) \
{ \
- GooString *gs; \
+ const GooString *gs; \
udstruct *uin; \
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
@@ -1650,7 +1650,7 @@
static int m_Object_getString(lua_State * L)
{
- GooString *gs;
+ const GooString *gs;
udstruct *uin;
uin = (udstruct *) luaL_checkudata(L, 1, M_Object);
if (uin->pd != NULL && uin->pd->pc != uin->pc)
diff -ur source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc source.new/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
--- source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc 2018-04-23 21:27:36.254598208 +0200
+++ source.new/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc 2018-04-23 21:17:36.475663912 +0200
@@ -275,7 +275,7 @@
static void copyObject(Object *);
-static void copyName(char *s)
+static void copyName(const char *s)
{
pdf_puts("/");
for (; *s != 0; s++) {
@@ -418,7 +418,7 @@
&& fontdescRef.isRef()
&& fontdesc.isDict()
&& embeddableFont(&fontdesc)
- && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
+ && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
// round /StemV value, since the PDF input is a float
// (see Font Descriptors in PDF reference), but we only store an
// integer, since we don't want to change the struct.
@@ -427,7 +427,7 @@
charset = fontdesc.dictLookup("CharSet");
if (!charset.isNull() &&
charset.isString() && is_subsetable(fontmap))
- epdf_mark_glyphs(fd, charset.getString()->getCString());
+ epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
else
embed_whole_font(fd);
addFontDesc(fontdescRef.getRef(), fd);
@@ -554,8 +554,8 @@
Object obj1;
int i, l, c;
Ref ref;
- char *p;
- GString *s;
+ const char *p;
+ const GString *s;
if (obj->isBool()) {
pdf_printf("%s", obj->getBool()? "true" : "false");
} else if (obj->isInt()) {
diff -ur source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc source.new/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
--- source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc 2018-04-23 21:27:36.254598208 +0200
+++ source.new/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc 2018-04-23 08:42:06.762986242 +0200
@@ -68,7 +68,7 @@
Stream *s;
Object srcStream, srcName, catalogDict;
FILE *outfile;
- char *outname;
+ const char *outname;
int objnum = 0, objgen = 0;
bool extract_xref_table = false;
int c;