drop unused patches and cleanup

This commit is contained in:
Than Ngo 2023-06-20 15:19:07 +02:00
parent 8d392f49a3
commit a4966946ea
16 changed files with 1 additions and 3514 deletions

View File

@ -1,20 +0,0 @@
diff -up texlive-base-20200327/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler090 texlive-base-20200327/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20200327/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler090 2020-07-14 13:13:31.620607263 -0400
+++ texlive-base-20200327/source/texk/web2c/pdftexdir/pdftoepdf.cc 2020-07-14 13:16:01.530248309 -0400
@@ -766,7 +766,7 @@ read_pdf_info(char *image_name, char *pa
if (page_name) {
// get page by name
GString name(page_name);
- LinkDest *link = pdf_doc->doc->findDest(&name);
+ std::unique_ptr<LinkDest> link = pdf_doc->doc->findDest(&name);
if (link == 0 || !link->isOk())
pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
Ref ref = link->getPageRef();
@@ -774,7 +774,6 @@ read_pdf_info(char *image_name, char *pa
if (page_num == 0)
pdftex_fail("PDF inclusion: destination is not a page <%s>",
page_name);
- delete link;
} else {
// get page by number
if (page_num <= 0 || page_num > epdf_num_pages)

View File

@ -1,578 +0,0 @@
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.newpoppler texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.newpoppler 2020-05-14 17:45:48.000000000 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2021-05-06 17:39:49.308416042 -0400
@@ -1,5 +1,5 @@
/*
-Copyright 1996-2016 Han The Thanh, <thanh@pdftex.org>
+Copyright 1996-2017 Han The Thanh, <thanh@pdftex.org>
This file is part of pdfTeX.
@@ -17,6 +17,15 @@ You should have received a copy of the G
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. A little modifications are made to avoid a crash for
+some kind of pdf images, such as figure_missing.pdf in gnuplot.
+The poppler should be 0.59.0 or newer versions.
+POPPLER_VERSION should be defined.
+*/
+
/* Do this early in order to avoid a conflict between
MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and
<kpathsea/types.h> defining Pascal's boolean as 'int'.
@@ -75,31 +84,6 @@ extern integer zround(double);
#define MASK_SUPPRESS_PTEX_PAGENUMBER 0x04
#define MASK_SUPPRESS_PTEX_INFODICT 0x08
-// PdfObject encapsulates the xpdf Object type,
-// and properly frees its resources on destruction.
-// Use obj-> to access members of the Object,
-// and &obj to get a pointer to the object.
-// It is no longer necessary to call Object::free explicitely.
-
-class PdfObject {
- public:
- PdfObject() { // nothing
- } ~PdfObject() {
- iObject.free();
- }
- Object *operator->() {
- return &iObject;
- }
- Object *operator&() {
- return &iObject;
- }
- private: // no copying or assigning
- PdfObject(const PdfObject &);
- void operator=(const PdfObject &);
- public:
- Object iObject;
-};
-
// When copying the Resources of the selected page, all objects are copied
// recusively top-down. Indirect objects however are not fetched during
// copying, but get a new object number from pdfTeX and then will be
@@ -203,18 +187,6 @@ static void delete_document(PdfDocument
delete pdf_doc;
}
-// Replacement for
-// Object *initDict(Dict *dict1){ initObj(objDict); dict = dict1; return this; }
-
-static void initDictFromDict(PdfObject & obj, Dict * dict)
-{
- obj->initDict(xref);
- for (int i = 0, l = dict->getLength(); i < l; i++) {
- Object obj1;
- obj->dictAdd(copyString(dict->getKey(i)), dict->getValNF(i, &obj1));
- }
-}
-
// --------------------------------------------------------------------
static int addEncoding(GfxFont * gfont)
@@ -311,10 +283,10 @@ static void copyName(char *s)
static void copyDictEntry(Object * obj, int i)
{
- PdfObject obj1;
+ Object obj1;
copyName(obj->dictGetKey(i));
pdf_puts(" ");
- obj->dictGetValNF(i, &obj1);
+ obj1 = obj->dictGetValNF(i);
copyObject(&obj1);
pdf_puts("\n");
}
@@ -367,17 +339,17 @@ static void copyStream(Stream * str)
static void copyProcSet(Object * obj)
{
int i, l;
- PdfObject procset;
+ Object procset;
if (!obj->isArray())
pdftex_fail("PDF inclusion: invalid ProcSet array type <%s>",
obj->getTypeName());
pdf_puts("/ProcSet [ ");
for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
- obj->arrayGetNF(i, &procset);
- if (!procset->isName())
+ procset = obj->arrayGetNF(i);
+ if (!procset.isName())
pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
- procset->getTypeName());
- copyName(procset->getName());
+ procset.getTypeName());
+ copyName(procset.getName());
pdf_puts(" ");
}
pdf_puts("]\n");
@@ -385,10 +357,29 @@ static void copyProcSet(Object * obj)
#define REPLACE_TYPE1C true
+static bool embeddableFont(Object * fontdesc)
+{
+ Object fontfile, ffsubtype;
+
+ if (!fontdesc->isDict())
+ return false;
+ fontfile = fontdesc->dictLookup("FontFile");
+ if (fontfile.isStream())
+ return true;
+ if (REPLACE_TYPE1C) {
+ fontfile = fontdesc->dictLookup("FontFile3");
+ if (!fontfile.isStream())
+ return false;
+ ffsubtype = fontfile.streamGetDict()->lookup("Subtype");
+ return ffsubtype.isName() && !strcmp(ffsubtype.getName(), "Type1C");
+ }
+ return false;
+}
+
static void copyFont(char *tag, Object * fontRef)
{
- PdfObject fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
- fontfile, ffsubtype, stemV;
+ Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
+ stemV;
GfxFont *gfont;
fd_entry *fd;
fm_entry *fontmap;
@@ -404,33 +395,39 @@ static void copyFont(char *tag, Object *
}
// Only handle included Type1 (and Type1C) fonts; anything else will be copied.
// Type1C fonts are replaced by Type1 fonts, if REPLACE_TYPE1C is true.
- if (!fixedinclusioncopyfont && fontRef->fetch(xref, &fontdict)->isDict()
- && fontdict->dictLookup("Subtype", &subtype)->isName()
- && !strcmp(subtype->getName(), "Type1")
- && fontdict->dictLookup("BaseFont", &basefont)->isName()
- && fontdict->dictLookupNF("FontDescriptor", &fontdescRef)->isRef()
- && fontdescRef->fetch(xref, &fontdesc)->isDict()
- && (fontdesc->dictLookup("FontFile", &fontfile)->isStream()
- || (REPLACE_TYPE1C
- && fontdesc->dictLookup("FontFile3", &fontfile)->isStream()
- && fontfile->streamGetDict()->lookup("Subtype",
- &ffsubtype)->isName()
- && !strcmp(ffsubtype->getName(), "Type1C")))
- && (fontmap = lookup_fontmap(basefont->getName())) != NULL) {
+ fontdict = fontRef->fetch(xref);
+ fontdesc = Object(objNull);
+ if (fontdict.isDict()) {
+ subtype = fontdict.dictLookup("Subtype");
+ basefont = fontdict.dictLookup("BaseFont");
+ fontdescRef = fontdict.dictLookupNF("FontDescriptor");
+ if (fontdescRef.isRef()) {
+ fontdesc = fontdescRef.fetch(xref);
+ }
+ }
+ if (!fixedinclusioncopyfont && fontdict.isDict()
+ && subtype.isName()
+ && !strcmp(subtype.getName(), "Type1")
+ && basefont.isName()
+ && fontdescRef.isRef()
+ && fontdesc.isDict()
+ && embeddableFont(&fontdesc)
+ && (fontmap = lookup_fontmap(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.
- fontdesc->dictLookup("StemV", &stemV);
- fd = epdf_create_fontdescriptor(fontmap, zround(stemV->getNum()));
- if (fontdesc->dictLookup("CharSet", &charset) &&
- charset->isString() && is_subsetable(fontmap))
- epdf_mark_glyphs(fd, charset->getString()->getCString());
+ stemV = fontdesc.dictLookup("StemV");
+ fd = epdf_create_fontdescriptor(fontmap, zround(stemV.getNum()));
+ charset = fontdesc.dictLookup("CharSet");
+ if (!charset.isNull() &&
+ charset.isString() && is_subsetable(fontmap))
+ epdf_mark_glyphs(fd, charset.getString()->getCString());
else
embed_whole_font(fd);
- addFontDesc(fontdescRef->getRef(), fd);
+ addFontDesc(fontdescRef.getRef(), fd);
copyName(tag);
gfont = GfxFont::makeFont(xref, tag, fontRef->getRef(),
- fontdict->getDict());
+ fontdict.getDict());
pdf_printf(" %d 0 R ", addFont(fontRef->getRef(), fd,
addEncoding(gfont)));
} else {
@@ -442,24 +439,24 @@ static void copyFont(char *tag, Object *
static void copyFontResources(Object * obj)
{
- PdfObject fontRef;
+ Object fontRef;
int i, l;
if (!obj->isDict())
pdftex_fail("PDF inclusion: invalid font resources dict type <%s>",
obj->getTypeName());
pdf_puts("/Font << ");
for (i = 0, l = obj->dictGetLength(); i < l; ++i) {
- obj->dictGetValNF(i, &fontRef);
- if (fontRef->isRef())
+ fontRef = obj->dictGetValNF(i);
+ if (fontRef.isRef())
copyFont(obj->dictGetKey(i), &fontRef);
- else if (fontRef->isDict()) { // some programs generate pdf with embedded font object
+ else if (fontRef.isDict()) { // some programs generate pdf with embedded font object
copyName(obj->dictGetKey(i));
pdf_puts(" ");
copyObject(&fontRef);
}
else
pdftex_fail("PDF inclusion: invalid font in reference type <%s>",
- fontRef->getTypeName());
+ fontRef.getTypeName());
}
pdf_puts(">>\n");
}
@@ -548,7 +545,7 @@ static char *convertNumToPDF(double n)
static void copyObject(Object * obj)
{
- PdfObject obj1;
+ Object obj1;
int i, l, c;
Ref ref;
char *p;
@@ -592,8 +589,8 @@ static void copyObject(Object * obj)
} else if (obj->isArray()) {
pdf_puts("[");
for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
- obj->arrayGetNF(i, &obj1);
- if (!obj1->isName())
+ obj1 = obj->arrayGetNF(i);
+ if (!obj1.isName())
pdf_puts(" ");
copyObject(&obj1);
}
@@ -603,9 +600,8 @@ static void copyObject(Object * obj)
copyDict(obj);
pdf_puts(">>");
} else if (obj->isStream()) {
- initDictFromDict(obj1, obj->streamGetDict());
pdf_puts("<<\n");
- copyDict(&obj1);
+ copyDict(obj->getStream()->getDictObject());
pdf_puts(">>\n");
pdf_puts("stream\n");
copyStream(obj->getStream()->getUndecodedStream());
@@ -629,9 +625,8 @@ static void writeRefs()
InObj *r;
for (r = inObjList; r != 0; r = r->next) {
if (!r->written) {
- Object obj1;
r->written = 1;
- xref->fetch(r->ref.num, r->ref.gen, &obj1);
+ Object obj1 = xref->fetch(r->ref.num, r->ref.gen);
if (r->type == objFont) {
assert(!obj1.isStream());
pdfbeginobj(r->num, 2); // \pdfobjcompresslevel = 2 is for this
@@ -647,7 +642,6 @@ static void writeRefs()
pdf_puts("\n");
pdfendobj();
}
- obj1.free();
}
}
}
@@ -805,8 +799,8 @@ void write_epdf(void)
Page *page;
Ref *pageRef;
Dict *pageDict;
- PdfObject contents, obj1, obj2, pageObj, dictObj;
- PdfObject groupDict;
+ Object contents, obj1, obj2, pageObj, dictObj;
+ Object groupDict;
bool writeSepGroup = false;
Object info;
char *key;
@@ -833,8 +827,8 @@ void write_epdf(void)
encodingList = 0;
page = pdf_doc->doc->getCatalog()->getPage(epdf_selected_page);
pageRef = pdf_doc->doc->getCatalog()->getPageRef(epdf_selected_page);
- xref->fetch(pageRef->num, pageRef->gen, &pageObj);
- pageDict = pageObj->getDict();
+ pageObj = xref->fetch(pageRef->num, pageRef->gen);
+ pageDict = pageObj.getDict();
rotate = page->getRotate();
PDFRectangle *pagebox;
// write the Page header
@@ -852,7 +846,7 @@ void write_epdf(void)
pdf_printf("/%s.PageNumber %i\n", pdfkeyprefix, (int) epdf_selected_page);
}
if ((suppress_ptex_info & MASK_SUPPRESS_PTEX_INFODICT) == 0) {
- pdf_doc->doc->getDocInfoNF(&info);
+ info = pdf_doc->doc->getDocInfoNF();
if (info.isRef()) {
// the info dict must be indirect (PDF Ref p. 61)
pdf_printf("/%s.InfoDict ", pdfkeyprefix);
@@ -908,14 +902,14 @@ void write_epdf(void)
pdf_puts(stripzeros(s));
// Metadata validity check (as a stream it must be indirect)
- pageDict->lookupNF("Metadata", &dictObj);
- if (!dictObj->isNull() && !dictObj->isRef())
+ dictObj = pageDict->lookupNF("Metadata");
+ if (!dictObj.isNull() && !dictObj.isRef())
pdftex_warn("PDF inclusion: /Metadata must be indirect object");
// copy selected items in Page dictionary except Resources & Group
for (i = 0; pageDictKeys[i] != NULL; i++) {
- pageDict->lookupNF(pageDictKeys[i], &dictObj);
- if (!dictObj->isNull()) {
+ dictObj = pageDict->lookupNF(pageDictKeys[i]);
+ if (!dictObj.isNull()) {
pdf_newline();
pdf_printf("/%s ", pageDictKeys[i]);
copyObject(&dictObj); // preserves indirection
@@ -923,8 +917,8 @@ void write_epdf(void)
}
// handle page group
- pageDict->lookupNF("Group", &dictObj);
- if (!dictObj->isNull()) {
+ dictObj = pageDict->lookupNF("Group");
+ if (!dictObj.isNull()) {
if (pdfpagegroupval == 0) {
// another pdf with page group was included earlier on the
// same page; copy the Group entry as is. See manual for
@@ -938,11 +932,36 @@ void write_epdf(void)
copyObject(&dictObj);
} else {
// write Group dict as a separate object, since the Page dict also refers to it
- pageDict->lookup("Group", &dictObj);
- if (!dictObj->isDict())
+ dictObj = pageDict->lookup("Group");
+ if (!dictObj.isDict())
pdftex_fail("PDF inclusion: /Group dict missing");
writeSepGroup = true;
- initDictFromDict(groupDict, page->getGroup());
+/*
+This part is only a single line
+ groupDict = Object(page->getGroup());
+in the original patch. In this case, however, pdftex crashes at
+"delete pdf_doc->doc" in "delete_document()" for inclusion of some
+kind of pdf images, for example, figure_missing.pdf in gnuplot.
+A change
+ groupDict = Object(page->getGroup()).copy();
+does not improve the situation.
+The changes below seem to work fine.
+*/
+// begin modification
+ groupDict = pageDict->lookup("Group");
+ const Dict& dic1 = page->getGroup();
+ const Dict& dic2 = groupDict.getDict();
+ // replace dic2 in groupDict with dic1
+ l = dic2.getLength();
+ for (i = 0; i < l; i++) {
+ groupDict.dictRemove(dic2.getKey(i));
+ }
+ l = dic1.getLength();
+ for (i = 0; i < l; i++) {
+ groupDict.dictAdd(copyString(dic1.getKey(i)),
+ dic1.getValNF(i));
+ }
+// end modification
pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval);
}
}
@@ -955,14 +974,14 @@ void write_epdf(void)
pdftex_warn
("PDF inclusion: /Resources missing. 'This practice is not recommended' (PDF Ref)");
} else {
- initDictFromDict(obj1, page->getResourceDict());
+ Object *obj1 = page->getResourceDictObject();
if (!obj1->isDict())
pdftex_fail("PDF inclusion: invalid resources dict type <%s>",
obj1->getTypeName());
pdf_newline();
pdf_puts("/Resources <<\n");
for (i = 0, l = obj1->dictGetLength(); i < l; ++i) {
- obj1->dictGetVal(i, &obj2);
+ obj2 = obj1->dictGetVal(i);
key = obj1->dictGetKey(i);
if (strcmp("Font", key) == 0)
copyFontResources(&obj2);
@@ -975,8 +994,8 @@ void write_epdf(void)
}
// write the page contents
- page->getContents(&contents);
- if (contents->isStream()) {
+ contents = page->getContents();
+ if (contents.isStream()) {
// Variant A: get stream and recompress under control
// of \pdfcompresslevel
@@ -987,36 +1006,35 @@ void write_epdf(void)
// Variant B: copy stream without recompressing
//
- contents->streamGetDict()->lookup("F", &obj1);
- if (!obj1->isNull()) {
+ obj1 = contents.streamGetDict()->lookup("F");
+ if (!obj1.isNull()) {
pdftex_fail("PDF inclusion: Unsupported external stream");
}
- contents->streamGetDict()->lookup("Length", &obj1);
- assert(!obj1->isNull());
+ obj1 = contents.streamGetDict()->lookup("Length");
+ assert(!obj1.isNull());
pdf_puts("/Length ");
copyObject(&obj1);
pdf_puts("\n");
- contents->streamGetDict()->lookup("Filter", &obj1);
- if (!obj1->isNull()) {
+ obj1 = contents.streamGetDict()->lookup("Filter");
+ if (!obj1.isNull()) {
pdf_puts("/Filter ");
copyObject(&obj1);
pdf_puts("\n");
- contents->streamGetDict()->lookup("DecodeParms", &obj1);
- if (!obj1->isNull()) {
+ obj1 = contents.streamGetDict()->lookup("DecodeParms");
+ if (!obj1.isNull()) {
pdf_puts("/DecodeParms ");
copyObject(&obj1);
pdf_puts("\n");
}
}
pdf_puts(">>\nstream\n");
- copyStream(contents->getStream()->getUndecodedStream());
+ copyStream(contents.getStream()->getUndecodedStream());
pdfendstream();
- } else if (contents->isArray()) {
+ } else if (contents.isArray()) {
pdfbeginstream();
- for (i = 0, l = contents->arrayGetLength(); i < l; ++i) {
- Object contentsobj;
- copyStream((contents->arrayGet(i, &contentsobj))->getStream());
- contentsobj.free();
+ for (i = 0, l = contents.arrayGetLength(); i < l; ++i) {
+ Object contentsobj = contents.arrayGet(i);
+ copyStream(contentsobj.getStream());
if (i < l - 1)
pdf_newline(); // add a newline after each stream except the last
}
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.newpoppler texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.newpoppler 2020-05-14 17:45:48.000000000 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc 2021-05-06 17:50:38.863177570 -0400
@@ -16,6 +16,14 @@ GNU General Public License for more deta
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.59.0 or newer versions.
+POPPLER_VERSION should be defined.
+*/
+
#include <w2c/config.h>
#include <stdlib.h>
@@ -77,22 +85,20 @@ int main(int argc, char *argv[])
objgen = atoi(argv[3]);
}
xref = doc->getXRef();
- catalogDict.initNull();
- xref->getCatalog(&catalogDict);
+ catalogDict = xref->getCatalog();
if (!catalogDict.isDict("Catalog")) {
fprintf(stderr, "No Catalog found\n");
exit(1);
}
- srcStream.initNull();
+ srcStream = Object(objNull);
if (objnum == 0) {
- catalogDict.dictLookup("SourceObject", &srcStream);
+ srcStream = catalogDict.dictLookup("SourceObject");
static char const_SourceFile[] = "SourceFile";
if (!srcStream.isStream(const_SourceFile)) {
fprintf(stderr, "No SourceObject found\n");
exit(1);
}
- srcName.initNull();
- srcStream.getStream()->getDict()->lookup("SourceName", &srcName);
+ srcName = srcStream.getStream()->getDict()->lookup("SourceName");
if (!srcName.isString()) {
fprintf(stderr, "No SourceName found\n");
exit(1);
@@ -101,7 +107,7 @@ int main(int argc, char *argv[])
// We cannot free srcName, as objname shares its string.
// srcName.free();
} else if (objnum > 0) {
- xref->fetch(objnum, objgen, &srcStream);
+ srcStream = xref->fetch(objnum, objgen);
if (!srcStream.isStream()) {
fprintf(stderr, "Not a Stream object\n");
exit(1);
@@ -151,26 +157,24 @@ int main(int argc, char *argv[])
int localOffset = 0;
Guint firstOffset;
- assert(xref->fetch(e->offset, 0, &objStr)->isStream());
- nObjects = objStr.streamGetDict()->lookup("N", &obj1)->getInt();
- obj1.free();
- first = objStr.streamGetDict()->lookup("First", &obj1)->getInt();
- obj1.free();
+ 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();
- obj1.initNull();
- str = new EmbedStream(objStr.getStream(), &obj1, gTrue, first);
+ str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
lexer = new Lexer(xref, str);
parser = new Parser(xref, lexer, gFalse);
for (n = 0; n < nObjects; ++n) {
- parser->getObj(&obj1);
- parser->getObj(&obj2);
+ obj1 = parser->getObj();
+ obj2 = parser->getObj();
if (n == e->gen)
localOffset = obj2.getInt();
- obj1.free();
- obj2.free();
}
#if defined(XPDF304)
while (str->getChar() != EOF) ;
@@ -178,7 +182,6 @@ int main(int argc, char *argv[])
lexer->skipToEOF();
#endif
delete parser;
- objStr.free();
fprintf(outfile, "%.10lu 00000 n\n",
(long unsigned)(firstOffset + localOffset));
@@ -189,7 +192,6 @@ int main(int argc, char *argv[])
s->reset();
while ((c = s->getChar()) != EOF)
fputc(c, outfile);
- srcStream.free();
}
if (objnum == 0)
fprintf(stderr, "Source file extracted to %s\n", outname);
@@ -198,7 +200,6 @@ int main(int argc, char *argv[])
else
fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
fclose(outfile);
- catalogDict.free();
delete doc;
delete globalParams;
}

View File

@ -1,200 +0,0 @@
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.73 texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.73 2021-05-06 18:01:35.847959461 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2021-05-06 18:08:20.143955577 -0400
@@ -114,7 +114,7 @@ struct UsedEncoding {
static InObj *inObjList;
static UsedEncoding *encodingList;
-static GBool isInit = gFalse;
+static bool isInit = false;
// --------------------------------------------------------------------
// Maintain list of open embedded PDF files
@@ -269,7 +269,7 @@ static int getNewObjectNumber(Ref ref)
static void copyObject(Object *);
-static void copyName(char *s)
+static void copyName(const char *s)
{
pdf_puts("/");
for (; *s != 0; s++) {
@@ -304,7 +304,7 @@ static void copyDict(Object * obj)
static void copyFontDict(Object * obj, InObj * r)
{
int i, l;
- char *key;
+ const char *key;
if (!obj->isDict())
pdftex_fail("PDF inclusion: invalid dict type <%s>",
obj->getTypeName());
@@ -376,7 +376,7 @@ static bool embeddableFont(Object * font
return false;
}
-static void copyFont(char *tag, Object * fontRef)
+static void copyFont(const char *tag, Object * fontRef)
{
Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
stemV;
@@ -412,7 +412,7 @@ static void copyFont(char *tag, Object *
&& 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.
@@ -421,7 +421,7 @@ static void copyFont(char *tag, Object *
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()->c_str());
else
embed_whole_font(fd);
addFontDesc(fontdescRef.getRef(), fd);
@@ -461,7 +461,7 @@ static void copyFontResources(Object * o
pdf_puts(">>\n");
}
-static void copyOtherResources(Object * obj, char *key)
+static void copyOtherResources(Object * obj, const char *key)
{
// copies all other resources (write_epdf handles Fonts and ProcSets),
@@ -548,8 +548,8 @@ static void copyObject(Object * obj)
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()) {
@@ -560,7 +560,7 @@ static void copyObject(Object * obj)
pdf_printf("%s", convertNumToPDF(obj->getNum()));
} else if (obj->isString()) {
s = obj->getString();
- p = s->getCString();
+ p = s->c_str();
l = s->getLength();
if (strlen(p) == (unsigned int) l) {
pdf_puts("(");
@@ -658,7 +658,7 @@ static void writeEncodings()
("PDF inclusion: CID fonts are not supported"
" (try to disable font replacement to fix this)");
}
- if ((s = ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
+ if ((s = (char *) ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
glyphNames[i] = s;
else
glyphNames[i] = notdef;
@@ -673,7 +673,7 @@ static void writeEncodings()
}
// get the pagebox according to the pagebox_spec
-static PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
+static const PDFRectangle *get_pagebox(Page * page, int pagebox_spec)
{
if (pagebox_spec == pdfboxspecmedia)
return page->getMediaBox();
@@ -705,13 +705,13 @@ read_pdf_info(char *image_name, char *pa
{
PdfDocument *pdf_doc;
Page *page;
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
float pdf_version_found, pdf_version_wanted;
// initialize
if (!isInit) {
globalParams = new GlobalParams();
- globalParams->setErrQuiet(gFalse);
- isInit = gTrue;
+ globalParams->setErrQuiet(false);
+ isInit = true;
}
// open PDF file
pdf_doc = find_add_document(image_name);
@@ -803,7 +803,7 @@ void write_epdf(void)
Object groupDict;
bool writeSepGroup = false;
Object info;
- char *key;
+ const char *key;
char s[256];
int i, l;
int rotate;
@@ -830,7 +830,7 @@ void write_epdf(void)
pageObj = xref->fetch(pageRef->num, pageRef->gen);
pageDict = pageObj.getDict();
rotate = page->getRotate();
- PDFRectangle *pagebox;
+ const PDFRectangle *pagebox;
// write the Page header
pdf_puts("/Type /XObject\n");
pdf_puts("/Subtype /Form\n");
@@ -958,7 +958,7 @@ The changes below seem to work fine.
}
l = dic1.getLength();
for (i = 0; i < l; i++) {
- groupDict.dictAdd(copyString(dic1.getKey(i)),
+ groupDict.dictAdd(dic1.getKey(i),
dic1.getValNF(i));
}
// end modification
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.73 texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.73 2021-05-06 18:01:35.847959461 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc 2021-05-06 18:01:35.854959565 -0400
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "No SourceName found\n");
exit(1);
}
- outname = srcName.getString()->getCString();
+ outname = (char *)srcName.getString()->c_str();
// We cannot free srcName, as objname shares its string.
// srcName.free();
} else if (objnum > 0) {
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Not a Stream object\n");
exit(1);
}
- sprintf(buf, "%s", fileName->getCString());
+ sprintf(buf, "%s", fileName->c_str());
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
if (objgen == 0)
@@ -122,7 +122,7 @@ int main(int argc, char *argv[])
outname = buf;
} else { // objnum < 0 means we are extracting the XRef table
extract_xref_table = true;
- sprintf(buf, "%s", fileName->getCString());
+ sprintf(buf, "%s", fileName->c_str());
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
sprintf(p, ".xref");
@@ -155,7 +155,7 @@ int main(int argc, char *argv[])
Object objStr, obj1, obj2;
int nObjects, first, n;
int localOffset = 0;
- Guint firstOffset;
+ unsigned int firstOffset;
objStr = xref->fetch(e->offset, 0);
assert(objStr.isStream());
@@ -167,9 +167,9 @@ int main(int argc, char *argv[])
// parse the header: object numbers and offsets
objStr.streamReset();
- str = new EmbedStream(objStr.getStream(), Object(objNull), gTrue, first);
+ str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
lexer = new Lexer(xref, str);
- parser = new Parser(xref, lexer, gFalse);
+ parser = new Parser(xref, lexer, false);
for (n = 0; n < nObjects; ++n) {
obj1 = parser->getObj();
obj2 = parser->getObj();
diff -up texlive-base-20210325/source/texk/web2c/xetexdir/pdfimage.cpp.poppler-0.73 texlive-base-20210325/source/texk/web2c/xetexdir/pdfimage.cpp

View File

@ -1,228 +0,0 @@
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.84 texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.84 2021-05-06 18:21:18.379430999 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2021-05-10 11:15:09.572907304 -0400
@@ -26,6 +26,15 @@ The poppler should be 0.59.0 or newer ve
POPPLER_VERSION should be defined.
*/
+#ifdef POPPLER_VERSION
+#include <poppler-config.h>
+#define xpdfVersion POPPLER_VERSION
+#define xpdfString "poppler"
+#else
+#include <xpdf/config.h> /* just to get the xpdf version */
+#define xpdfString "xpdf"
+#endif
+
/* Do this early in order to avoid a conflict between
MINGW32 <rpcndr.h> defining 'boolean' as 'unsigned char' and
<kpathsea/types.h> defining Pascal's boolean as 'int'.
@@ -286,7 +295,7 @@ static void copyDictEntry(Object * obj,
Object obj1;
copyName(obj->dictGetKey(i));
pdf_puts(" ");
- obj1 = obj->dictGetValNF(i);
+ obj1 = obj->dictGetValNF(i).copy();
copyObject(&obj1);
pdf_puts("\n");
}
@@ -345,7 +354,7 @@ static void copyProcSet(Object * obj)
obj->getTypeName());
pdf_puts("/ProcSet [ ");
for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
- procset = obj->arrayGetNF(i);
+ procset = obj->arrayGetNF(i).copy();
if (!procset.isName())
pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
procset.getTypeName());
@@ -400,7 +409,7 @@ static void copyFont(const char *tag, Ob
if (fontdict.isDict()) {
subtype = fontdict.dictLookup("Subtype");
basefont = fontdict.dictLookup("BaseFont");
- fontdescRef = fontdict.dictLookupNF("FontDescriptor");
+ fontdescRef = fontdict.dictLookupNF("FontDescriptor").copy();
if (fontdescRef.isRef()) {
fontdesc = fontdescRef.fetch(xref);
}
@@ -446,7 +455,7 @@ static void copyFontResources(Object * o
obj->getTypeName());
pdf_puts("/Font << ");
for (i = 0, l = obj->dictGetLength(); i < l; ++i) {
- fontRef = obj->dictGetValNF(i);
+ fontRef = obj->dictGetValNF(i).copy();
if (fontRef.isRef())
copyFont(obj->dictGetKey(i), &fontRef);
else if (fontRef.isDict()) { // some programs generate pdf with embedded font object
@@ -589,7 +598,7 @@ static void copyObject(Object * obj)
} else if (obj->isArray()) {
pdf_puts("[");
for (i = 0, l = obj->arrayGetLength(); i < l; ++i) {
- obj1 = obj->arrayGetNF(i);
+ obj1 = obj->arrayGetNF(i).copy();
if (!obj1.isName())
pdf_puts(" ");
copyObject(&obj1);
@@ -709,7 +718,7 @@ read_pdf_info(char *image_name, char *pa
float pdf_version_found, pdf_version_wanted;
// initialize
if (!isInit) {
- globalParams = new GlobalParams();
+ globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
globalParams->setErrQuiet(false);
isInit = true;
}
@@ -742,7 +751,7 @@ read_pdf_info(char *image_name, char *pa
if (link == 0 || !link->isOk())
pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
Ref ref = link->getPageRef();
- page_num = pdf_doc->doc->getCatalog()->findPage(ref.num, ref.gen);
+ page_num = pdf_doc->doc->getCatalog()->findPage(ref);
if (page_num == 0)
pdftex_fail("PDF inclusion: destination is not a page <%s>",
page_name);
@@ -902,13 +911,13 @@ void write_epdf(void)
pdf_puts(stripzeros(s));
// Metadata validity check (as a stream it must be indirect)
- dictObj = pageDict->lookupNF("Metadata");
+ dictObj = pageDict->lookupNF("Metadata").copy();
if (!dictObj.isNull() && !dictObj.isRef())
pdftex_warn("PDF inclusion: /Metadata must be indirect object");
// copy selected items in Page dictionary except Resources & Group
for (i = 0; pageDictKeys[i] != NULL; i++) {
- dictObj = pageDict->lookupNF(pageDictKeys[i]);
+ dictObj = pageDict->lookupNF(pageDictKeys[i]).copy();
if (!dictObj.isNull()) {
pdf_newline();
pdf_printf("/%s ", pageDictKeys[i]);
@@ -917,7 +926,7 @@ void write_epdf(void)
}
// handle page group
- dictObj = pageDict->lookupNF("Group");
+ dictObj = pageDict->lookupNF("Group").copy();
if (!dictObj.isNull()) {
if (pdfpagegroupval == 0) {
// another pdf with page group was included earlier on the
@@ -959,7 +968,7 @@ The changes below seem to work fine.
l = dic1.getLength();
for (i = 0; i < l; i++) {
groupDict.dictAdd(dic1.getKey(i),
- dic1.getValNF(i));
+ dic1.getValNF(i).copy());
}
// end modification
pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval);
@@ -1089,6 +1098,6 @@ void epdf_check_mem()
delete_document(p);
}
// see above for globalParams
- delete globalParams;
+ globalParams.reset();
}
}
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.84 texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.84 2021-05-06 18:21:18.379430999 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc 2021-05-06 18:21:18.383431058 -0400
@@ -24,6 +24,15 @@ by Arch Linux. The poppler should be 0.5
POPPLER_VERSION should be defined.
*/
+#ifdef POPPLER_VERSION
+#include <poppler-config.h>
+#define xpdfVersion POPPLER_VERSION
+#define xpdfString "poppler"
+#else
+#include <xpdf/config.h> /* just to get the xpdf version */
+#define xpdfString "xpdf"
+#endif
+
#include <w2c/config.h>
#include <stdlib.h>
@@ -73,7 +82,7 @@ int main(int argc, char *argv[])
exit(1);
}
fileName = new GString(argv[1]);
- globalParams = new GlobalParams();
+ globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
doc = new PDFDoc(fileName);
if (!doc->isOk()) {
fprintf(stderr, "Invalid PDF file\n");
@@ -94,7 +103,7 @@ int main(int argc, char *argv[])
if (objnum == 0) {
srcStream = catalogDict.dictLookup("SourceObject");
static char const_SourceFile[] = "SourceFile";
- if (!srcStream.isStream(const_SourceFile)) {
+ if (!(srcStream.isStream() && srcStream.getDict()->is(const_SourceFile))) {
fprintf(stderr, "No SourceObject found\n");
exit(1);
}
@@ -150,7 +159,6 @@ int main(int argc, char *argv[])
(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;
@@ -168,8 +176,7 @@ int main(int argc, char *argv[])
// parse the header: object numbers and offsets
objStr.streamReset();
str = new EmbedStream(objStr.getStream(), Object(objNull), true, first);
- lexer = new Lexer(xref, str);
- parser = new Parser(xref, lexer, false);
+ parser = new Parser(xref, str, false);
for (n = 0; n < nObjects; ++n) {
obj1 = parser->getObj();
obj2 = parser->getObj();
@@ -201,5 +208,5 @@ int main(int argc, char *argv[])
fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
fclose(outfile);
delete doc;
- delete globalParams;
+ globalParams.reset();
}
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/utils.c.poppler-0.84 texlive-base-20210325/source/texk/web2c/pdftexdir/utils.c
--- texlive-base-20210325/source/texk/web2c/pdftexdir/utils.c.poppler-0.84 2019-12-29 19:37:32.000000000 -0500
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/utils.c 2021-05-06 18:21:18.383431058 -0400
@@ -32,14 +32,6 @@ with this program. If not, see <http://
#include <zlib.h>
#include "ptexlib.h"
#include <png.h>
-#ifdef POPPLER_VERSION
-/* POPPLER_VERSION should be a proper version string */
-#define xpdfVersion POPPLER_VERSION
-#define xpdfString "poppler"
-#else
-#include <xpdf/config.h> /* just to get the xpdf version */
-#define xpdfString "xpdf"
-#endif
#define check_nprintf(size_get, size_want) \
if ((unsigned)(size_get) >= (unsigned)(size_want)) \
@@ -977,12 +969,10 @@ void initversionstring(char **versions)
{
const_string fmt =
"Compiled with libpng %s; using libpng %s\n"
- "Compiled with zlib %s; using zlib %s\n"
- "Compiled with %s version %s\n";
+ "Compiled with zlib %s; using zlib %s\n";
size_t len = strlen(fmt)
+ strlen(PNG_LIBPNG_VER_STRING) + strlen(png_libpng_ver)
+ strlen(ZLIB_VERSION) + strlen(zlib_version)
- + strlen(xpdfString) + strlen(xpdfVersion)
+ 1;
/* len will be more than enough, because of the placeholder chars in fmt
@@ -990,7 +980,7 @@ void initversionstring(char **versions)
*versions = xmalloc(len);
sprintf(*versions, fmt,
PNG_LIBPNG_VER_STRING, png_libpng_ver,
- ZLIB_VERSION, zlib_version, xpdfString, xpdfVersion);
+ ZLIB_VERSION, zlib_version);
}
diff -up texlive-base-20210325/source/texk/web2c/xetexdir/XeTeX_ext.c.poppler-0.84 texlive-base-20210325/source/texk/web2c/xetexdir/XeTeX_ext.c

View File

@ -1,140 +0,0 @@
diff -up texlive-base-20220321/source/texk/kpathsea/Makefile.am.dt texlive-base-20220321/source/texk/kpathsea/Makefile.am
--- texlive-base-20220321/source/texk/kpathsea/Makefile.am.dt 2020-06-22 18:11:50.000000000 -0400
+++ texlive-base-20220321/source/texk/kpathsea/Makefile.am 2022-04-24 15:03:32.852801273 -0400
@@ -275,7 +275,7 @@ uninstall-local:
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S;
AM_TESTS_ENVIRONMENT += LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfline.test tests/cnfnewline.test
+TESTS = tests/cnfnewline.test
TESTS += tests/cnfnull.test tests/cnfprog.test
TESTS += tests/kpseaccess.test
TESTS += tests/kpsereadlink.test tests/kpsestat.test tests/kpsewhich.test
diff -up texlive-base-20220321/source/texk/kpathsea/Makefile.in.dt texlive-base-20220321/source/texk/kpathsea/Makefile.in
--- texlive-base-20220321/source/texk/kpathsea/Makefile.in.dt 2021-10-04 11:13:00.000000000 -0400
+++ texlive-base-20220321/source/texk/kpathsea/Makefile.in 2022-04-24 15:03:32.852801273 -0400
@@ -861,7 +861,7 @@ dist_noinst_DATA = texmf.cnf
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; \
LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfline.test tests/cnfnewline.test tests/cnfnull.test \
+TESTS = tests/cnfnewline.test tests/cnfnull.test \
tests/cnfprog.test tests/kpseaccess.test \
tests/kpsereadlink.test tests/kpsestat.test \
tests/kpsewhich.test
diff -up texlive-base-20220321/source/texk/web2c/am/texmf.am.dt texlive-base-20220321/source/texk/web2c/am/texmf.am
--- texlive-base-20220321/source/texk/web2c/am/texmf.am.dt 2022-01-11 17:47:10.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/am/texmf.am 2022-04-24 15:03:32.850801263 -0400
@@ -77,7 +77,7 @@ DISTCLEANFILES += $(nodist_tex_SOURCES)
# TeX tests
#
-tex_tests = triptest.test tests/write18-quote-test.pl tests/tex-closeout.test
+tex_tests = tests/write18-quote-test.pl tests/tex-closeout.test
triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
tests/write18-quote-test.log tests/tex-closeout.test: tex$(EXEEXT)
EXTRA_DIST += $(tex_tests)
@@ -205,7 +205,7 @@ DISTCLEANFILES += $(nodist_libmf_a_SOURC
# Metafont tests
#
-mf_tests = mftraptest.test
+mf_tests =
mftraptest.log: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mf_tests)
if MF
diff -up texlive-base-20220321/source/texk/web2c/eptexdir/am/eptex.am.dt texlive-base-20220321/source/texk/web2c/eptexdir/am/eptex.am
--- texlive-base-20220321/source/texk/web2c/eptexdir/am/eptex.am.dt 2022-01-11 17:47:10.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/eptexdir/am/eptex.am 2022-04-24 15:03:32.850801263 -0400
@@ -89,7 +89,7 @@ EXTRA_DIST += \
# e-pTeX Tests
#
-eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test
+eptex_tests = eptexdir/epver.test
eptexdir/eptriptest.log: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
eptexdir/pdfprimitive.log: eptex$(EXEEXT)
eptexdir/epver.log: eptex$(EXEEXT)
diff -up texlive-base-20220321/source/texk/web2c/euptexdir/am/euptex.am.dt texlive-base-20220321/source/texk/web2c/euptexdir/am/euptex.am
--- texlive-base-20220321/source/texk/web2c/euptexdir/am/euptex.am.dt 2022-01-11 17:47:10.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/euptexdir/am/euptex.am 2022-04-24 15:03:32.850801263 -0400
@@ -90,7 +90,7 @@ EXTRA_DIST += \
# e-upTeX Tests
#
-euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test
+euptex_tests = euptexdir/eupver.test
euptexdir/euptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
euptexdir/pdfprimitive.log: euptex$(EXEEXT)
euptexdir/eupver.log: euptex$(EXEEXT)
diff -up texlive-base-20220321/source/texk/web2c/mfluadir/am/mflua.am.dt texlive-base-20220321/source/texk/web2c/mfluadir/am/mflua.am
--- texlive-base-20220321/source/texk/web2c/mfluadir/am/mflua.am.dt 2022-02-18 13:44:19.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/mfluadir/am/mflua.am 2022-04-24 15:03:32.850801263 -0400
@@ -110,7 +110,7 @@ EXTRA_DIST += \
# MFLua tests
#
-mflua_tests = mfluadir/mfluatraptest.test
+mflua_tests =
mfluadir/mfluatraptest.log: mflua$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mflua_tests)
diff -up texlive-base-20220321/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt texlive-base-20220321/source/texk/web2c/mfluajitdir/am/mfluajit.am
--- texlive-base-20220321/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt 2022-02-18 13:44:19.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/mfluajitdir/am/mfluajit.am 2022-04-24 15:03:32.851801268 -0400
@@ -106,7 +106,7 @@ EXTRA_DIST += \
# MFLuaJIT tests
#
-mfluajit_tests = mfluajitdir/mfluajittraptest.test
+mfluajit_tests =
mfluajitdir/mfluajittraptest.log: mfluajit$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mfluajit_tests)
diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/am/pdftex.am.dt texlive-base-20220321/source/texk/web2c/pdftexdir/am/pdftex.am
--- texlive-base-20220321/source/texk/web2c/pdftexdir/am/pdftex.am.dt 2022-04-24 15:03:32.851801268 -0400
+++ texlive-base-20220321/source/texk/web2c/pdftexdir/am/pdftex.am 2022-04-24 15:47:20.351639955 -0400
@@ -104,7 +104,7 @@ EXTRA_DIST += \
# pdfTeX tests
#
pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
- pdftexdir/pdfimage.test pdftexdir/expanded.test \
+ pdftexdir/expanded.test \
pdftexdir/tests/cnfline.test pdftexdir/tests/partoken.test
pdftexdir/wprob.log pdftexdir/pdftex.log \
diff -up texlive-base-20220321/source/texk/web2c/ptexdir/am/ptex.am.dt texlive-base-20220321/source/texk/web2c/ptexdir/am/ptex.am
--- texlive-base-20220321/source/texk/web2c/ptexdir/am/ptex.am.dt 2022-01-11 17:47:10.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/ptexdir/am/ptex.am 2022-04-24 15:03:32.851801268 -0400
@@ -171,7 +171,7 @@ EXTRA_DIST += \
# pTeX Tests
#
-ptex_tests = ptexdir/ptriptest.test ptexdir/pver.test
+ptex_tests = ptexdir/pver.test
ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
ptexdir/pver.log: ptex$(EXEEXT)
pweb_tests = \
diff -up texlive-base-20220321/source/texk/web2c/uptexdir/am/uptex.am.dt texlive-base-20220321/source/texk/web2c/uptexdir/am/uptex.am
--- texlive-base-20220321/source/texk/web2c/uptexdir/am/uptex.am.dt 2022-01-29 05:40:22.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/uptexdir/am/uptex.am 2022-04-24 15:03:32.851801268 -0400
@@ -161,7 +161,7 @@ EXTRA_DIST += \
uptexdir/ChangeLog
# upTeX Tests
-uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test
+uptex_tests = uptexdir/upver.test
uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
uptexdir/upver.log: uptex$(EXEEXT)
upweb_tests = \
diff -up texlive-base-20220321/source/texk/web2c/xetexdir/am/xetex.am.dt texlive-base-20220321/source/texk/web2c/xetexdir/am/xetex.am
--- texlive-base-20220321/source/texk/web2c/xetexdir/am/xetex.am.dt 2022-01-11 17:47:10.000000000 -0500
+++ texlive-base-20220321/source/texk/web2c/xetexdir/am/xetex.am 2022-04-24 15:03:32.852801273 -0400
@@ -203,7 +203,6 @@ EXTRA_DIST += \
#
xetex_tests = \
xetexdir/xetex-filedump.test \
- xetexdir/xetex-bug73.test \
xetexdir/xetex.test
xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log: xetex$(EXEEXT)

View File

@ -1,12 +0,0 @@
diff -up texlive-base-20180414/source/texk/web2c/omegafonts/check.test.disabletest texlive-base-20180414/source/texk/web2c/omegafonts/check.test
--- texlive-base-20180414/source/texk/web2c/omegafonts/check.test.disabletest 2018-10-04 13:24:17.965126655 -0400
+++ texlive-base-20180414/source/texk/web2c/omegafonts/check.test 2018-10-04 13:24:26.068945230 -0400
@@ -4,6 +4,8 @@
# Copyright 2014, 2015 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
+exit 0
+
test -d tests || mkdir -p tests
TEXMFCNF=$srcdir/../../kpathsea

View File

@ -1,159 +0,0 @@
diff -up texlive-base-20210325/source/configure.poppler-xpdf-fix texlive-base-20210325/source/configure
--- texlive-base-20210325/source/configure.poppler-xpdf-fix 2021-03-24 17:28:22.000000000 -0400
+++ texlive-base-20210325/source/configure 2021-05-10 15:21:08.254142588 -0400
@@ -21497,7 +21497,27 @@ if test "x$with_mpfr_libdir" != x && tes
MPFR_LIBS="-L$with_mpfr_libdir $MPFR_LIBS"
fi
-: "kpse_xpdf_system_flags - no-op"
+if $PKG_CONFIG poppler --atleast-version=0.30; then
+ POPPLER_INCLUDES=`$PKG_CONFIG poppler --cflags`
+ POPPLER_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_poppler:$with_system_poppler" = xyes:yes; then
+ as_fn_error $? "did not find poppler 0.30 or better" "$LINENO" 5
+fi
+
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+POPPLER_INCLUDES="$POPPLER_VERSION $POPPLER_INCLUDES"
+
+if $PKG_CONFIG poppler --atleast-version=0.12; then
+ XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags`
+ XPDF_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
+ as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5
+fi
+
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
+
+# : "kpse_xpdf_system_flags - no-op"
if $PKG_CONFIG zziplib --atleast-version=0.12; then
ZZIPLIB_INCLUDES=`$PKG_CONFIG zziplib --cflags`
diff -up texlive-base-20210325/source/texk/web2c/configure.poppler-xpdf-fix texlive-base-20210325/source/texk/web2c/configure
--- texlive-base-20210325/source/texk/web2c/configure.poppler-xpdf-fix 2021-02-16 22:03:54.000000000 -0500
+++ texlive-base-20210325/source/texk/web2c/configure 2021-05-10 15:21:08.256142617 -0400
@@ -25500,9 +25500,21 @@ fi
##tldbg _KPSE_LIB_FLAGS: Setup xpdf (-lxpdf) flags.
echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=xpdf, libname=xpdf, options=, tlincl=-DPDF_PARSER_ONLY -IBLD/libs/xpdf -IBLD/libs/xpdf/goo -IBLD/libs/xpdf/xpdf, tllib=BLD/libs/xpdf/libxpdf.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/xpdf/xpdf/Stream.h.' >&5
##tldbg _KPSE_LIB_FLAGS_TL: xpdf (xpdf) .
-: "kpse_xpdf_options - no-op"
+# Check whether --with-system-xpdf was given.
+if test "${with_system_xpdf+set}" = set; then :
+ withval=$with_system_xpdf;
+fi
+
if test "x$with_system_xpdf" = xyes; then
- : "kpse_xpdf_system_flags - no-op"
+ if $PKG_CONFIG poppler --atleast-version=0.12; then
+ XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags`
+ XPDF_LIBS=`$PKG_CONFIG poppler --libs`
+elif test "x$need_xpdf:$with_system_xpdf" = xyes:yes; then
+ as_fn_error $? "did not find poppler 0.12 or better" "$LINENO" 5
+fi
+
+POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES"
else
XPDF_INCLUDES="-DPDF_PARSER_ONLY -I$kpse_BLD/libs/xpdf -I$kpse_BLD/libs/xpdf/goo -I$kpse_BLD/libs/xpdf/xpdf"
XPDF_LIBS="$kpse_BLD/libs/xpdf/libxpdf.a"
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-xpdf-fix texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-xpdf-fix 2021-05-10 15:56:50.770034767 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2021-05-10 16:05:07.939283063 -0400
@@ -49,10 +49,16 @@ POPPLER_VERSION should be defined.
#include <string.h>
#include <ctype.h>
-#include <aconf.h>
-#include <GString.h>
-#include <gmem.h>
-#include <gfile.h>
+#ifdef POPPLER_VERSION
+#include <dirent.h>
+#include <poppler-config.h>
+#include <goo/GooString.h>
+#include <goo/gmem.h>
+#include <goo/gfile.h>
+#define GString GooString
+#else
+#error POPPLER_VERSION should be defined.
+#endif
#include <assert.h>
#include "Object.h"
@@ -676,7 +682,7 @@ static void writeEncodings()
}
for (r = encodingList; r != 0; r = n) {
n = r->next;
- delete r->font;
+ r->font->decRefCnt();
delete r;
}
}
@@ -715,7 +721,7 @@ read_pdf_info(char *image_name, char *pa
PdfDocument *pdf_doc;
Page *page;
const PDFRectangle *pagebox;
- float pdf_version_found, pdf_version_wanted;
+ int pdf_major_version_found, pdf_minor_version_found;
// initialize
if (!isInit) {
globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
@@ -730,17 +736,18 @@ read_pdf_info(char *image_name, char *pa
// this works only for PDF 1.x -- but since any versions of PDF newer
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
// then have to changed drastically anyway.
- pdf_version_found = pdf_doc->doc->getPDFVersion();
- pdf_version_wanted = major_pdf_version_wanted + (minor_pdf_version_wanted * 0.1);
- if (pdf_version_found > pdf_version_wanted + 0.01) {
- char msg[] =
- "PDF inclusion: found PDF version <%.1f>, but at most version <%.1f> allowed";
+ pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
+ pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
+ if ((pdf_major_version_found > major_pdf_version_wanted)
+ || (pdf_minor_version_found > minor_pdf_version_wanted)) {
+ const char *msg =
+ "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed";
if (pdf_inclusion_errorlevel > 0) {
- pdftex_fail(msg, pdf_version_found, pdf_version_wanted);
+ pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
} else if (pdf_inclusion_errorlevel < 0) {
; /* do nothing */
} else { /* = 0, give warning */
- pdftex_warn(msg, pdf_version_found, pdf_version_wanted);
+ pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
}
}
epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages();
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-xpdf-fix texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-xpdf-fix 2021-05-10 15:26:43.545060694 -0400
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftosrc.cc 2021-05-10 16:06:58.614896618 -0400
@@ -41,10 +41,15 @@ POPPLER_VERSION should be defined.
#include <string.h>
#include <ctype.h>
-#include <aconf.h>
-#include <GString.h>
-#include <gmem.h>
-#include <gfile.h>
+#ifdef POPPLER_VERSION
+#define GString GooString
+#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"
@@ -183,7 +188,7 @@ int main(int argc, char *argv[])
if (n == e->gen)
localOffset = obj2.getInt();
}
-#if defined(XPDF304)
+#if defined(POPPLER_VERSION) || defined(XPDF304)
while (str->getChar() != EOF) ;
#else /* xpdf 4.00 */
lexer->skipToEOF();

View File

@ -1,34 +0,0 @@
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.debug texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.debug 2022-01-20 10:25:58.454233201 -0500
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2022-01-20 12:57:04.241513707 -0500
@@ -962,21 +962,30 @@ A change
does not improve the situation.
The changes below seem to work fine.
*/
+ if (page->getGroup() != NULL) {
+ groupDict = Object(page->getGroup());
+ } else {
+ pdftex_fail("PDF inclusion: getGroup failed");
+ }
+/*
// begin modification
groupDict = pageDict->lookup("Group");
Dict *dic1 = page->getGroup();
Dict *dic2 = groupDict.getDict();
// replace dic2 in groupDict with dic1
l = dic2->getLength();
+ pdftex_warn("dic2 length is %d", l);
for (i = 0; i < l; i++) {
groupDict.dictRemove(dic2->getKey(i));
}
l = dic1->getLength();
+ pdftex_warn("dic1 length is %d", l);
for (i = 0; i < l; i++) {
groupDict.dictAdd(dic1->getKey(i),
dic1->getValNF(i).copy());
}
// end modification
+*/
pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval);
}
}

View File

@ -1,49 +0,0 @@
diff -up texlive-base-20210325/source/texk/web2c/Makefile.in.poppler22 texlive-base-20210325/source/texk/web2c/Makefile.in
--- texlive-base-20210325/source/texk/web2c/Makefile.in.poppler22 2022-01-15 16:57:15.020632269 -0500
+++ texlive-base-20210325/source/texk/web2c/Makefile.in 2022-01-15 17:00:20.852711238 -0500
@@ -4573,7 +4573,7 @@ ttf2afm_tests = pdftexdir/ttf2afm.test
# Force Automake to use CXXLD for linking
nodist_EXTRA_pdftosrc_SOURCES = dummy.cxx
pdftosrc_CPPFLAGS = $(pdftex_cppflags)
-pdftosrc_CXXFLAGS = $(WARNING_CXXFLAGS)
+pdftosrc_CXXFLAGS = $(WARNING_CXXFLAGS) -std=c++17
pdftosrc_SOURCES = pdftexdir/pdftosrc.cc
pdftosrc_LDADD = $(pdftex_ldadd) $(LDADD)
pdftosrc_DEPENDENCIES = $(pdftex_dependencies)
@@ -18343,7 +18343,7 @@ xetex-xetex-pool.obj: xetex-pool.c
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
pdftexdir/libpdftex_a-pdftoepdf.o: pdftexdir/pdftoepdf.cc
-@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpdftex_a_CPPFLAGS) $(CPPFLAGS) $(libpdftex_a_CXXFLAGS) $(CXXFLAGS) -MT pdftexdir/libpdftex_a-pdftoepdf.o -MD -MP -MF pdftexdir/$(DEPDIR)/libpdftex_a-pdftoepdf.Tpo -c -o pdftexdir/libpdftex_a-pdftoepdf.o `test -f 'pdftexdir/pdftoepdf.cc' || echo '$(srcdir)/'`pdftexdir/pdftoepdf.cc
+@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpdftex_a_CPPFLAGS) $(CPPFLAGS) -std=c++17 $(libpdftex_a_CXXFLAGS) $(CXXFLAGS) -MT pdftexdir/libpdftex_a-pdftoepdf.o -MD -MP -MF pdftexdir/$(DEPDIR)/libpdftex_a-pdftoepdf.Tpo -c -o pdftexdir/libpdftex_a-pdftoepdf.o `test -f 'pdftexdir/pdftoepdf.cc' || echo '$(srcdir)/'`pdftexdir/pdftoepdf.cc
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) pdftexdir/$(DEPDIR)/libpdftex_a-pdftoepdf.Tpo pdftexdir/$(DEPDIR)/libpdftex_a-pdftoepdf.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pdftexdir/pdftoepdf.cc' object='pdftexdir/libpdftex_a-pdftoepdf.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
diff -up texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler22 texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler22 2022-01-14 15:01:29.811105995 -0500
+++ texlive-base-20210325/source/texk/web2c/pdftexdir/pdftoepdf.cc 2022-01-14 15:01:29.831106120 -0500
@@ -964,17 +964,17 @@ The changes below seem to work fine.
*/
// begin modification
groupDict = pageDict->lookup("Group");
- const Dict& dic1 = page->getGroup();
- const Dict& dic2 = groupDict.getDict();
+ Dict *dic1 = page->getGroup();
+ Dict *dic2 = groupDict.getDict();
// replace dic2 in groupDict with dic1
- l = dic2.getLength();
+ l = dic2->getLength();
for (i = 0; i < l; i++) {
- groupDict.dictRemove(dic2.getKey(i));
+ groupDict.dictRemove(dic2->getKey(i));
}
- l = dic1.getLength();
+ l = dic1->getLength();
for (i = 0; i < l; i++) {
- groupDict.dictAdd(dic1.getKey(i),
- dic1.getValNF(i).copy());
+ groupDict.dictAdd(dic1->getKey(i),
+ dic1->getValNF(i).copy());
}
// end modification
pdf_printf("/Group %ld 0 R\n", (long)pdfpagegroupval);

View File

@ -1,123 +0,0 @@
diff -up texlive-base-20220321/source/configure.poppler-22.08.0 texlive-base-20220321/source/configure
--- texlive-base-20220321/source/configure.poppler-22.08.0 2022-10-31 09:48:21.875540925 -0400
+++ texlive-base-20220321/source/configure 2022-10-31 09:50:13.731220862 -0400
@@ -23545,7 +23545,7 @@ printf %s "checking requested system \`x
int
main (void)
{
-GfxFont *gfxFont; gfxFont->decRefCnt();
+GfxFont *gfxFont; gfxFont->getFlags();
;
return 0;
}
diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-22.08.0 texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc
--- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-22.08.0 2022-10-31 09:48:21.872540907 -0400
+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc 2022-10-31 09:48:21.876540932 -0400
@@ -123,7 +123,7 @@ struct InObj {
struct UsedEncoding {
int enc_objnum;
- GfxFont *font;
+ std::shared_ptr<GfxFont> font;
UsedEncoding *next;
};
@@ -167,8 +167,8 @@ static PdfDocument *find_add_document(ch
p->file_name = xstrdup(file_name);
p->xref = xref = 0;
p->occurences = 0;
- GString *docName = new GString(p->file_name);
- p->doc = new PDFDoc(docName); // takes ownership of docName
+ // GString *docName = new GString(p->file_name);
+ p->doc = new PDFDoc(std::make_unique<GooString>(p->file_name)); // takes ownership of docName
if (!p->doc->isOk() || !p->doc->okToPrint()) {
pdftex_fail("xpdf: reading PDF image failed");
}
@@ -204,7 +204,7 @@ static void delete_document(PdfDocument
// --------------------------------------------------------------------
-static int addEncoding(GfxFont * gfont)
+static int addEncoding(std::shared_ptr<GfxFont> gfont)
{
UsedEncoding *n;
n = new UsedEncoding;
@@ -395,7 +395,8 @@ static void copyFont(const char *tag, Ob
{
Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset,
stemV;
- GfxFont *gfont;
+ // GfxFont *gfont;
+ std::shared_ptr<GfxFont> gfont;
fd_entry *fd;
fm_entry *fontmap;
// Check whether the font has already been embedded before analysing it.
@@ -666,6 +667,7 @@ static void writeEncodings()
UsedEncoding *r, *n;
char *glyphNames[256], *s;
int i;
+
for (r = encodingList; r != 0; r = r->next) {
for (i = 0; i < 256; i++) {
if (r->font->isCIDFont()) {
@@ -673,7 +675,8 @@ static void writeEncodings()
("PDF inclusion: CID fonts are not supported"
" (try to disable font replacement to fix this)");
}
- if ((s = (char *) ((Gfx8BitFont *) r->font)->getCharName(i)) != 0)
+ const GfxFont *const font = r->font.get();
+ if ((s = (char *) ((Gfx8BitFont *) font)->getCharName(i)) != 0)
glyphNames[i] = s;
else
glyphNames[i] = notdef;
@@ -682,7 +685,7 @@ static void writeEncodings()
}
for (r = encodingList; r != 0; r = n) {
n = r->next;
- r->font->decRefCnt();
+ // r->font->decRefCnt();
delete r;
}
}
diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-22.08.0 texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc
--- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-22.08.0 2022-10-31 09:48:21.866540870 -0400
+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc 2022-10-31 09:48:21.876540932 -0400
@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
{
char *p, buf[1024];
PDFDoc *doc;
- GString *fileName;
+ std::unique_ptr<GooString> fileName;
Stream *s;
Object srcStream, srcName, catalogDict;
FILE *outfile;
@@ -86,9 +86,9 @@ int main(int argc, char *argv[])
"Usage: pdftosrc <PDF-file> [<stream-object-number>]\n");
exit(1);
}
- fileName = new GString(argv[1]);
+ fileName = std::make_unique<GString>(argv[1]);
globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
- doc = new PDFDoc(fileName);
+ doc = new PDFDoc(std::move(fileName));
if (!doc->isOk()) {
fprintf(stderr, "Invalid PDF file\n");
exit(1);
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Not a Stream object\n");
exit(1);
}
- sprintf(buf, "%s", fileName->c_str());
+ sprintf(buf, "%s", argv[1]);
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
if (objgen == 0)
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
outname = buf;
} else { // objnum < 0 means we are extracting the XRef table
extract_xref_table = true;
- sprintf(buf, "%s", fileName->c_str());
+ sprintf(buf, "%s", argv[1]);
if ((p = strrchr(buf, '.')) == 0)
p = strchr(buf, 0);
sprintf(p, ".xref");

View File

@ -1,20 +0,0 @@
diff -up tex/latex/sympytexpackage/sympytex.sty.than tex/latex/sympytexpackage/sympytex.sty
--- tex/latex/sympytexpackage/sympytex.sty.than 2017-07-05 14:24:09.206951593 +0200
+++ tex/latex/sympytexpackage/sympytex.sty 2017-07-05 14:25:09.994666464 +0200
@@ -43,13 +43,13 @@
\newwrite\ST@sf
\immediate\openout\ST@sf=\jobname.sympy
\newcommand{\ST@wsf}[1]{\immediate\write\ST@sf{#1}}
-\iffalse
+%\iffalse
%% To get .sympy files to automatically change the Python path to find
%% sympytex.py, delete the \iffalse and \fi lines surrounding this and
%% change the directory below to where sympytex.py can be found.
\ST@wsf{import sys}
-\ST@wsf{sys.path.insert(0, 'directory with sympytex.py')}
-\fi
+\ST@wsf{sys.path.insert(0, '/usr/share/texlive/texmf-dist/scripts/sympytexpackage')}
+%\fi
\ST@wsf{import sympy}
\ST@wsf{import sympytex}
\ST@wsf{sympytex.openout('\jobname')}

View File

@ -1,42 +0,0 @@
diff -up tex/latex/pkgloader/pkgloader.sty.nol3regex tex/latex/pkgloader/pkgloader.sty
--- tex/latex/pkgloader/pkgloader.sty.nol3regex 2020-05-12 15:43:34.909265349 -0400
+++ tex/latex/pkgloader/pkgloader.sty 2020-05-12 15:44:42.157074791 -0400
@@ -71,7 +71,6 @@
% \begin{macrocode}
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\RequirePackage{l3regex}
\RequirePackage{lt3graph}
% \end{macrocode}
%
@@ -660,7 +659,7 @@
%
% \begin{macrocode}
\prop_map_inline:Nn \g__pkgloader_known_pkg_prop {%%%%%%%%%%%%%% ##1
- \int_step_inline:nncn {1} {1} {g__pkgloader_count_(##1)_int} {%% ####1
+ \int_step_inline:nnvn {1} {1} {g__pkgloader_count_(##1)_int} {%% ####1
% \end{macrocode}
%
% If the current configuration should be loaded but still
@@ -767,9 +766,8 @@
% \end{macrocode}
% \uninteresting\begin{macrocode}
}
-\cs_generate_variant:Nn \int_step_inline:nnnn {nncn}
+\cs_generate_variant:Nn \int_step_inline:nnnn {nnvn}
\cs_generate_variant:Nn \bool_if:nT {vT}
-\cs_generate_variant:Nn \withargs:nnn {vvn}
\cs_generate_variant:Nn \graph_gput_vertex:Nnn {Nnf}
\graph_new:N \l__pkgloader_order_graph
\tl_new:N \l__pkgloader_used_configs_tl
@@ -836,8 +834,8 @@
}
}
}
-\cs_generate_variant:Nn \withargs:nn {xn}
-\cs_generate_variant:Nn \withargs:nnnnn {vvfvn}
+\cs_generate_variant:Nn \withargs:nn {x}
+\cs_generate_variant:Nn \withargs:nnnnn {vvfv}
% \end{macrocode}
%
% And it needs the following auxiliary function to strip

File diff suppressed because it is too large Load Diff

View File

@ -1,77 +0,0 @@
diff -up tex/latex/bgteubner/bgteubner.cls.fixme tex/latex/bgteubner/bgteubner.cls
--- tex/latex/bgteubner/bgteubner.cls.fixme 2020-05-11 11:18:45.614265736 -0400
+++ tex/latex/bgteubner/bgteubner.cls 2020-05-11 11:19:44.848269987 -0400
@@ -280,7 +280,8 @@
\RequirePackage{warning}[2001/08/17]
\RequirePackage[all]{onlyamsmath}[2001/10/04]
\RequirePackage[sepfour,autolanguage]{numprint}[2003/11/09]
-\RequirePackage{scrpage2}[2002/11/01]
+\RequirePackage{scrlfile}
+\ReplacePackage{scrpage2}{scrlayer-scrpage}
\RequirePackage[fixlanguage]{babelbib}[2003/07/28]
\RequirePackage{fnbreak}[2003/04/03]
\RequirePackage[countmax]{subfloat}[2002/12/16]
diff -up tex/latex/mdframed/ltxmdf.cls.fixme tex/latex/mdframed/ltxmdf.cls
--- tex/latex/mdframed/ltxmdf.cls.fixme 2020-05-11 11:15:55.073132609 -0400
+++ tex/latex/mdframed/ltxmdf.cls 2020-05-11 11:16:31.591518713 -0400
@@ -68,7 +68,8 @@
\endgroup
\xspaceaddexceptions{\xspace@check@icr}
\RequirePackage{multicol}\columnseprule0.4pt
-\RequirePackage{scrpage2}
+\RequirePackage{scrlfile}
+\ReplacePackage{scrpage2}{scrlayer-scrpage}
\RequirePackage[inline]{enumitem}
\RequirePackage{amsmath}
\RequirePackage{listings}
diff -up tex/latex/mentis/mentis.cls.fixme tex/latex/mentis/mentis.cls
--- tex/latex/mentis/mentis.cls.fixme 2020-05-11 11:44:12.168603751 -0400
+++ tex/latex/mentis/mentis.cls 2020-05-11 11:44:31.344281400 -0400
@@ -40,7 +40,8 @@
%%% \end{macrocode}
\RequirePackage{xspace}
\RequirePackage{textcomp}
-\RequirePackage{scrpage2}
+\RequirePackage{scrlfile}
+\ReplacePackage{scrpage2}{scrlayer-scrpage}
\RequirePackage{jurabib}
%%% \begin{macrocode}
%%\RequirePackage{picinpar}
diff -up tex/latex/rcsinfo/rcsinfo.sty.fixme tex/latex/rcsinfo/rcsinfo.sty
--- tex/latex/rcsinfo/rcsinfo.sty.fixme 2020-05-11 11:27:58.018979581 -0400
+++ tex/latex/rcsinfo/rcsinfo.sty 2020-05-11 11:29:20.177598457 -0400
@@ -119,7 +119,8 @@
\RequirePackage{fancyhdr}
\fi
\if@rcsInfoUseScrpage@
- \RequirePackage{scrpage2}
+ \RequirePackage{scrlfile}
+ \ReplacePackage{scrpage2}{scrlayer-scrpage}
\fi
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
diff -up tex/latex/rtklage/rtklage.cls.fixme tex/latex/rtklage/rtklage.cls
--- tex/latex/rtklage/rtklage.cls.fixme 2020-05-11 11:22:57.281035108 -0400
+++ tex/latex/rtklage/rtklage.cls 2020-05-11 11:23:18.024686393 -0400
@@ -7,7 +7,7 @@
\RequirePackage{scrdate}
\RequirePackage{calc}
\RequirePackage[np]{numprint}
-\RequirePackage[plainheadsepline]{scrpage2}
+\RequirePackage[plainheadsepline]{scrlayer-scrpage}
\RequirePackage{alphanum}
\RequirePackage{eso-pic}
\RequirePackage{color}
diff -up tex/latex/svninfo/svninfo.sty.fixme tex/latex/svninfo/svninfo.sty
--- tex/latex/svninfo/svninfo.sty.fixme 2020-05-11 11:34:20.516549642 -0400
+++ tex/latex/svninfo/svninfo.sty 2020-05-11 11:34:50.985037457 -0400
@@ -144,7 +144,8 @@
\RequirePackage{fancyhdr}
\fi
\if@svnInfoUseScrpage@
- \RequirePackage{scrpage2}
+ \RequirePackage{scrlfile}
+ \ReplacePackage{scrpage2}{scrlayer-scrpage}
\fi
\if@svnInfoUseEsofoot@
\RequirePackage{eso-pic}

View File

@ -1,12 +0,0 @@
diff -up tex/latex/tabu/tabu.sty.fix-longtable tex/latex/tabu/tabu.sty
--- tex/latex/tabu/tabu.sty.fix-longtable 2023-01-07 22:26:25.122509902 -0500
+++ tex/latex/tabu/tabu.sty 2023-01-07 22:27:36.507051072 -0500
@@ -1356,7 +1356,7 @@
\tabuendlongtrial}\egroup % got \tabu@box
}% \tabu@longtrial
\def\tabuendlongtrial{% no @ allowed for \scantokens
- \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne
+ \LT@echunk \global\setbox\LT@gbox \hbox{\unhbox\LT@gbox}\kern\wd\LT@gbox
\LT@get@widths
}% \tabuendlongtrial
\def\tabu@adl@endtrial{% <arydshln in nested trials - problem for global column counters!>

View File

@ -771,32 +771,17 @@ Source10005: https://ctan.math.illinois.edu/systems/texlive/tlnet/archive/acrony
Patch1: tl-kpfix.patch
Patch2: tl-format.patch
Patch5: texlive-2016-kpathsea-texlive-path.patch
# fixes from arch and upstream texlive
Patch7: texlive-20210325-new-poppler.patch
# fix texmf.cnf so that it finds texinfo bits in Fedora
Patch8: texlive-20230311-texinfo-path-fix.patch
# These tests only fail on 32 bit arches with gcc8
Patch11: texlive-20220321-disable-more-failing-tests.patch
# Another test which fails on 32 bit arches (in F30+)
# probably because of stricter malloc checks in glibc.
# https://bugzilla.redhat.com/show_bug.cgi?id=1631847
# Filed issue upstream, no resolution yet.
Patch15: texlive-base-20180414-disable-omegafonts-check-test.patch
# fix annocheck issue detected by rpmdiff
Patch17: texlive-20180414-annocheck.patch
Patch18: texlive-20210325-poppler-0.73.patch
# Fix libgs detection in configure/configure.ac in dvisvgm
# Patch20: texlive-20190410-dvisvgm-fix-libgs-detection.patch
# Since we need to include tlmgr.pl for texconfig
# lets try to keep people from shooting themselves with it
Patch21: texlive-20190410-tlmgr-ignore-warning.patch
Patch23: texlive-20210325-poppler-0.84.patch
# Fixes for poppler 0.90 (f33+)
Patch29: texlive-20200327-poppler-0.90.patch
# Fix pdflatex run out of memory
Patch30: texlive-base-20220321-out-of-memory.patch
# Fix configure to properly detect poppler
Patch31: texlive-base-20210325-configure-poppler-xpdf-fix.patch
# Just remove obsolete decRefCnt check from configure, valid in either case.
Patch32: texlive-base-20220321-xpdf-no-GfxFont-decRefCnt.patch
@ -804,13 +789,6 @@ Patch32: texlive-base-20220321-xpdf-no-GfxFont-decRefCnt.patch
# Remove deprecated setpdfwrite ghostscript call
# Patch33: texlive-base-20210325-no-setpdfwrite.patch
# Poppler 22
Patch34: texlive-base-20210325-poppler-22.01.0.patch
# Fix crash in handling Group
Patch35: texlive-base-20210325-pdftoepdf-fix-crash.patch
# Poppler 22.08.0
Patch36: texlive-base-20220321-poppler-22.08.0.patch
# libpaper v2 changes
# 1. one psutils test needs adjustment, see https://github.com/rrthomas/libpaper/issues/23
Patch37: texlive-base-libpaperv2.patch
@ -819,16 +797,9 @@ Patch37: texlive-base-libpaperv2.patch
Patch44: texlive-base-20220321-pdf-header-order-fix.patch
Patch101: etex-addlanguage-fix-bz1215257.patch
# fix bz#1442706, set correct python path
Patch106: texlive-bz#1442706-python-path.patch
Patch108: texlive-2017-xepersian-python.patch
Patch109: texlive-2021-py3-and-pep8.patch
Patch110: tabu-update-to-git-930bc77.patch
Patch111: texlive-scrpage2-obsolete-fixes.patch
Patch112: texlive-no-l3regex.patch
Patch113: texlive-proposal-no-workaddress.patch
# see https://github.com/tabu-issues-for-future-maintainer/tabu/issues/26
Patch114: texlive-tabu-fix-longtable.patch
%description
@ -24239,43 +24210,11 @@ xz -dc %{SOURCE0} | tar x
%patch -P1 -p0
%patch -P2 -p1 -b .format
%patch -P5 -p0
%if %{with poppler}
%if 0%{?fedora} || 0%{?rhel} >= 8
%patch -P7 -p1 -b .newpoppler
%endif
%endif
%patch -P8 -p1 -b .texinfo-fix
# %%patch -P11 -p1 -b .dt
# %%patch -P15 -p1 -b .disabletest
%patch -P17 -p1 -b .annocheck
%if %{with poppler}
%if 0%{?fedora} || 0%{?rhel} >= 8
%patch -P18 -p1 -b .poppler-0.73
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
%patch -P23 -p1 -b .poppler-0.84
%endif
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%patch -P29 -p1 -b .poppler090
%endif
%endif
%patch -P30 -p1 -b .out_of_memory
%if %{with poppler}
%patch -P31 -p1 -b .poppler-xpdf-fix
%if 0%{?fedora} >= 36 || 0%{?rhel} > 9
%patch -P34 -p1 -b .poppler22
%patch -P35 -p1 -b .poppler-crash-fix
%endif
%if 0%{?fedora} >= 37 || 0%{?rhel} > 9
%patch -P36 -p1 -b .poppler-22.08.0
%endif
%else
%patch -P32 -p1 -b .configure-no-GfxFont-decRefCnt
%endif
%if 0%{?fedora} >= 38 || 0%{?rhel} > 9
%patch -P37 -p1 -b .libpaper2
%endif
# Setup copies of the licenses
for l in `unxz -c %{SOURCE3} | tar t`; do
@ -25328,7 +25267,7 @@ mkdir -p %{buildroot}%{_rpmmacrodir}
cp -a %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.texlive
# install texlive.tlpdb
xz --decompress --stdout > %{SOURCE2} %{buildroot}%{_texdir}/texlive.tlpdb
xz --decompress --stdout %{SOURCE2} > %{buildroot}%{_texdir}/texlive.tlpdb
# make a symlink so texdoc is happy
pushd %{buildroot}%{_texdir}/tlpkg
ln -s ../texlive.tlpdb .