From 24318bda4625767f708dc22e4ece9cbf6310a46a Mon Sep 17 00:00:00 2001 From: Chunmei Xu Date: Wed, 19 Apr 2023 17:51:09 +0800 Subject: [PATCH] remove poppler related patches Signed-off-by: Chunmei Xu --- texlive-20200327-poppler-0.90.patch | 20 -- texlive-20210325-poppler-0.73.patch | 200 -------------- texlive-20210325-poppler-0.84.patch | 228 ---------------- ...180414-disable-omegafonts-check-test.patch | 12 - ...-20210325-configure-poppler-xpdf-fix.patch | 159 ----------- ...ve-base-20210325-pdftoepdf-fix-crash.patch | 34 --- texlive-base-20210325-poppler-22.01.0.patch | 49 ---- ...e-base-20220321-pdf-header-order-fix.patch | 47 ---- texlive-base-20220321-poppler-22.08.0.patch | 123 --------- texlive-base.spec | 254 ++---------------- 10 files changed, 19 insertions(+), 1107 deletions(-) delete mode 100644 texlive-20200327-poppler-0.90.patch delete mode 100644 texlive-20210325-poppler-0.73.patch delete mode 100644 texlive-20210325-poppler-0.84.patch delete mode 100644 texlive-base-20180414-disable-omegafonts-check-test.patch delete mode 100644 texlive-base-20210325-configure-poppler-xpdf-fix.patch delete mode 100644 texlive-base-20210325-pdftoepdf-fix-crash.patch delete mode 100644 texlive-base-20210325-poppler-22.01.0.patch delete mode 100644 texlive-base-20220321-pdf-header-order-fix.patch delete mode 100644 texlive-base-20220321-poppler-22.08.0.patch diff --git a/texlive-20200327-poppler-0.90.patch b/texlive-20200327-poppler-0.90.patch deleted file mode 100644 index e76b436..0000000 --- a/texlive-20200327-poppler-0.90.patch +++ /dev/null @@ -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 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) diff --git a/texlive-20210325-poppler-0.73.patch b/texlive-20210325-poppler-0.73.patch deleted file mode 100644 index 4b24f29..0000000 --- a/texlive-20210325-poppler-0.73.patch +++ /dev/null @@ -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 diff --git a/texlive-20210325-poppler-0.84.patch b/texlive-20210325-poppler-0.84.patch deleted file mode 100644 index 37cb1c3..0000000 --- a/texlive-20210325-poppler-0.84.patch +++ /dev/null @@ -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 -+#define xpdfVersion POPPLER_VERSION -+#define xpdfString "poppler" -+#else -+#include /* just to get the xpdf version */ -+#define xpdfString "xpdf" -+#endif -+ - /* Do this early in order to avoid a conflict between - MINGW32 defining 'boolean' as 'unsigned char' and - 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(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 -+#define xpdfVersion POPPLER_VERSION -+#define xpdfString "poppler" -+#else -+#include /* just to get the xpdf version */ -+#define xpdfString "xpdf" -+#endif -+ - #include - - #include -@@ -73,7 +82,7 @@ int main(int argc, char *argv[]) - exit(1); - } - fileName = new GString(argv[1]); -- globalParams = new GlobalParams(); -+ globalParams = std::unique_ptr(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 - #include "ptexlib.h" - #include --#ifdef POPPLER_VERSION --/* POPPLER_VERSION should be a proper version string */ --#define xpdfVersion POPPLER_VERSION --#define xpdfString "poppler" --#else --#include /* 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 diff --git a/texlive-base-20180414-disable-omegafonts-check-test.patch b/texlive-base-20180414-disable-omegafonts-check-test.patch deleted file mode 100644 index 1879359..0000000 --- a/texlive-base-20180414-disable-omegafonts-check-test.patch +++ /dev/null @@ -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 - # You may freely use, modify and/or distribute this file. - -+exit 0 -+ - test -d tests || mkdir -p tests - - TEXMFCNF=$srcdir/../../kpathsea diff --git a/texlive-base-20210325-configure-poppler-xpdf-fix.patch b/texlive-base-20210325-configure-poppler-xpdf-fix.patch deleted file mode 100644 index 61b144c..0000000 --- a/texlive-base-20210325-configure-poppler-xpdf-fix.patch +++ /dev/null @@ -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 - #include - --#include --#include --#include --#include -+#ifdef POPPLER_VERSION -+#include -+#include -+#include -+#include -+#include -+#define GString GooString -+#else -+#error POPPLER_VERSION should be defined. -+#endif - #include - - #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(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 - #include - --#include --#include --#include --#include -+#ifdef POPPLER_VERSION -+#define GString GooString -+#include -+#include -+#include -+#include -+#else -+#error POPPLER_VERSION should be defined. -+#endif - #include - - #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(); diff --git a/texlive-base-20210325-pdftoepdf-fix-crash.patch b/texlive-base-20210325-pdftoepdf-fix-crash.patch deleted file mode 100644 index b19d483..0000000 --- a/texlive-base-20210325-pdftoepdf-fix-crash.patch +++ /dev/null @@ -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); - } - } diff --git a/texlive-base-20210325-poppler-22.01.0.patch b/texlive-base-20210325-poppler-22.01.0.patch deleted file mode 100644 index 483eb6a..0000000 --- a/texlive-base-20210325-poppler-22.01.0.patch +++ /dev/null @@ -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); diff --git a/texlive-base-20220321-pdf-header-order-fix.patch b/texlive-base-20220321-pdf-header-order-fix.patch deleted file mode 100644 index 14ef1d0..0000000 --- a/texlive-base-20220321-pdf-header-order-fix.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.header-order-fix texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc ---- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc.header-order-fix 2023-01-31 12:53:39.214112015 -0500 -+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftoepdf.cc 2023-01-31 12:54:07.175413160 -0500 -@@ -17,6 +17,11 @@ You should have received a copy of the G - with this program. If not, see . - */ - -+/* -+Load aconf.h first to ensure _FILE_OFFSET_BITS is factored in. -+*/ -+#include -+ - /* Do this early in order to avoid a conflict between - MINGW32 defining 'boolean' as 'unsigned char' and - defining Pascal's boolean as 'int'. -@@ -31,7 +36,6 @@ with this program. If not, see - #include - --#include - #include - #include - #include -diff -up texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.header-order-fix texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc ---- texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc.header-order-fix 2023-01-31 12:41:21.483166562 -0500 -+++ texlive-base-20220321/source/texk/web2c/pdftexdir/pdftosrc.cc 2023-01-31 12:53:15.185853229 -0500 -@@ -16,6 +16,12 @@ 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 . - */ -+ -+/* -+Load aconf.h first to ensure _FILE_OFFSET_BITS is factored in. -+*/ -+#include -+ - #include - - #include -@@ -24,7 +30,6 @@ with this program. If not, see - #include - --#include - #include - #include - #include diff --git a/texlive-base-20220321-poppler-22.08.0.patch b/texlive-base-20220321-poppler-22.08.0.patch deleted file mode 100644 index 1385077..0000000 --- a/texlive-base-20220321-poppler-22.08.0.patch +++ /dev/null @@ -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 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(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 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 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 fileName; - Stream *s; - Object srcStream, srcName, catalogDict; - FILE *outfile; -@@ -86,9 +86,9 @@ int main(int argc, char *argv[]) - "Usage: pdftosrc []\n"); - exit(1); - } -- fileName = new GString(argv[1]); -+ fileName = std::make_unique(argv[1]); - globalParams = std::unique_ptr(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"); diff --git a/texlive-base.spec b/texlive-base.spec index b8da47b..638eb63 100644 --- a/texlive-base.spec +++ b/texlive-base.spec @@ -1,4 +1,4 @@ -%define anolis_release 12 +%define anolis_release 13 %global shortname texlive %global source_date 20220321 %global source_name texlive-%{source_date}-source @@ -9,26 +9,19 @@ %global usr_fmtutil_cnf %{_texdir}/texmf-dist/web2c/fmtutil.cnf %global fmtutil_cnf_d %{_texdir}/fmtutil.cnf.d -# don't export private perl modules %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\( %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((LatexIndent.*|PDF::Reuse.*|Pedigree.*|TeXLive.*|Tk::path_tre)\\) -# We do not want exec perms changing. %global __brp_mangle_shebangs_exclude ^$ +%global src_url_prefix https://ctan.math.illinois.edu/systems/texlive/tlnet/archive -# We have a circular dep on latex due to xindy %bcond_with bootstrap -# Upstream no longer supports poppler. We've been hacking it in, but... maybe we should stop? -%bcond_with poppler - Name: %{shortname}-base Version: %{source_date} Release: %{anolis_release}%{?dist} Epoch: 10 Summary: TeX formatting system -# The only files in the base package are directories, cache, and license texts -# So we'll just list the license texts. This is also a bit of a lie, since most of these license texts do not apply to themselves. License: Apache-2.0 AND Artistic-2.0 AND BSD AND GFDL-1.1-or-later AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND Knuth-CTAN AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND LPPL-1.2 AND LPPL-1.3 AND LPPL-1.3c AND MIT AND OFL-1.1 AND LicenseRef-Fedora-Public-Domain URL: http://tug.org/texlive/ Source0: https://ctan.math.illinois.edu/systems/texlive/Source/%{source_name}.tar.xz @@ -37,8 +30,6 @@ Source2: http://tug.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb Source3: texlive-licenses.tar.xz Source4: generate-fmtutilcnf -%global src_url_prefix https://ctan.math.illinois.edu/systems/texlive/tlnet/archive -# These noarch components are packed wrong upstream (do not unpack into texmf-dist) Source5: %{src_url_prefix}/cyrillic.tar.xz Source6: %{src_url_prefix}/cyrillic.doc.tar.xz Source7: %{src_url_prefix}/glyphlist.tar.xz @@ -49,7 +40,6 @@ Source11: %{src_url_prefix}/lyluatex.doc.tar.xz Source12: %{src_url_prefix}/oberdiek.tar.xz Source13: %{src_url_prefix}/oberdiek.doc.tar.xz Source14: %{src_url_prefix}/texlive-en.doc.tar.xz -# These are the noarch components for the built binaries. Source15: %{src_url_prefix}/a2ping.doc.tar.xz Source16: %{src_url_prefix}/a2ping.tar.xz Source17: %{src_url_prefix}/accfonts.doc.tar.xz @@ -458,52 +448,14 @@ Source10000: texlive-base-bootstrap 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-20220321-texinfo-path-fix.patch -# These tests only fail on 32 bit arches with gcc8 Patch11: texlive-20220321-disable-more-failing-tests.patch -# 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 -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 - -# 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 - -# Use dvisvgm 3.0.1 Patch38: texlive-base-2022-dvisvgm-3.0.1.patch - -# Fix issue with undefined vasprintf() Patch39: texlive-base-20220321-vasprintf-fix.patch Patch40: texlive-base-c99-1.patch @@ -511,47 +463,24 @@ Patch41: texlive-base-c99-2.patch Patch42: texlive-base-c99-3.patch Patch43: texlive-base-c99-4.patch -# Fix issue where off_t could be set incorrectly on i686 due to order of header load -Patch44: texlive-base-20220321-pdf-header-order-fix.patch - -# Can't do this because it causes everything else to be noarch -# BuildArch: noarch -BuildRequires: make -BuildRequires: gcc gcc-c++ -BuildRequires: xz libXaw-devel libXi-devel ncurses-devel bison flex file perl(Digest::MD5) texinfo gcc-c++ -BuildRequires: gd-devel +BuildRequires: make gcc gcc-c++ autoconf automake libtool +BuildRequires: xz bison flex file texinfo chrpath t1utils +BuildRequires: libXaw-devel libXi-devel ncurses-devel +BuildRequires: freetype-devel libpng-devel t1lib-devel zlib-devel +BuildRequires: gd-devel glib2-devel fontconfig-devel +BuildRequires: zziplib-devel libicu-devel cairo-devel harfbuzz-devel pixman-devel graphite2-devel +BuildRequires: libgs-devel libpaper-devel potrace-devel gmp-devel mpfr-devel +BuildRequires: python3-devel python3-setuptools +BuildRequires: perl(Digest::MD5) perl-generators BuildRequires: teckit-devel >= 2.5.7 -BuildRequires: freetype-devel libpng-devel t1lib-devel zlib-devel t1utils -%if %{with poppler} -BuildRequires: poppler-devel -%else BuildRequires: xpdf-devel >= 4.03 -BuildRequires: glib2-devel fontconfig-devel -%endif -BuildRequires: zziplib-devel libicu-devel cairo-devel harfbuzz-devel perl-generators pixman-devel graphite2-devel -BuildRequires: libgs-devel -BuildRequires: libpaper-devel potrace-devel autoconf automake libtool -BuildRequires: gmp-devel mpfr-devel -# This is really for macros. -BuildRequires: python3-devel -BuildRequires: python3-setuptools %if %{without bootstrap} -# This is for xindy BuildRequires: clisp-devel -BuildRequires: texlive-cyrillic, texlive-latex, texlive-metafont, texlive-cm-super, texlive-ec +BuildRequires: texlive-cyrillic texlive-latex texlive-metafont texlive-cm-super texlive-ec %endif -# This is temporary to fix build while missing kpathsea dep is active -BuildRequires: texlive-texlive-scripts -# This is needed for a test -BuildRequires: texlive-amsfonts -# RPATH DIE DIE DIE -BuildRequires: chrpath -# Break an ugly dep loop +BuildRequires: texlive-texlive-scripts texlive-amsfonts BuildRequires: tex(expl3.sty) - -# Cleanup Provides/Obsoletes -# texlive-cjk-gs-integrate (depackaged 2018-03-09) Provides: texlive-cjk-gs-integrate = %{epoch}:%{source_date}-%{release} Obsoletes: texlive-cjk-gs-integrate <= 7:20170520 Provides: tex-cjk-gs-integrate = %{epoch}:%{source_date}-%{release} @@ -582,87 +511,49 @@ xz -dc %{SOURCE0} | tar x %patch1 -p0 %patch2 -p1 -b .format %patch5 -p0 -%if %{with poppler} -%patch7 -p1 -b .newpoppler -%endif %patch8 -p1 -b .texinfo-fix %patch11 -p1 -b .dt -%patch15 -p1 -b .disabletest %patch17 -p1 -b .annocheck -%if %{with poppler} -%patch18 -p1 -b .poppler-0.73 -%patch23 -p1 -b .poppler-0.84 -%patch29 -p1 -b .poppler090 -%endif %patch30 -p1 -b .out_of_memory -%if %{with poppler} -%patch31 -p1 -b .poppler-xpdf-fix -%patch34 -p1 -b .poppler22 -%patch35 -p1 -b .poppler-crash-fix -%patch36 -p1 -b .poppler-22.08.0 -%else %patch32 -p1 -b .configure-no-GfxFont-decRefCnt -%endif - %patch37 -p1 -b .libpaper2 -# Setup copies of the licenses for l in `unxz -c %{SOURCE3} | tar t`; do ln -s %{_texdir}/licenses/$l $l done -# Update dvisvgm to 3.0.1 %patch38 -p1 -b .301 - -# Fix issue with undefined vasprintf() %patch39 -p1 -b .vasprintf - %patch40 -p1 -b .c99-1 %patch41 -p1 -b .c99-2 %patch42 -p1 -b .c99-3 %patch43 -p1 -b .c99-4 -%patch44 -p1 -b .pdf-header-order-fix - -# Value here is "16" not "15" because we have a source0 at index 1. -# Source15 at index 16 is our first "normal" noarch source file. -# Also, this macro has to be here, not at the top, or it will not evaluate properly. :P %global mysources %{lua: for index,value in ipairs(sources) do if index >= 16 then print(value.." ") end end} -# Drop source/libs/xpdf dir, we use system ver (if at all) rm -rf source/libs/xpdf %build %if %{without bootstrap} cat /usr/share/texlive/kpathsea.log || : -# DEBUG -# Okay. Lets look at things. # 1. /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf should exist and be valid. ls -l /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf || : -# cat /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf - -# Check for ls-R files ls -l /usr/share/texlive/texmf-config/ls-R || : ls -l /usr/share/texlive/texmf-dist/ls-R || : ls -l /usr/share/texlive/texmf-local/ls-R || : ls -l /usr/share/texlive/texmf-var/ls-R || : # 2. kpsewhich -all fmtutil.cnf -# We should see /usr/share/texlive/texmf-dist/web2c/fmtutil.cnf kpsewhich -version || : - kpsewhich --debug -1 -all fmtutil.cnf || : # 3. fmtutil-sys --all -# This should recreate all format files, may not be able to do that here (non-root) fmtutil-sys --all || : # 4. mktexfmt latex should succeed mktexfmt latex || : -# Make texlive generate latex.fmt, so that multiple threads do not race to -# make it during the xindy build. cat > dummy.tex << EOF \documentclass{article} \begin{document} @@ -681,13 +572,11 @@ PREF=`pwd`/inst mkdir -p work %global _configure ../configure cd work -%if %{without poppler} export GLIB_LIBS=`pkg-config --libs glib-2.0` export PAPER_LIBS="-lpaper" export FONTCONFIG_LIBS=`pkg-config --libs fontconfig` export XPDF_INCLUDES="-I/usr/include/xpdf -I/usr/include/xpdf/fofi -I/usr/include/xpdf/goo -I/usr/include/xpdf/splash" export XPDF_LIBS="-lxpdfcore -lfofi -lgoo -lsplash $GLIB_LIBS $PAPER_LIBS $FONTCONFIG_LIBS" -%endif %configure \ --prefix=$PREF --datadir=$PREF --libdir=$PREF/lib --includedir=$PREF/include --datarootdir=$PREF/share --mandir=$PREF/share/man \ --infodir=$PREF/share/info --exec_prefix=$PREF --bindir=$PREF/bin --with-system-zlib --with-system-libpng \ @@ -696,11 +585,7 @@ export XPDF_LIBS="-lxpdfcore -lfofi -lgoo -lsplash $GLIB_LIBS $PAPER_LIBS $FONTC --with-system-libpaper --with-system-potrace --with-pic --with-xdvi-x-toolkit=xaw --with-system-mpfr --with-system-gmp \ --enable-shared --enable-compiler-warnings=max --without-cxx-runtime-hack \ --disable-native-texlive-build --disable-t1utils --enable-psutils --disable-biber --disable-ptexenc --disable-largefile \ -%if %{with poppler} ---with-system-poppler --with-system-xpdf \ -%else --with-system-xpdf \ -%endif %if %{without bootstrap} --enable-xindy \ %else @@ -709,7 +594,6 @@ export XPDF_LIBS="-lxpdfcore -lfofi -lgoo -lsplash $GLIB_LIBS $PAPER_LIBS $FONTC --disable-xindy-docs --disable-xindy-rules \ --disable-rpath -# disable rpath for i in `find . -name libtool`; do sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $i sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $i @@ -718,31 +602,18 @@ done %make_build world STRIPPROG=/bin/true STRIP=/bin/true %install -# make directories mkdir -p %{buildroot}%{_texdir}/texmf-config/web2c mkdir -p %{buildroot}%{_texmf_var} -# make symlinks pushd %{buildroot}%{_texdir}/texmf-config/web2c ln -s ../../texmf-dist/web2c/updmap.cfg updmap.cfg popd -# make compatibility symlink pushd %{buildroot}%{_datadir} mkdir -p texlive/texmf-local/texmf-compat ln -s texlive/texmf-local/texmf-compat texmf popd -# make opentype fontdir symlinks -# NOTE: fontawesome, stix, oldstandard are a conflict, so we just add Requires for the -# corresponding system font packages for them. -# NOTE: We might have to handle this differently if there are lots of conflicts later. -# DO NOT MAKE A SYMLINK FOR public/ebgaramond -# The EB Garamond upstream font decided to map some historical flags (i.e., flags -# obsolete for centuries) to the Unicode flag emoji code points. -# Since most other fonts do not include the relevant code points, Fontconfig decides to -# pick up the EB Garamond flags through the fallback font mechanism for almost all -# fonts on the system, including DejaVu Sans, Liberation Sans, etc. mkdir -p %{buildroot}%{_datadir}/fonts pushd %{buildroot}%{_datadir}/fonts for i in public/lilyglyphs ; do @@ -751,21 +622,17 @@ for i in public/lilyglyphs ; do done popd -# install binaries mkdir -p %{buildroot}%{_bindir} rm -f source/inst/bin/man cp -a source/inst/bin/* %{buildroot}%{_bindir} -# install libs mkdir -p %{buildroot}%{_libdir} cp -d source/inst/lib/*.so* %{buildroot}%{_libdir} cp -a source/inst/lib/pkgconfig %{buildroot}%{_libdir} -# install includes mkdir -p %{buildroot}%{_includedir} cp -r source/inst/include/* %{buildroot}%{_includedir} -# install shared files mkdir -p %{buildroot}%{_datadir} mkdir -p %{buildroot}%{_texdir} pushd source/inst/share @@ -774,7 +641,6 @@ cp -a man %{buildroot}%{_datadir}/ cp -a texmf-dist %{buildroot}%{_texdir}/ popd -# relocate binaries to %%{_bindir} and fix relative symlinks pushd %{buildroot}%{_bindir} for i in `find . -type l`; do if [ "`readlink $i | grep '..' | wc -l`" == "1" ]; then @@ -785,7 +651,6 @@ fi done popd -# install noarch bits pushd %{buildroot}%{_texdir} echo %{mysources} for noarchsrc in %{mysources}; do @@ -794,7 +659,7 @@ for noarchsrc in %{mysources}; do fi done popd -# Do the weird noarch bits + pushd %{buildroot}%{_texdir}/texmf-dist xz -dc %{SOURCE5} | tar x xz -dc %{SOURCE6} | tar x @@ -808,23 +673,15 @@ xz -dc %{SOURCE13} | tar x xz -dc %{SOURCE14} | tar x popd -# We want the texmf.cnf we patched, not the vanilla one from the kpathsea.tar.xz cp -a source/texk/kpathsea/texmf.cnf %{buildroot}%{_texdir}/texmf-dist/web2c/texmf.cnf -# Apply fixes -# We do it here because this is the first time we have the complete tree. -# bz1384067 sed -i 's|\\sc |\\scshape |g' %{buildroot}%{_texdir}/texmf-dist/bibtex/bst/base/acm.bst sed -i 's|\\sc |\\scshape |g' %{buildroot}%{_texdir}/texmf-dist/bibtex/bst/base/siam.bst -# Patches to component tarballs pushd %{buildroot}%{_texdir}/texmf-dist - -# neuter tlmgr a bit patch -p1 < %{_sourcedir}/texlive-20190410-tlmgr-ignore-warning.patch popd -# config files in /etc symlinked mkdir -p %{buildroot}%{_sysconfdir}/texlive/web2c mkdir -p %{buildroot}%{_sysconfdir}/texlive/dvips/config mkdir -p %{buildroot}%{_sysconfdir}/texlive/tex/generic/config @@ -834,67 +691,38 @@ for i in mktex.cnf texmf.cnf updmap.cfg; do ln -s %{_sysconfdir}/texlive/web2c/$i %{buildroot}%{_texdir}/texmf-dist/web2c/$i done -# configure texmf-local - make it visible to kpathsea sed -i -e 's|^TEXMFLOCAL.*|TEXMFLOCAL = $TEXMFROOT/texmf-local//|' %{buildroot}%{_sysconfdir}/texlive/web2c/texmf.cnf mv %{buildroot}%{_texdir}/texmf-dist/dvips/config/config.ps %{buildroot}%{_sysconfdir}/texlive/dvips/config/ ln -s %{_sysconfdir}/texlive/dvips/config/config.ps %{buildroot}%{_texdir}/texmf-dist/dvips/config/config.ps -# Move the stock fmtutil.cnf under /etc and make sure everything is commented out mv %{buildroot}%{usr_fmtutil_cnf} %{buildroot}%{etc_fmtutil_cnf} sed -i '/^[a-z].*$/s/^/\#\!\ /' %{buildroot}%{_sysconfdir}/texlive/web2c/fmtutil.cnf -# Split the stock texmf.cnf file: -# * Look for lines like "# from foo:" and use those as the names of the files -# we generate. -# * Take the text starting at "# from foo:" and ending just before the next -# line containing just '#' (or EOF). -# * remove '#!' -# * Add a single line containing '#' to the beginning -# * Stuff that into a file named "foo" in %%_texdir/fmtutil.cnf.d -# -# This is a bit fragile as the precise format of the stock fmtutil.cnf file -# could change. -# The leading '#' and the "# from foo:" line are added to the output only to -# match the existing format of the file, just in case some tool cares. mkdir %{buildroot}%{_texdir}/fmtutil.cnf.d for i in $(grep '^# from .*:$' %{buildroot}%{etc_fmtutil_cnf}|sed 's/^# from //; s/:$//'); do echo "#" > %{buildroot}%{fmtutil_cnf_d}/$i sed -n "s/^#! //; /^# from $i:\$/,/^#\$/{/^#\$/!p}" %{buildroot}%{etc_fmtutil_cnf} >> %{buildroot}%{fmtutil_cnf_d}/$i done -# Install the fmtutil.cnf generation script install -D -p -m 755 -t %{buildroot}%{_sbindir} %{SOURCE4} - -# create macro file for building texlive mkdir -p %{buildroot}%{_rpmmacrodir} cp -a %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.texlive - -# install texlive.tlpdb cp %{SOURCE2} %{buildroot}%{_texdir} -# make a symlink so texdoc is happy pushd %{buildroot}%{_texdir}/tlpkg ln -s ../texlive.tlpdb . popd -# install licenses mkdir -p %{buildroot}%{_texdir}/licenses pushd %{buildroot}%{_texdir}/licenses xz -dc %{SOURCE3} | tar x popd -# nuke useless tlmgr packaging stuff and doc droppings rm -f %{buildroot}/%{_texdir}/install-tl rm -rf %{buildroot}%{_texdir}/tlpkg/gpg/ rm -rf %{buildroot}%{_texdir}/tlpkg/tltcl/ rm -rf %{buildroot}%{_texdir}/tlpkg/tlpobj/ rm -rf %{buildroot}%{_texdir}/texmf-dist/tlpkg/tlpobj/ -# texconfig needs tlmgr.pl -# We're only including what it needs, no more. -# rm -f %{buildroot}%{_texdir}/texmf-dist/doc/man/man1/tlmgr.1 -# rm -f %{buildroot}%{_texdir}/texmf-dist/scripts/texlive/tlmgr.pl -# rm -f %{buildroot}%{_bindir}/tlmgr -# rm -f %{buildroot}%{_texdir}/tlpkg/installer/config.guess rm -f %{buildroot}%{_texdir}/texmf-dist/scripts/texlive/tlmgr.pl.orig rm -f %{buildroot}%{_texdir}/texmf-dist/scripts/texlive/tl-errmess.vbs rm -f %{buildroot}%{_texdir}/texmf-dist/scripts/texlive/tlmgrgui.pl @@ -920,40 +748,29 @@ rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/man/man*/*.pdf rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/man/Makefile rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/man/man*/Makefile rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/info/dir -# nuke unwanted ptexenc devel files rm -rf %{buildroot}%{_includedir}/ptexenc -# nuke context windows files rm -f %{buildroot}/%{_texdir}/texmf-dist/scripts/context/stubs/mswin/* rm -f %{buildroot}/%{_texdir}/texmf-dist/scripts/context/stubs/win64/* rm -f %{buildroot}/%{_texdir}/texmf-dist/scripts/context/stubs/source/* -# Make this perl module show up in @INC mkdir -p %{buildroot}%{_datadir}/perl5 ln -s %{_texdir}/tlpkg/TeXLive %{buildroot}%{_datadir}/perl5/TeXLive - -# not sure why this is here rm -rf %{buildroot}%{_texdir}/texmf-dist/source/fonts/zhmetrics/ttfonts.map pushd %{buildroot}%{_texdir} -# ALWAYS NUKE THIS IF IT IS HERE. rm -rf texmf-var -# AND NOW WE MAKE THE SYMLINK. ln -s %{_texmf_var} texmf-var popd -# sync built/distro binaries pushd %{buildroot}%{_bindir} [ ! -e mfplain ] && ln -s mpost mfplain [ ! -e texlua ] && ln -s luatex texlua [ ! -e texluac ] && ln -s luatex texluac -# remove latexmk -# This lives in the "latexmk" package in Fedora. rm -f latexmk rm -rf %{buildroot}%{_texdir}/texmf-dist/scripts/latexmk rm -f %{buildroot}%{_datadir}/texlive/texmf-dist/doc/man/man1/latexmk.* -# Fix symlinks for helper scripts rm -f bibexport.sh ln -s /usr/share/texlive/texmf-dist/scripts/bibexport/bibexport.sh bibexport.sh rm -f texmfstart @@ -963,7 +780,6 @@ ln -s /usr/share/texlive/texmf-dist/scripts/texlive/mktexmf mktexmf rm -rf mkjobtexmf ln -s /usr/share/texlive/texmf-dist/scripts/mkjobtexmf/mkjobtexmf.pl mkjobtexmf -# fix context rm -f context cat > context << EOF #!/bin/sh @@ -975,62 +791,49 @@ EOF chmod 0755 context popd -# Move docs mkdir -p %{buildroot}%{_datadir}/ mkdir -p %{buildroot}%{_infodir}/ cp -R %{buildroot}%{_texdir}/texmf-dist/doc/man %{buildroot}%{_datadir}/ find %{buildroot}%{_texdir}/texmf-dist/doc/man -type f | xargs rm -f mv %{buildroot}%{_texdir}/texmf-dist/doc/info/* %{buildroot}%{_infodir}/ -# Remove cjk-gs-integrate files -# Yes, we probably should remove the source, but there is a possibility that we will -# re-add this subpackage at some point. rm -rf %{buildroot}%{_bindir}/cjk-gs-integrate rm -rf %{buildroot}%{_texdir}/texmf-dist/scripts/cjk-gs-integrate rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/fonts/cjk-gs-integrate rm -rf %{buildroot}%{_texdir}/texmf-dist/fonts/misc/cjk-gs-integrate -# Fix pkgconfig files for file in $(find %{buildroot}%{_libdir}/pkgconfig/ -type f -name '*.pc') do sed -i 's|%{_builddir}/%{name}-%{source_date}/source/inst|/usr|g' $file sed -i 's|/usr/lib|%{_libdir}|g' $file done -# Python fixup -# Change shebang in all relevant files in this directory and all subdirectories -# See `man find` for how the `-exec command {} +` syntax works pushd %{buildroot} find -type f -exec sed -i '1s|^#!/usr/bin/python$|#!%{__python3}|' {} + find -type f -exec sed -i '1s|^#!/usr/bin/env python$|#!%{__python3}|' {} + sed -i '1s|^#!/usr/bin/python |#!%{__python3} |' ./%{_texdir}/texmf-dist/scripts/de-macro/de-macro -# Get rid of the python2 variant bits from pythontex (we need them to generate the py3 bits, but not in the package) rm -rf ./%{_texdir}/texmf-dist/scripts/pythontex/pythontex2.py rm -rf ./%{_texdir}/texmf-dist/scripts/pythontex/depythontex2.py popd -# One dir to own mkdir -p %{buildroot}%{_texdir}/texmf-dist/tex/generic/context/third -# TeXLive has a fork of psutils -# we namespace those binaries to avoid conflicts with the upstream psutils pushd %{buildroot}%{_bindir} for i in epsffit extractres includeres psbook psjoin psnup psresize psselect pstops do mv $i tl-$i done popd -# we also rename the manpages + pushd %{buildroot}%{_mandir}/man1/ for i in epsffit extractres includeres psbook psjoin psnup psresize psselect pstops psutils do mv $i.1 tl-$i.1 done popd -# and move the config file + mkdir -p %{buildroot}%{_sysconfdir}/texlive/psutils mv %{buildroot}%{_texdir}/texmf-dist/psutils/paper.cfg %{buildroot}%{_sysconfdir}/texlive/psutils/paper.cfg ln -s %{_sysconfdir}/texlive/psutils/paper.cfg %{buildroot}%{_texdir}/texmf-dist/psutils/paper.cfg -# Some (most) of the binaries are ending up with RPATH despite our best efforts. for i in afm2pl afm2tfm aleph bibtex bibtex8 bibtexu chkdvifont chktex ctie ctangle ctwill ctwill-refsort ctwill-twinx cweave detex disdvi dt2dv dv2dt dvi2tty dvibook dviconcat dvicopy dvilj dvilj2p dvilj4 dvilj4l dvipng \ dvipos dvips dviselect dvispc dvisvgm dvitodvi dvitype eptex euptex gftodvi gftopk gftype gregorio gsftopk hbf2gf hitex kpsewhich luahbtex luatex mag makeindex makejvf mendex mf mflua mft mf-nowin mpost otftotfm msxlint \ odvicopy odvitype omfonts otangle otp2ocp outocp patgen pbibtex pdftex pdftosrc pktogf pdvitype pfb2pfa pk2bm pktype pltotf pmpost pooltype ppltotf ps2pk ptex ptftopl synctex t4ht tangle tex tex4ht tftopl tie tl-epsffit tl-psbook tl-psnup tl-psresize tl-psselect tl-pstops \ @@ -1041,16 +844,10 @@ done chrpath --delete %{buildroot}%{_bindir}/luajithbtex chrpath --delete %{buildroot}%{_bindir}/luajittex chrpath --delete %{buildroot}%{_bindir}/mfluajit - -# And remove the rpath from this library. chrpath --delete %{buildroot}%{_libdir}/libptexenc.so.* -# This map file provided by texlive-scripts is not useful and confuses lots of things when it ends up in pdftex.map -# Renaming it should prevent it from being included mv %{buildroot}%{_texdir}/texmf-dist/fonts/map/dvips/tetex/dvipdfm35.map %{buildroot}%{_texdir}/texmf-dist/fonts/map/dvips/tetex/dvipdfm35.oldmap -# SCRIPTLETS - %pretrans -p path = "/usr/share/texmf" st = posix.stat(path) @@ -1082,25 +879,16 @@ export TEXMFLOCAL=/usr/share/texlive/texmf-local %{_bindir}/mtxrun --generate &> /dev/null || : %transfiletriggerin -n %{shortname}-kpathsea -- %{_texdir} -# Commented lines are DEBUG mode -# touch /usr/share/texlive/kpathsea.log -# /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr --version 2>&1 | tee -a /usr/share/texlive/kpathsea.log || : -# /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr --verbose 2>&1 | tee -a /usr/share/texlive/kpathsea.log || : -# /usr/bin/sh -x %{_bindir}/texhash 2>&1 | tee -a /usr/share/texlive/kpathsea.log || : /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr 2> /dev/null || : export TEXMF=/usr/share/texlive/texmf-dist export TEXMFCNF=/usr/share/texlive/texmf-dist/web2c export TEXMFCACHE=/var/lib/texmf -# %{_bindir}/fmtutil-sys --all 2>&1 | tee -a /usr/share/texlive/kpathsea.log || : %{_bindir}/fmtutil-sys --all &> /dev/null || : %transfiletriggerpostun -n %{shortname}-kpathsea -- %{_texdir} /usr/share/texlive/texmf-dist/scripts/texlive/mktexlsr 2> /dev/null || : %transfiletriggerin -n %{shortname}-kpathsea -- %{_texdir}/texmf-dist/fonts/map/dvips/ -# MixedMap list, from directory with _EVERY_ tex subpackage unpacked: for i in `grep -r "addMixedMap" tlpkg/ |cut -d ":" -f 2- | sort -n | uniq | cut -d " " -f 3`; do printf "$i|"; done -# Map list, from directory with _EVERY_ tex subpackage unpacked: for i in `grep -r "addMap" tlpkg/ |cut -d ":" -f 2- | sort -n | uniq | cut -d " " -f 3`; do printf "$i|"; done -# NO OTHER MAPS SHOULD BE ADDED. That road leads to madness. list=`grep "\.map" | sort -n | uniq` while read -r line; do [ -z "$line" ] && continue @@ -1113,14 +901,10 @@ while read -r line; do fi fi done <<< "$list" -# With the demise of updmap-map, we need to make system maps here. -# %{_bindir}/updmap-sys --quiet --nomkmap >/dev/null || : yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %{_bindir}/updmap-sys --quiet --force 2>&1 || : %transfiletriggerpostun -n %{shortname}-kpathsea -- %{_texdir}/texmf-dist/fonts/map/dvips/ -# I am not sure we need to do this, but it is not harmful. -# TODO: see if we can safely remove everything above the updmap-sys calls list=`grep "\.map" | sort -n | uniq` while read -r line; do [ -z "$line" ] && continue @@ -1133,8 +917,6 @@ while read -r line; do fi fi done <<< "$list" -# With the demise of updmap-map, we need to make system maps here. -# %{_bindir}/updmap-sys --quiet --nomkmap >/dev/null || : yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %{_bindir}/updmap-sys --quiet --force 2>&1 || : @@ -1149,7 +931,6 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %{_texdir}/texlive.tlpdb %{_texdir}/tlpkg/texlive.tlpdb %{_rpmmacrodir}/macros.texlive -# Mostly we own directories. %dir %{_sysconfdir}/%{shortname} %dir %{_sysconfdir}/%{shortname}/dvips %dir %{_sysconfdir}/%{shortname}/dvips/config @@ -1199,6 +980,9 @@ yes | %{_bindir}/updmap-sys --quiet --syncwithtrees >/dev/null 2>&1 || : %ghost %{_datadir}/texmf.rpmmoved %changelog +* Wed Apr 19 2023 Chunmei Xu - 10:20220321-13 +- remove poppler related patches + * Wed Apr 12 2023 Zhongling - 10:20220321-12 - Refactor rpm spec -- Gitee