From 389a66c13c327d5bb15ffe8f6515e77ce6d6faaea9e7d273174bfb7cbd075d4e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 13 May 2019 12:42:50 +0000 Subject: [PATCH] Make if build again OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=313 --- source-configure.dif | 69 ++-- source-fix-bool-poppler.patch | 66 +++- source-fix-const-poppler0.66.0.patch | 545 ++++++++++++++++++++++++-- source-poppler-fix-dict-memleak.patch | 15 +- source-poppler-use-std_string.patch | 29 +- source.dif | 66 ++-- texlive.changes | 15 + texlive.spec | 32 +- 8 files changed, 659 insertions(+), 178 deletions(-) diff --git a/source-configure.dif b/source-configure.dif index 31f43e6..3dcd2fc 100644 --- a/source-configure.dif +++ b/source-configure.dif @@ -1,12 +1,12 @@ --- - configure | 3 --- configure.ac | 3 --- - texk/dvipdfm-x/configure | 8 ++++---- + m4/kpse-setup.m4 | 3 ++- texk/dvipdfm-x/configure.ac | 2 +- - 4 files changed, 5 insertions(+), 11 deletions(-) + texk/dvisvgm/configure.ac | 1 + + 4 files changed, 4 insertions(+), 5 deletions(-) --- configure.ac -+++ configure.ac 2018-04-10 08:18:33.592283965 +0000 ++++ configure.ac 2019-05-13 10:27:04.041797653 +0000 @@ -126,9 +126,6 @@ KPSE_FOR_PKGS([sys_libs], [m4_sinclude([ if test "x$syslib_status" = xno; then AC_MSG_ERROR([some requested system libraries failed]) @@ -17,20 +17,20 @@ KPSE_RESTORE_FLAGS AM_CONDITIONAL([cross], [test "x$cross_compiling" = xyes]) ---- configure -+++ configure 2018-04-10 08:18:33.596283890 +0000 -@@ -22269,9 +22269,6 @@ fi - if test "x$syslib_status" = xno; then - as_fn_error $? "some requested system libraries failed" "$LINENO" 5 - fi --if test "x$syslib_used:$enable_native_texlive_build" = xyes:yes; then -- as_fn_error $? "you can not use system libraries for a native TeX Live build" "$LINENO" 5 --fi - CPPFLAGS=$kpse_save_CPPFLAGS - LIBS=$kpse_save_LIBS - +--- m4/kpse-setup.m4 ++++ m4/kpse-setup.m4 2019-05-13 10:27:04.041797653 +0000 +@@ -30,7 +30,8 @@ AC_ARG_ENABLE([native-texlive-build], + AS_HELP_STRING([--disable-native-texlive-build], + [do not build for the TeX Live binary distribution]))[]dnl + AS_CASE([$enable_native_texlive_build], +- [yes | no], [:], ++ [yes | no], [ ++ ac_configure_args="$ac_configure_args '--enable-native-texlive-build=$enable_native_texlive_build'"], + [enable_native_texlive_build=yes + ac_configure_args="$ac_configure_args '--enable-native-texlive-build'"]) + AS_CASE([$enable_largefile], --- texk/dvipdfm-x/configure.ac -+++ texk/dvipdfm-x/configure.ac 2018-04-10 08:22:36.759724038 +0000 ++++ texk/dvipdfm-x/configure.ac 2019-05-13 10:27:04.041797653 +0000 @@ -7,7 +7,7 @@ dnl This file is free software; the co dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -40,28 +40,13 @@ AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([agl.c]) AC_CONFIG_AUX_DIR([../../build-aux]) ---- texk/dvipdfm-x/configure -+++ texk/dvipdfm-x/configure 2018-04-10 08:24:05.082067815 +0000 -@@ -588,10 +588,10 @@ MFLAGS= - MAKEFLAGS= - - # Identity of this package. --PACKAGE_NAME='dvipdfm-x (TeX Live)' --PACKAGE_TARNAME='dvipdfm-x--tex-live-' -+PACKAGE_NAME='dvipdfmx (TeX Live)' -+PACKAGE_TARNAME='dvipdfmx' - PACKAGE_VERSION='20190225' --PACKAGE_STRING='dvipdfm-x (TeX Live) 20190225' -+PACKAGE_STRING='dvipdfmx (TeX Live) 20190225' - PACKAGE_BUGREPORT='tex-k@tug.org' - PACKAGE_URL='' - -@@ -8074,7 +8074,7 @@ fi - - - # Define the identity of the package. -- PACKAGE='dvipdfm-x--tex-live-' -+ PACKAGE='dvipdfmx' - VERSION='20190225' - - +--- texk/dvisvgm/configure.ac ++++ texk/dvisvgm/configure.ac 2019-05-13 10:34:27.319097098 +0000 +@@ -59,6 +59,7 @@ if test "x$enable_native_texlive_build" + HAVE_LIBGS=0 + else + have_libgs=yes ++ HAVE_LIBGS=$have_libgs + AC_CHECK_HEADER([ghostscript/iapi.h], + [AC_CHECK_LIB(gs, gsapi_revision,, [have_libgs=no])], + [have_libgs=no]) diff --git a/source-fix-bool-poppler.patch b/source-fix-bool-poppler.patch index 28685b4..18a9d76 100644 --- a/source-fix-bool-poppler.patch +++ b/source-fix-bool-poppler.patch @@ -4,15 +4,15 @@ Date: Sat, 22 Dec 2018 00:25:44 +0100 Subject: [PATCH] Use bool instead of GBool --- - pdftexdir/pdftoepdf.cc | 6 +++--- - pdftexdir/pdftosrc.cc | 4 ++-- - 4 files changed, 16 insertions(+), 16 deletions(-) + texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc | 6 +++--- + texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc | 6 +++--- + texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc | 6 +++--- + texk/web2c/pdftexdir/pdftosrc.cc | 4 ++-- + 4 files changed, 11 insertions(+), 11 deletions(-) -diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc -index 013cf13..d26ac61 100644 ---- a/texk/web2c/pdftexdir/pdftoepdf.cc -+++ b/texk/web2c/pdftexdir/pdftoepdf.cc -@@ -143,7 +143,7 @@ struct UsedEncoding { +--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc ++++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc 2019-05-13 08:46:30.531477531 +0000 +@@ -120,7 +120,7 @@ struct UsedEncoding { static InObj *inObjList; static UsedEncoding *encodingList; @@ -21,7 +21,51 @@ index 013cf13..d26ac61 100644 // -------------------------------------------------------------------- // Maintain list of open embedded PDF files -@@ -737,8 +737,8 @@ read_pdf_info(char *image_name, char *page_name, int page_num, +@@ -724,8 +724,8 @@ read_pdf_info(char *image_name, char *pa + // 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); +--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc ++++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc 2019-05-13 08:46:38.347329153 +0000 +@@ -120,7 +120,7 @@ struct UsedEncoding { + + static InObj *inObjList; + static UsedEncoding *encodingList; +-static GBool isInit = gFalse; ++static bool isInit = false; + + // -------------------------------------------------------------------- + // Maintain list of open embedded PDF files +@@ -724,8 +724,8 @@ read_pdf_info(char *image_name, char *pa + // 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); +--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc ++++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc 2019-05-13 08:46:45.075201428 +0000 +@@ -120,7 +120,7 @@ struct UsedEncoding { + + static InObj *inObjList; + static UsedEncoding *encodingList; +-static GBool isInit = gFalse; ++static bool isInit = false; + + // -------------------------------------------------------------------- + // Maintain list of open embedded PDF files +@@ -724,8 +724,8 @@ read_pdf_info(char *image_name, char *pa // initialize if (!isInit) { globalParams = new GlobalParams(); @@ -34,8 +78,8 @@ index 013cf13..d26ac61 100644 pdf_doc = find_add_document(image_name); diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc index 3b1d250..7dbee00 100644 ---- a/texk/web2c/pdftexdir/pdftosrc.cc -+++ b/texk/web2c/pdftexdir/pdftosrc.cc +--- a/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc ++++ b/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc @@ -178,9 +178,9 @@ int main(int argc, char *argv[]) // parse the header: object numbers and offsets diff --git a/source-fix-const-poppler0.66.0.patch b/source-fix-const-poppler0.66.0.patch index a0d4812..e7ba8fb 100644 --- a/source-fix-const-poppler0.66.0.patch +++ b/source-fix-const-poppler0.66.0.patch @@ -1,16 +1,21 @@ --- - texk/web2c/pdftexdir/epdf.c | 2 +- - texk/web2c/pdftexdir/mapfile.c | 2 +- - texk/web2c/pdftexdir/pdftex-common.h | 6 +++--- - texk/web2c/pdftexdir/pdftoepdf.cc | 28 ++++++++++++++-------------- - texk/web2c/pdftexdir/pdftosrc.cc | 2 +- - texk/web2c/pdftexdir/writeenc.c | 2 +- - 6 files changed, 21 insertions(+), 21 deletions(-) + texk/web2c/pdftexdir/epdf.c | 2 - + texk/web2c/pdftexdir/mapfile.c | 2 - + texk/web2c/pdftexdir/pdftex-common.h | 6 ++--- + texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc | 28 ++++++++++++------------ + texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc | 28 ++++++++++++------------ + texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc | 22 +++++++++--------- + texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc | 22 +++++++++--------- + texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc | 22 +++++++++--------- + texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc | 22 +++++++++--------- + texk/web2c/pdftexdir/pdftosrc-newpoppler.cc | 2 - + texk/web2c/pdftexdir/writeenc.c | 2 - + 11 files changed, 79 insertions(+), 79 deletions(-) Index: texk/web2c/pdftexdir/pdftosrc.cc =================================================================== ---- texk/web2c/pdftexdir/pdftosrc.cc -+++ texk/web2c/pdftexdir/pdftosrc.cc +--- texk/web2c/pdftexdir/pdftosrc-newpoppler.cc ++++ texk/web2c/pdftexdir/pdftosrc-newpoppler.cc @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) Stream *s; Object srcStream, srcName, catalogDict; @@ -20,11 +25,9 @@ Index: texk/web2c/pdftexdir/pdftosrc.cc int objnum = 0, objgen = 0; bool extract_xref_table = false; int c; -Index: texk/web2c/pdftexdir/pdftoepdf.cc -=================================================================== ---- texk/web2c/pdftexdir/pdftoepdf.cc -+++ texk/web2c/pdftexdir/pdftoepdf.cc -@@ -310,7 +310,7 @@ static int getNewObjectNumber(Ref ref) +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc 2019-05-13 08:37:11.562085046 +0000 +@@ -275,7 +275,7 @@ static int getNewObjectNumber(Ref ref) static void copyObject(Object *); @@ -33,16 +36,16 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc { pdf_puts("/"); for (; *s != 0; s++) { -@@ -322,7 +322,7 @@ static void copyName(char *s) +@@ -287,7 +287,7 @@ static void copyName(char *s) } } -static void copyDictEntry(Object * obj, int i) +static void copyDictEntry(const Object * obj, int i) { - PdfObject obj1; - copyName(obj->dictGetKey(i)); -@@ -332,7 +332,7 @@ static void copyDictEntry(Object * obj, + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, pdf_puts("\n"); } @@ -51,7 +54,7 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc { int i, l; if (!obj->isDict()) -@@ -342,10 +342,10 @@ static void copyDict(Object * obj) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) copyDictEntry(obj, i); } @@ -64,16 +67,16 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc if (!obj->isDict()) pdftex_fail("PDF inclusion: invalid dict type <%s>", obj->getTypeName()); -@@ -398,7 +398,7 @@ static void copyProcSet(Object * obj) - - #define REPLACE_TYPE1C true +@@ -382,7 +382,7 @@ static bool embeddableFont(Object * font + return false; + } -static void copyFont(char *tag, Object * fontRef) +static void copyFont(const char *tag, Object * fontRef) { - PdfObject fontdict, subtype, basefont, fontdescRef, fontdesc, charset, - fontfile, ffsubtype, stemV; -@@ -477,7 +477,7 @@ static void copyFontResources(Object * o + Object fontdict, subtype, basefont, fontdescRef, fontdesc, charset, + stemV; +@@ -467,7 +467,7 @@ static void copyFontResources(Object * o pdf_puts(">>\n"); } @@ -82,8 +85,8 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc { // copies all other resources (write_epdf handles Fonts and ProcSets), -@@ -564,8 +564,8 @@ static void copyObject(Object * obj) - PdfObject obj1; +@@ -554,8 +554,8 @@ static void copyObject(Object * obj) + Object obj1; int i, l, c; Ref ref; - char *p; @@ -93,7 +96,7 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc if (obj->isBool()) { pdf_printf("%s", obj->getBool()? "true" : "false"); } else if (obj->isInt()) { -@@ -668,7 +668,7 @@ static void writeRefs() +@@ -655,7 +655,7 @@ static void writeRefs() static void writeEncodings() { UsedEncoding *r, *n; @@ -102,7 +105,7 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc int i; for (r = encodingList; r != 0; r = r->next) { for (i = 0; i < 256; i++) { -@@ -696,7 +696,7 @@ static void writeEncodings() +@@ -683,7 +683,7 @@ static void writeEncodings() } // get the pagebox according to the pagebox_spec @@ -111,7 +114,7 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc { if (pagebox_spec == pdfboxspecmedia) return page->getMediaBox(); -@@ -728,7 +728,7 @@ read_pdf_info(char *image_name, char *pa +@@ -715,7 +715,7 @@ read_pdf_info(char *image_name, char *pa { PdfDocument *pdf_doc; Page *page; @@ -120,8 +123,8 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc #ifdef POPPLER_VERSION int pdf_major_version_found, pdf_minor_version_found; #else -@@ -847,7 +847,7 @@ void write_epdf(void) - PdfObject groupDict; +@@ -822,7 +822,7 @@ void write_epdf(void) + Object groupDict; bool writeSepGroup = false; Object info; - char *key; @@ -129,15 +132,487 @@ Index: texk/web2c/pdftexdir/pdftoepdf.cc char s[256]; int i, l; int rotate; -@@ -874,7 +874,7 @@ void write_epdf(void) - xref->fetch(pageRef->num, pageRef->gen, &pageObj); - pageDict = pageObj->getDict(); +@@ -849,7 +849,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"); +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc 2019-05-13 08:37:19.877927300 +0000 +@@ -275,7 +275,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++) { +@@ -287,7 +287,7 @@ static void copyName(char *s) + } + } + +-static void copyDictEntry(Object * obj, int i) ++static void copyDictEntry(const Object * obj, int i) + { + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, + pdf_puts("\n"); + } + +-static void copyDict(Object * obj) ++static void copyDict(const Object * obj) + { + int i, l; + if (!obj->isDict()) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) + copyDictEntry(obj, i); + } + +-static void copyFontDict(Object * obj, InObj * r) ++static void copyFontDict(const 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()); +@@ -382,7 +382,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; +@@ -467,7 +467,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), + +@@ -554,8 +554,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()) { +@@ -655,7 +655,7 @@ static void writeRefs() + static void writeEncodings() + { + UsedEncoding *r, *n; +- char *glyphNames[256], *s; ++ const char *glyphNames[256], *s; + int i; + for (r = encodingList; r != 0; r = r->next) { + for (i = 0; i < 256; i++) { +@@ -683,7 +683,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(); +@@ -715,7 +715,7 @@ read_pdf_info(char *image_name, char *pa + { + PdfDocument *pdf_doc; + Page *page; +- PDFRectangle *pagebox; ++ const PDFRectangle *pagebox; + #ifdef POPPLER_VERSION + int pdf_major_version_found, pdf_minor_version_found; + #else +@@ -822,7 +822,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; +@@ -849,7 +849,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"); +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc 2019-05-13 08:37:25.761815685 +0000 +@@ -275,7 +275,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++) { +@@ -287,7 +287,7 @@ static void copyName(char *s) + } + } + +-static void copyDictEntry(Object * obj, int i) ++static void copyDictEntry(const Object * obj, int i) + { + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, + pdf_puts("\n"); + } + +-static void copyDict(Object * obj) ++static void copyDict(const Object * obj) + { + int i, l; + if (!obj->isDict()) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) + copyDictEntry(obj, i); + } + +-static void copyFontDict(Object * obj, InObj * r) ++static void copyFontDict(const 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()); +@@ -382,7 +382,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; +@@ -467,7 +467,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), + +@@ -554,8 +554,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()) { +@@ -655,7 +655,7 @@ static void writeRefs() + static void writeEncodings() + { + UsedEncoding *r, *n; +- char *glyphNames[256], *s; ++ const char *glyphNames[256], *s; + int i; + for (r = encodingList; r != 0; r = r->next) { + for (i = 0; i < 256; i++) { +@@ -822,7 +822,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; +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc 2019-05-13 08:38:42.464360579 +0000 +@@ -275,7 +275,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++) { +@@ -287,7 +287,7 @@ static void copyName(char *s) + } + } + +-static void copyDictEntry(Object * obj, int i) ++static void copyDictEntry(const Object * obj, int i) + { + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, + pdf_puts("\n"); + } + +-static void copyDict(Object * obj) ++static void copyDict(const Object * obj) + { + int i, l; + if (!obj->isDict()) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) + copyDictEntry(obj, i); + } + +-static void copyFontDict(Object * obj, InObj * r) ++static void copyFontDict(const 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()); +@@ -382,7 +382,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; +@@ -467,7 +467,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), + +@@ -554,8 +554,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()) { +@@ -655,7 +655,7 @@ static void writeRefs() + static void writeEncodings() + { + UsedEncoding *r, *n; +- char *glyphNames[256], *s; ++ const char *glyphNames[256], *s; + int i; + for (r = encodingList; r != 0; r = r->next) { + for (i = 0; i < 256; i++) { +@@ -822,7 +822,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; +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc 2019-05-13 08:38:55.432114555 +0000 +@@ -275,7 +275,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++) { +@@ -287,7 +287,7 @@ static void copyName(char *s) + } + } + +-static void copyDictEntry(Object * obj, int i) ++static void copyDictEntry(const Object * obj, int i) + { + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, + pdf_puts("\n"); + } + +-static void copyDict(Object * obj) ++static void copyDict(const Object * obj) + { + int i, l; + if (!obj->isDict()) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) + copyDictEntry(obj, i); + } + +-static void copyFontDict(Object * obj, InObj * r) ++static void copyFontDict(const 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()); +@@ -382,7 +382,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; +@@ -467,7 +467,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), + +@@ -554,8 +554,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()) { +@@ -655,7 +655,7 @@ static void writeRefs() + static void writeEncodings() + { + UsedEncoding *r, *n; +- char *glyphNames[256], *s; ++ const char *glyphNames[256], *s; + int i; + for (r = encodingList; r != 0; r = r->next) { + for (i = 0; i < 256; i++) { +@@ -822,7 +822,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; +--- texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc ++++ texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc 2019-05-13 08:39:36.183341391 +0000 +@@ -275,7 +275,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++) { +@@ -287,7 +287,7 @@ static void copyName(char *s) + } + } + +-static void copyDictEntry(Object * obj, int i) ++static void copyDictEntry(const Object * obj, int i) + { + Object obj1; + copyName((char *)obj->dictGetKey(i)); +@@ -297,7 +297,7 @@ static void copyDictEntry(Object * obj, + pdf_puts("\n"); + } + +-static void copyDict(Object * obj) ++static void copyDict(const Object * obj) + { + int i, l; + if (!obj->isDict()) +@@ -307,10 +307,10 @@ static void copyDict(Object * obj) + copyDictEntry(obj, i); + } + +-static void copyFontDict(Object * obj, InObj * r) ++static void copyFontDict(const 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()); +@@ -382,7 +382,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; +@@ -467,7 +467,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), + +@@ -554,8 +554,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()) { +@@ -655,7 +655,7 @@ static void writeRefs() + static void writeEncodings() + { + UsedEncoding *r, *n; +- char *glyphNames[256], *s; ++ const char *glyphNames[256], *s; + int i; + for (r = encodingList; r != 0; r = r->next) { + for (i = 0; i < 256; i++) { +@@ -822,7 +822,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; Index: texk/web2c/pdftexdir/epdf.c =================================================================== --- texk/web2c/pdftexdir/epdf.c diff --git a/source-poppler-fix-dict-memleak.patch b/source-poppler-fix-dict-memleak.patch index cac70e7..1fc43b0 100644 --- a/source-poppler-fix-dict-memleak.patch +++ b/source-poppler-fix-dict-memleak.patch @@ -4,26 +4,13 @@ Date: Sat, 22 Dec 2018 03:00:04 +0100 Subject: [PATCH] Avoid leaking string copy --- - texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc | 2 +- texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc | 2 +- texk/web2c/pdftexdir/pdftoepdf-poppler0.70.0.cc | 2 +- texk/web2c/pdftexdir/pdftoepdf-poppler0.71.0.cc | 2 +- texk/web2c/pdftexdir/pdftoepdf-poppler0.72.0.cc | 2 +- texk/web2c/pdftexdir/pdftoepdf-poppler0.75.0.cc | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) + 5 files changed, 5 insertions(+), 5 deletions(-) -diff --git a/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc b/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc ---- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc -+++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.68.0.cc -@@ -977,7 +977,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 --git a/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc b/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc --- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc +++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.69.0.cc diff --git a/source-poppler-use-std_string.patch b/source-poppler-use-std_string.patch index 382f624..b32bb57 100644 --- a/source-poppler-use-std_string.patch +++ b/source-poppler-use-std_string.patch @@ -4,36 +4,13 @@ Date: Sat, 22 Dec 2018 00:42:23 +0100 Subject: [PATCH] std::string --- - texk/web2c/pdftexdir/pdftoepdf.cc | 6 +++--- texk/web2c/pdftexdir/pdftosrc.cc | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/texk/web2c/pdftexdir/pdftoepdf.cc b/texk/web2c/pdftexdir/pdftoepdf.cc -index d26ac61..7c14570 100644 ---- a/texk/web2c/pdftexdir/pdftoepdf.cc -+++ b/texk/web2c/pdftexdir/pdftoepdf.cc -@@ -437,7 +437,7 @@ static void copyFont(const char *tag, Ob - 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()); -+ epdf_mark_glyphs(fd, charset->getString()->c_str()); - else - embed_whole_font(fd); - addFontDesc(fontdescRef->getRef(), fd); -@@ -576,7 +576,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("("); diff --git a/texk/web2c/pdftexdir/pdftosrc.cc b/texk/web2c/pdftexdir/pdftosrc.cc index 7dbee00..cc44daf 100644 ---- a/texk/web2c/pdftexdir/pdftosrc.cc -+++ b/texk/web2c/pdftexdir/pdftosrc.cc +--- a/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc ++++ b/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "No SourceName found\n"); exit(1); diff --git a/source.dif b/source.dif index 3c0a2ed..064947c 100644 --- a/source.dif +++ b/source.dif @@ -5,29 +5,30 @@ texk/kpathsea/c-fopen.h | 6 texk/kpathsea/c-memstr.h | 3 texk/kpathsea/cnf-to-paths.awk | 2 - texk/kpathsea/db.c | 13 - texk/kpathsea/mktex.opt | 39 ++ - texk/kpathsea/mktexlsr | 52 +++ + texk/kpathsea/db.c | 13 - + texk/kpathsea/mktex.opt | 39 ++- + texk/kpathsea/mktexlsr | 52 +++- texk/kpathsea/progname.c | 4 - texk/kpathsea/texmf.cnf | 174 +++++++----- + texk/kpathsea/texmf.cnf | 140 +++++++----- texk/lcdf-typetools/lcdf-typetools-src/otftotfm/otftotfm.cc | 3 - texk/ps2pk/pk2bm.c | 35 +- - texk/texlive/linked_scripts/musixtex/musixtex.lua | 17 - + texk/ps2pk/pk2bm.c | 2 + texk/texlive/linked_scripts/musixtex/musixtex.lua | 17 + texk/texlive/linked_scripts/texlive/fmtutil-sys.sh | 1 - texk/texlive/linked_scripts/texlive/fmtutil.pl | 24 + + texk/texlive/linked_scripts/texlive/fmtutil.pl | 24 +- texk/texlive/linked_scripts/texlive/updmap-sys.sh | 1 texk/texlive/tl_scripts/fmtutil.cnf | 17 - - texk/texlive/tl_scripts/texconfig-dialog.sh | 14 + texk/texlive/tl_scripts/texconfig-dialog.sh | 14 - texk/texlive/tl_scripts/texconfig-sys.sh | 1 - texk/texlive/tl_scripts/texconfig.sh | 35 -- - texk/texlive/tl_scripts/texlinks.sh | 53 ++- + texk/texlive/tl_scripts/texconfig.sh | 35 --- + texk/texlive/tl_scripts/texlinks.sh | 53 +++- texk/web2c/Makefile.in | 7 + texk/web2c/uptexdir/tests/gkhugeng.err | 8 texk/web2c/window/regis.c | 8 texk/web2c/window/x11-Xlib.c | 8 texk/web2c/window/x11-Xt.c | 4 texk/xdvik/psgs.c | 22 + texk/xdvik/xdvi-sh.in | 19 + - 28 files changed, 383 insertions(+), 194 deletions(-) + 29 files changed, 357 insertions(+), 161 deletions(-) --- libs/icu/icu-src/source/common/Makefile.in +++ libs/icu/icu-src/source/common/Makefile.in 2018-04-10 09:02:17.774983801 +0000 @@ -632,23 +633,6 @@ #define VERSION_OPT 301 --- texk/ps2pk/pk2bm.c +++ texk/ps2pk/pk2bm.c 2018-04-10 09:02:17.862982147 +0000 -@@ -45,7 +45,6 @@ - - static quarterword lsbf(quarterword u); - static void dots(quarterword u, int n); --static int atoo(char *oct); - - int main(int argc, char *argv[]) - { -@@ -54,7 +53,7 @@ int main(int argc, char *argv[]) - halfword *word; - chardesc cd; - const char *myname = "pk2bm"; -- char *pkname; -+ char *pkname, *endptr; - - while (--argc > 0 && (*++argv)[0] == '-') { - done=0; @@ -103,7 +102,7 @@ int main(int argc, char *argv[]) } } @@ -658,18 +642,6 @@ msg ("pk2bm (ps2pk) version " PACKAGE_VERSION "\n"); printf("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", myname); exit(1); -@@ -221,11 +220,3 @@ dots(quarterword u, int n) - bit>>=1; - } - } -- --static int --atoo(char *oct) --{ -- int octal = 0; -- while (*oct != '\0') octal = 8*octal + (*oct++) - '0'; -- return octal; --} --- texk/texlive/linked_scripts/musixtex/musixtex.lua +++ texk/texlive/linked_scripts/musixtex/musixtex.lua 2018-04-10 09:12:50.395048030 +0000 @@ -200,15 +200,26 @@ end @@ -1029,6 +1001,20 @@ test "x$fmt" = "x$engine" && continue if test -f "$d/$engine$exeext"; then case $unlink in +--- texk/web2c/uptexdir/tests/gkhugeng.err ++++ texk/web2c/uptexdir/tests/gkhugeng.err 2019-05-13 11:22:35.158192154 +0000 +@@ -1,3 +1,11 @@ ++warning: kpathsea: /etc/texmf/ls-R: No usable entries in ls-R. ++warning: kpathsea: See the manual for how to generate ls-R. ++warning: kpathsea: /var/lib/texmf/ls-R: No usable entries in ls-R. ++warning: kpathsea: See the manual for how to generate ls-R. ++warning: kpathsea: /usr/share/texmf/ls-R: No usable entries in ls-R. ++warning: kpathsea: See the manual for how to generate ls-R. ++warning: kpathsea: /var/cache/texmf/fonts/ls-R: No usable entries in ls-R. ++warning: kpathsea: See the manual for how to generate ls-R. + Input file is in YOKO-kumi kanji tfm format. + The fifth byte of the input file exceeds 127! + Sorry, but I can't go on; are you sure this is a TFM? --- texk/web2c/Makefile.in +++ texk/web2c/Makefile.in 2018-04-10 09:02:17.870981997 +0000 @@ -4947,7 +4947,7 @@ libmd5_a_SOURCES = libmd5/md5.c libmd5/m diff --git a/texlive.changes b/texlive.changes index 88c9e73..db67d49 100644 --- a/texlive.changes +++ b/texlive.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Mon May 13 12:38:47 UTC 2019 - Dr. Werner Fink + +- Make it build by modifying patches + * source-configure.dif + * source-fix-bool-poppler.patch + * source-fix-const-poppler0.66.0.patch + * source-poppler-fix-dict-memleak.patch + * source-poppler-use-std_string.patch + * source.dif + and the spec file by moving the code of the choice of the + poppler source below the patching area as well as build + require pkgconfig(glew), pkgconfig(glm), and pkgconfig(gsl) + for asymptote + ------------------------------------------------------------------- Fri May 10 13:04:02 UTC 2019 - Dr. Werner Fink diff --git a/texlive.spec b/texlive.spec index bb07376..9d04ed5 100644 --- a/texlive.spec +++ b/texlive.spec @@ -151,7 +151,10 @@ BuildRequires: potrace-devel BuildRequires: pwdutils BuildRequires: readline-devel BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(glew) +BuildRequires: pkgconfig(glm) BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(gsl) BuildConflicts: texinfo BuildRequires: unzip BuildRequires: xaw3d-devel @@ -3611,16 +3614,6 @@ This package is required by the package texlive-biber-bin. tar --use-compress-program=xz -xf %{S:3} popd %endif -if pkg-config --atleast-version=0.59 poppler -then - for cc in $(find -name '*newpoppler.cc') - do - test -e "$cc" || continue - old=${cc/-newpoppler/} - test -e "$old" && mv -fv $old $old.oldpoppler || : - mv -fv $cc $old - done -fi %patch1 -p0 -b .configure %patch2 -p0 -b .xdvizilla @@ -3665,6 +3658,25 @@ popd %patch57 -p1 -b .popplerdict %endif +if pkg-config --atleast-version=0.59 poppler +then + for cc in $(find -name '*newpoppler.cc') + do + test -e "$cc" || continue + old=${cc/-newpoppler/} + test -e "$old" && mv -fv $old $old.oldpoppler || : + mv -fv $cc $old + done + pver=$(pkg-config --modversion poppler) + for cc in $(find -name "*-poppler${pver}.cc") + do + test -e "$cc" || continue + old=${cc/-poppler${pver}/} + test -e "$old" && mv -fv $old $old.oldpoppler || : + mv -fv $cc $old + done +fi + # Correct FHS paths paths=$(find -name cnf-to-paths.awk) test -n "$paths" || exit 1