Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 2 years ago
commit
ac11d9475f
  1. 22
      SOURCES/generate-fmtutilcnf
  2. 26
      SOURCES/macros.texlive
  3. 40
      SOURCES/texlive-2016-kpathsea-texlive-path.patch
  4. 11
      SOURCES/texlive-20180414-annocheck.patch
  5. 25
      SOURCES/texlive-20190410-dvisvgm-fix-libgs-detection.patch
  6. 79
      SOURCES/texlive-20190410-tlmgr-ignore-warning.patch
  7. 142
      SOURCES/texlive-20200327-disable-more-failing-tests.patch
  8. 20
      SOURCES/texlive-20200327-poppler-0.90.patch
  9. 578
      SOURCES/texlive-20210325-new-poppler.patch
  10. 200
      SOURCES/texlive-20210325-poppler-0.73.patch
  11. 228
      SOURCES/texlive-20210325-poppler-0.84.patch
  12. 22
      SOURCES/texlive-20210325-texinfo-path-fix.patch
  13. 12
      SOURCES/texlive-base-20180414-disable-omegafonts-check-test.patch
  14. 12
      SOURCES/texlive-base-20200327-out-of-memory.patch
  15. 159
      SOURCES/texlive-base-20210325-configure-poppler-xpdf-fix.patch
  16. 168
      SOURCES/texlive-base-20210325-mendex-weird-arch-fixes.patch
  17. 10
      SOURCES/texlive-base-20210325-no-setpdfwrite.patch
  18. 34
      SOURCES/texlive-base-20210325-pdftoepdf-fix-crash.patch
  19. 49
      SOURCES/texlive-base-20210325-poppler-22.01.0.patch
  20. 345510
      SOURCES/texlive.tlpdb
  21. 51
      SOURCES/tl-format.patch
  22. 12
      SOURCES/tl-kpfix.patch
  23. 9845
      SPECS/texlive-base.spec

22
SOURCES/generate-fmtutilcnf

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
#!/bin/bash

# Regenerate the fmtutil.cnf file from the pieces which are currently present
# in the fmtutil.cnf.d directory.

# Abort immediately if any command fails
set -o errexit
shopt -s nullglob

texdir=$1
[[ -z $texdir ]] && texdir=/usr/share/texlive
web2cdir=$texdir/texmf-dist/web2c

rm -f $web2cdir/fmtutil.cnf.rpmtmp

echo "# Generated by $0 on $(date)" > $web2cdir/fmtutil.cnf.rpmtmp

cat $web2cdir/fmtutil-hdr.cnf \
$texdir/fmtutil.cnf.d/* \
>> $web2cdir/fmtutil.cnf.rpmtmp

mv $web2cdir/fmtutil.cnf.rpmtmp $web2cdir/fmtutil.cnf

26
SOURCES/macros.texlive

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
# macros to keep trees in texlive consistent
%_texmf /usr/share/texlive/texmf-local
%_texmf_main /usr/share/texlive/texmf-dist
%_texmf_vendor /usr/share/texlive/texmf-dist
%_texmf_var /var/lib/texmf
%_texmf_conf /usr/share/texlive/texmf-config

%texlive_post \
mkdir -p /var/run/texlive \
touch /var/run/texlive/run-texhash \
touch /var/run/texlive/run-mtxrun \
:

%texlive_postun \
if [ $1 == 1 ]; then \
mkdir -p /var/run/texlive \
touch /var/run/run-texhash \
else \
%{_bindir}/texhash 2> /dev/null \
fi \
:

%texlive_posttrans \
if [ -e /var/run/texlive/run-texhash ] && [ -e %{_bindir}/texhash ]; then %{_bindir}/texhash 2> /dev/null; rm -f /var/run/texlive/run-texhash; fi \
if [ -e /var/run/texlive/run-mtxrun ]; then export TEXMF=/usr/share/texlive/texmf-dist; export TEXMFCNF=/usr/share/texlive/texmf-dist/web2c; export TEXMFCACHE=/var/lib/texmf; %{_bindir}/mtxrun --generate &> /dev/null; rm -f /var/run/texlive/run-mtxrun; fi \
:

40
SOURCES/texlive-2016-kpathsea-texlive-path.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
diff -up source/texk/kpathsea/texmf.cnf.fixme source/texk/kpathsea/texmf.cnf
--- source/texk/kpathsea/texmf.cnf.fixme 2016-10-19 15:35:25.804218872 -0400
+++ source/texk/kpathsea/texmf.cnf 2016-10-19 15:37:19.308035612 -0400
@@ -491,17 +491,17 @@ RUBYINPUTS = .;$TEXMF/scripts/{$progna
%
TEXMFCNF = {\
$SELFAUTOLOC,\
-$SELFAUTOLOC/share/texmf-local/web2c,\
-$SELFAUTOLOC/share/texmf-dist/web2c,\
-$SELFAUTOLOC/share/texmf/web2c,\
+$SELFAUTOLOC/share/texlive/texmf-local/web2c,\
+$SELFAUTOLOC/share/texlive/texmf-dist/web2c,\
+$SELFAUTOLOC/share/texlive/texmf/web2c,\
$SELFAUTOLOC/texmf-local/web2c,\
$SELFAUTOLOC/texmf-dist/web2c,\
$SELFAUTOLOC/texmf/web2c,\
\
$SELFAUTODIR,\
-$SELFAUTODIR/share/texmf-local/web2c,\
-$SELFAUTODIR/share/texmf-dist/web2c,\
-$SELFAUTODIR/share/texmf/web2c,\
+$SELFAUTODIR/share/texlive/texmf-local/web2c,\
+$SELFAUTODIR/share/texlive/texmf-dist/web2c,\
+$SELFAUTODIR/share/texlive/texmf/web2c,\
$SELFAUTODIR/texmf-local/web2c,\
$SELFAUTODIR/texmf-dist/web2c,\
$SELFAUTODIR/texmf/web2c,\
@@ -509,9 +509,9 @@ $SELFAUTODIR/texmf/web2c,\
$SELFAUTOGRANDPARENT/texmf-local/web2c,\
$SELFAUTOPARENT,\
\
-$SELFAUTOPARENT/share/texmf-local/web2c,\
-$SELFAUTOPARENT/share/texmf-dist/web2c,\
-$SELFAUTOPARENT/share/texmf/web2c,\
+$SELFAUTOPARENT/share/texlive/texmf-local/web2c,\
+$SELFAUTOPARENT/share/texlive/texmf-dist/web2c,\
+$SELFAUTOPARENT/share/texlive/texmf/web2c,\
$SELFAUTOPARENT/texmf-local/web2c,\
$SELFAUTOPARENT/texmf-dist/web2c,\
$SELFAUTOPARENT/texmf/web2c\

11
SOURCES/texlive-20180414-annocheck.patch

@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
--- texlive-20180414/source/libs/luajit/Makefile.in.annocheck 2018-01-10 01:37:05.000000000 +0100
+++ texlive-20180414/source/libs/luajit/Makefile.in 2019-01-11 22:45:34.503080977 +0100
@@ -680,7 +680,7 @@
NEVER_NAMES_LT = -o -name .libs -o -name '*.lo'
AM_CPPFLAGS = -I$(srcdir)/$(LUAJIT_TREE)/src $(LUAJIT_DEFINES) -U_FORTIFY_SOURCE
AM_CFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_NOT_LOG2) -Wall
-AM_CCASFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_NOT_LOG2)
+AM_CCASFLAGS = $(LUAJIT_CFLAGS) $(LUAJIT_HAS_NOT_LOG2) -Wa,--generate-missing-build-notes=yes
SUBDIRS = . native include
lib_LTLIBRARIES = libtexluajit.la
libtexluajit_la_LDFLAGS = -bindir @bindir@ -no-undefined -version-info $(LUAJIT_LT_VERSINFO) $(LIBLUAJIT_LDEXTRA)

25
SOURCES/texlive-20190410-dvisvgm-fix-libgs-detection.patch

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
diff -up texlive-base-20190410/source/texk/dvisvgm/configure.ac.fix-libgs-detection texlive-base-20190410/source/texk/dvisvgm/configure.ac
--- texlive-base-20190410/source/texk/dvisvgm/configure.ac.fix-libgs-detection 2019-03-10 14:21:29.000000000 -0400
+++ texlive-base-20190410/source/texk/dvisvgm/configure.ac 2019-05-23 19:07:30.447057345 -0400
@@ -66,7 +66,8 @@ AS_IF([test "x$have_libgs" = "xno"],
# Ghostscript not found, check for dlopen
[AC_CHECK_LIB(dl, dlopen,,
[AC_DEFINE(DISABLE_GS, 1, [Set to 1 if PostScript support should be disabled])]
- [AC_MSG_WARN(PostScript support disabled)])])
+ [AC_MSG_WARN(PostScript support disabled)])],
+ [test "x$have_libgs" = "xyes"], [HAVE_LIBGS=1])
fi
if test -z "$HAVE_LIBGS" || test "$HAVE_LIBGS" -eq 0; then
diff -up texlive-base-20190410/source/texk/dvisvgm/configure.fix-libgs-detection texlive-base-20190410/source/texk/dvisvgm/configure
--- texlive-base-20190410/source/texk/dvisvgm/configure.fix-libgs-detection 2019-05-23 19:07:45.568703333 -0400
+++ texlive-base-20190410/source/texk/dvisvgm/configure 2019-05-23 19:09:31.341219687 -0400
@@ -22013,6 +22013,8 @@ $as_echo "#define DISABLE_GS 1" >>confde
$as_echo "$as_me: WARNING: PostScript support disabled" >&2;}
fi
+elif test "x$have_libgs" = "xyes"; then :
+ HAVE_LIBGS=1
fi
fi

79
SOURCES/texlive-20190410-tlmgr-ignore-warning.patch

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
diff -up ./scripts/texlive/tlmgr.pl.ignore-warning ./scripts/texlive/tlmgr.pl
--- ./scripts/texlive/tlmgr.pl.ignore-warning 2019-05-24 21:35:57.384845754 -0400
+++ ./scripts/texlive/tlmgr.pl 2019-05-24 21:39:32.703577109 -0400
@@ -231,6 +231,7 @@ my %action_specification = (
"dry-run|n" => 1,
"file" => 1,
"force" => 1,
+ "ignore-warning" => 1,
"no-depends" => 1,
"no-depends-at-all" => 1,
"reinstall" => 1,
@@ -331,6 +332,7 @@ my %action_specification = (
"dry-run|n" => 1,
"exclude" => "=s@",
"force" => 1,
+ "ignore-warning" => 1,
"list" => 1,
"no-auto-install" => 1,
"no-auto-remove" => 1,
@@ -2613,6 +2615,15 @@ sub upd_info {
}
sub action_update {
+ if (!($opts{"ignore-warning"})) {
+ print("*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.\n");
+ print("*** WARNING ***: This is almost NEVER what you want to do.\n");
+ print("*** WARNING ***: Try using dnf install/update instead.\n");
+ print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
+ print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
+ exit;
+ }
+
init_local_db(1);
$opts{"no-depends"} = 1 if $opts{"no-depends-at-all"};
@@ -3618,6 +3629,15 @@ sub check_announce_format_triggers {
# anymore! That has all to be done by the caller.
#
sub action_install {
+ if (!($opts{"ignore-warning"})) {
+ print("*** WARNING ***: Performing this action will likely destroy the Fedora TeXLive install on your system.\n");
+ print("*** WARNING ***: This is almost NEVER what you want to do.\n");
+ print("*** WARNING ***: Try using dnf install/update instead.\n");
+ print("*** WARNING ***: If performing this action is really what you want to do, pass the \"ignore-warning\" option.\n");
+ print("*** WARNING ***: But please do not file any bugs with the OS Vendor.\n");
+ exit;
+ }
+
init_local_db(1);
my $ret = $F_OK;
return ($F_ERROR) if !check_on_writable();
@@ -8151,6 +8171,13 @@ If updates to C<tlmgr> itself (or other
infrastructure) are present, C<tlmgr> will bail out and not perform the
installation unless this option is given. Not recommended.
+=item B<--ignore-warning>
+
+The tlmgr tool can really ruin a Fedora install of TeXLive.
+We have added a warning check here to try to keep you from
+blindly following a tutorial and doing this. If you still want to
+proceed, just use this option.
+
=item B<--no-depends>
Do not install dependencies. (By default, installing a package ensures
@@ -8846,6 +8873,13 @@ In short:
Nothing is actually installed; instead, the actions to be performed are
written to the terminal. This is a more detailed report than C<--list>.
+=item B<--ignore-warning>
+
+The tlmgr tool can really ruin a Fedora install of TeXLive.
+We have added a warning check here to try to keep you from
+blindly following a tutorial and doing this. If you still want to
+proceed, just use this option.
+
=item B<--list> [I<pkg>]
Concisely list the packages which would be updated, newly installed, or

142
SOURCES/texlive-20200327-disable-more-failing-tests.patch

@ -0,0 +1,142 @@ @@ -0,0 +1,142 @@
diff -up texlive-base-20200327/source/texk/web2c/am/texmf.am.dt texlive-base-20200327/source/texk/web2c/am/texmf.am
--- texlive-base-20200327/source/texk/web2c/am/texmf.am.dt 2019-12-17 14:24:59.000000000 -0500
+++ texlive-base-20200327/source/texk/web2c/am/texmf.am 2020-04-20 14:33:43.465656684 -0400
@@ -75,7 +75,7 @@ DISTCLEANFILES += $(nodist_tex_SOURCES)
# TeX tests
#
-tex_tests = triptest.test tests/write18-quote-test.pl tests/tex-closeout.test
+tex_tests = tests/write18-quote-test.pl tests/tex-closeout.test
triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
tests/write18-quote-test.log tests/tex-closeout.test: tex$(EXEEXT)
EXTRA_DIST += $(tex_tests)
@@ -203,7 +203,7 @@ DISTCLEANFILES += $(nodist_libmf_a_SOURC
# Metafont tests
#
-mf_tests = mftraptest.test
+mf_tests =
mftraptest.log: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mf_tests)
if MF
diff -up texlive-base-20200327/source/texk/web2c/eptexdir/am/eptex.am.dt texlive-base-20200327/source/texk/web2c/eptexdir/am/eptex.am
--- texlive-base-20200327/source/texk/web2c/eptexdir/am/eptex.am.dt 2020-04-20 14:32:46.325851485 -0400
+++ texlive-base-20200327/source/texk/web2c/eptexdir/am/eptex.am 2020-04-20 14:34:20.015892398 -0400
@@ -83,7 +83,7 @@ EXTRA_DIST += \
# e-pTeX Tests
#
-eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test eptexdir/epver.test
+eptex_tests = eptexdir/epver.test
eptexdir/eptriptest.log: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
eptexdir/pdfprimitive.log: eptex$(EXEEXT)
eptexdir/epver.log: eptex$(EXEEXT)
diff -up texlive-base-20200327/source/texk/web2c/euptexdir/am/euptex.am.dt texlive-base-20200327/source/texk/web2c/euptexdir/am/euptex.am
--- texlive-base-20200327/source/texk/web2c/euptexdir/am/euptex.am.dt 2020-04-20 14:32:46.326851464 -0400
+++ texlive-base-20200327/source/texk/web2c/euptexdir/am/euptex.am 2020-04-20 14:34:55.625147806 -0400
@@ -84,7 +84,7 @@ EXTRA_DIST += \
# e-upTeX Tests
#
-euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test euptexdir/eupver.test
+euptex_tests = euptexdir/eupver.test
euptexdir/euptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
euptexdir/pdfprimitive.log: euptex$(EXEEXT)
euptexdir/eupver.log: euptex$(EXEEXT)
diff -up texlive-base-20200327/source/texk/web2c/mfluadir/am/mflua.am.dt texlive-base-20200327/source/texk/web2c/mfluadir/am/mflua.am
--- texlive-base-20200327/source/texk/web2c/mfluadir/am/mflua.am.dt 2017-04-16 06:11:22.000000000 -0400
+++ texlive-base-20200327/source/texk/web2c/mfluadir/am/mflua.am 2020-04-20 14:32:46.326851464 -0400
@@ -110,7 +110,7 @@ EXTRA_DIST += \
# MFLua tests
#
-mflua_tests = mfluadir/mfluatraptest.test
+mflua_tests =
mfluadir/mfluatraptest.log: mflua$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mflua_tests)
diff -up texlive-base-20200327/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt texlive-base-20200327/source/texk/web2c/mfluajitdir/am/mfluajit.am
--- texlive-base-20200327/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt 2017-04-16 06:11:22.000000000 -0400
+++ texlive-base-20200327/source/texk/web2c/mfluajitdir/am/mfluajit.am 2020-04-20 14:32:46.326851464 -0400
@@ -106,7 +106,7 @@ EXTRA_DIST += \
# MFLuaJIT tests
#
-mfluajit_tests = mfluajitdir/mfluajittraptest.test
+mfluajit_tests =
mfluajitdir/mfluajittraptest.log: mfluajit$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
EXTRA_DIST += $(mfluajit_tests)
diff -up texlive-base-20200327/source/texk/web2c/pdftexdir/am/pdftex.am.dt texlive-base-20200327/source/texk/web2c/pdftexdir/am/pdftex.am
--- texlive-base-20200327/source/texk/web2c/pdftexdir/am/pdftex.am.dt 2020-04-20 14:32:46.326851464 -0400
+++ texlive-base-20200327/source/texk/web2c/pdftexdir/am/pdftex.am 2020-04-20 14:35:48.451043188 -0400
@@ -95,8 +95,8 @@ EXTRA_DIST += \
# pdfTeX tests
#
-pdftex_tests = pdftexdir/wprob.test pdftexdir/pdftex.test \
- pdftexdir/pdfimage.test pdftexdir/expanded.test \
+pdftex_tests = pdftexdir/pdftex.test \
+ pdftexdir/expanded.test \
pdftexdir/tests/cnfline.test
pdftexdir/wprob.log pdftexdir/pdftex.log \
diff -up texlive-base-20200327/source/texk/web2c/ptexdir/am/ptex.am.dt texlive-base-20200327/source/texk/web2c/ptexdir/am/ptex.am
--- texlive-base-20200327/source/texk/web2c/ptexdir/am/ptex.am.dt 2020-04-20 14:32:46.327851443 -0400
+++ texlive-base-20200327/source/texk/web2c/ptexdir/am/ptex.am 2020-04-20 14:36:23.750305069 -0400
@@ -168,7 +168,7 @@ EXTRA_DIST += \
# pTeX Tests
#
-ptex_tests = ptexdir/ptriptest.test ptexdir/pver.test
+ptex_tests = ptexdir/pver.test
ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
ptexdir/pver.log: ptex$(EXEEXT)
pweb_tests = \
diff -up texlive-base-20200327/source/texk/web2c/uptexdir/am/uptex.am.dt texlive-base-20200327/source/texk/web2c/uptexdir/am/uptex.am
--- texlive-base-20200327/source/texk/web2c/uptexdir/am/uptex.am.dt 2020-04-20 14:32:46.327851443 -0400
+++ texlive-base-20200327/source/texk/web2c/uptexdir/am/uptex.am 2020-04-20 14:36:53.266687857 -0400
@@ -158,7 +158,7 @@ EXTRA_DIST += \
uptexdir/ChangeLog
# upTeX Tests
-uptex_tests = uptexdir/uptriptest.test uptexdir/upver.test
+uptex_tests = uptexdir/upver.test
uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
uptexdir/upver.log: uptex$(EXEEXT)
upweb_tests = \
diff -up texlive-base-20200327/source/texk/web2c/xetexdir/am/xetex.am.dt texlive-base-20200327/source/texk/web2c/xetexdir/am/xetex.am
--- texlive-base-20200327/source/texk/web2c/xetexdir/am/xetex.am.dt 2020-04-20 14:32:46.327851443 -0400
+++ texlive-base-20200327/source/texk/web2c/xetexdir/am/xetex.am 2020-04-20 14:37:13.223270564 -0400
@@ -201,7 +201,6 @@ EXTRA_DIST += \
#
xetex_tests = \
xetexdir/xetex-filedump.test \
- xetexdir/xetex-bug73.test \
xetexdir/xetex.test
xetexdir/xetex-filedump.log xetexdir/xetex-bug73.log xetexdir/xetex.log: xetex$(EXEEXT)
diff -up texlive-base-20200327/source/texk/kpathsea/Makefile.am.dt texlive-base-20200327/source/texk/kpathsea/Makefile.am
--- texlive-base-20200327/source/texk/kpathsea/Makefile.am.dt 2020-04-20 15:49:39.282325550 -0400
+++ texlive-base-20200327/source/texk/kpathsea/Makefile.am 2020-04-20 15:49:51.475074045 -0400
@@ -275,7 +275,7 @@ uninstall-local:
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S;
AM_TESTS_ENVIRONMENT += LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfline.test tests/cnfnewline.test
+TESTS = tests/cnfnewline.test
TESTS += tests/cnfnull.test tests/cnfprog.test
TESTS += tests/kpseaccess.test
TESTS += tests/kpsereadlink.test tests/kpsestat.test tests/kpsewhich.test
diff -up texlive-base-20200327/source/texk/kpathsea/Makefile.in.dt texlive-base-20200327/source/texk/kpathsea/Makefile.in
--- texlive-base-20200327/source/texk/kpathsea/Makefile.in.dt 2020-04-21 10:17:29.766949867 -0400
+++ texlive-base-20200327/source/texk/kpathsea/Makefile.in 2020-04-21 10:17:36.926798780 -0400
@@ -858,7 +858,7 @@ dist_noinst_DATA = texmf.cnf
AM_TESTS_ENVIRONMENT = LN_S='$(LN_S)'; export LN_S; \
LT_OBJDIR='$(LT_OBJDIR)'; export LT_OBJDIR;
#
-TESTS = tests/cnfline.test tests/cnfnewline.test tests/cnfnull.test \
+TESTS = tests/cnfnewline.test tests/cnfnull.test \
tests/cnfprog.test tests/kpseaccess.test \
tests/kpsereadlink.test tests/kpsestat.test \
tests/kpsewhich.test

20
SOURCES/texlive-20200327-poppler-0.90.patch

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

578
SOURCES/texlive-20210325-new-poppler.patch

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

200
SOURCES/texlive-20210325-poppler-0.73.patch

@ -0,0 +1,200 @@ @@ -0,0 +1,200 @@
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

228
SOURCES/texlive-20210325-poppler-0.84.patch

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

22
SOURCES/texlive-20210325-texinfo-path-fix.patch

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
diff -up texlive-base-20210325/source/texk/kpathsea/texmf.cnf.texinfo-fix texlive-base-20210325/source/texk/kpathsea/texmf.cnf
--- texlive-base-20210325/source/texk/kpathsea/texmf.cnf.texinfo-fix 2021-05-06 17:53:44.616943275 -0400
+++ texlive-base-20210325/source/texk/kpathsea/texmf.cnf 2021-05-06 17:55:40.097662674 -0400
@@ -83,6 +83,9 @@ TEXMFSYSCONFIG = $TEXMFROOT/texmf-config
% to %USERPROFILE% on Windows, $HOME otherwise.
TEXMFHOME = ~/texmf
+% Texinfo on Fedora lives out of $TEXMFROOT
+TEXINFOHOME = $SELFAUTODIR/share/texmf
+
% TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
TEXMFVAR = ~/.texlive2021/texmf-var
@@ -108,7 +111,7 @@ TEXMFAUXTREES = {}
% The odd-looking $TEXMFAUXTREES$TEXMF... construct is so that if no auxtree is
% ever defined (the 99% common case), no extra elements will be added to
% the search paths. tlmgr takes care to end any value with a trailing comma.
-TEXMF = {$TEXMFAUXTREES$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}
+TEXMF = {$TEXMFAUXTREES$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,$TEXINFOHOME,!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}
% Where to look for, and where mktexlsr creates, ls-R files. By default,
% this is all and only the !! elements of TEXMF, so that mktexlsr does not

12
SOURCES/texlive-base-20180414-disable-omegafonts-check-test.patch

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

12
SOURCES/texlive-base-20200327-out-of-memory.patch

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
diff -up texlive-base-20200327/source/texk/kpathsea/texmf.cnf.me texlive-base-20200327/source/texk/kpathsea/texmf.cnf
--- texlive-base-20200327/source/texk/kpathsea/texmf.cnf.me 2020-09-23 09:35:26.729192291 +0200
+++ texlive-base-20200327/source/texk/kpathsea/texmf.cnf 2020-09-23 09:36:01.849651692 +0200
@@ -786,7 +786,7 @@ texmf_casefold_search = 1
% For some xy-pic samples, you may need as much as 700000 words of memory.
% For the vast majority of documents, 60000 or less will do.
%
-main_memory = 5000000 % words of inimemory available; also applies to inimf&mp
+main_memory = 6000000 % words of inimemory available; also applies to inimf&mp
extra_mem_top = 0 % extra high memory for chars, tokens, etc.
extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc.

159
SOURCES/texlive-base-20210325-configure-poppler-xpdf-fix.patch

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

168
SOURCES/texlive-base-20210325-mendex-weird-arch-fixes.patch

@ -0,0 +1,168 @@ @@ -0,0 +1,168 @@
diff -U0 texlive-base-20210325/source/texk/mendexk/ChangeLog.archfix texlive-base-20210325/source/texk/mendexk/ChangeLog
--- texlive-base-20210325/source/texk/mendexk/ChangeLog.archfix 2021-05-27 15:01:46.888501972 -0400
+++ texlive-base-20210325/source/texk/mendexk/ChangeLog 2021-05-27 15:02:10.669627643 -0400
@@ -0,0 +1,13 @@
+2021-05-09 Karl Berry <karl@freefriends.org>
+
+ * mendex.h (page.attr): use int, not char, since we do signed
+ comparison and aarch64 apparently treats char as unsigned.
+ (index.words): use unsigned char for consistency.
+ * fwrite.c (printpage): factor out beginning/end page values.
+ * tests/rangetwo.idx,
+ * tests/rangetwo.ind,
+ * tests/rangetwo.ist: new simple test.
+ * tests/mendex.test: run the rangetwo test.
+ Report from Johannes Hielscher,
+ https://tug.org/pipermail/tlbuild/2021q1/004873.html.
+
diff -up texlive-base-20210325/source/texk/mendexk/fwrite.c.archfix texlive-base-20210325/source/texk/mendexk/fwrite.c
--- texlive-base-20210325/source/texk/mendexk/fwrite.c.archfix 2021-05-27 15:02:37.867771347 -0400
+++ texlive-base-20210325/source/texk/mendexk/fwrite.c 2021-05-27 15:07:00.875160968 -0400
@@ -326,7 +326,11 @@ static void printpage(struct index *ind,
for(j=0;j<ind[num].num;j++) {
cc=range_check(ind[num],j,lbuff);
if (cc>j) {
- if (pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0])==pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])) {
+ int epage = pnumconv(ind[num].p[cc].page,
+ ind[num].p[cc].attr[0]);
+ int bpage = pnumconv(ind[num].p[j].page,
+ ind[num].p[j].attr[0]);
+ if (epage==bpage) {
j=cc-1;
continue;
}
@@ -337,20 +341,18 @@ static void printpage(struct index *ind,
if (strlen(ind[num].p[j].enc)>0) {
SPRINTF(buff,"%s%s%s",encap_prefix,ind[num].p[j].enc,encap_infix);
}
- if (strlen(suffix_3p)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))==2) {
- SAPPENDF(buff,"%s",ind[num].p[j].page);
+ /* print beginning of range */
+ SAPPENDF(buff,"%s",ind[num].p[j].page);
+ if (strlen(suffix_3p)>0 && (epage-bpage)==2) {
SAPPENDF(buff,"%s",suffix_3p);
}
- else if (strlen(suffix_mp)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))>=2) {
- SAPPENDF(buff,"%s",ind[num].p[j].page);
+ else if (strlen(suffix_mp)>0 && (epage-bpage)>=2) {
SAPPENDF(buff,"%s",suffix_mp);
}
- else if (strlen(suffix_2p)>0 && (pnumconv(ind[num].p[cc].page,ind[num].p[cc].attr[0])-pnumconv(ind[num].p[j].page,ind[num].p[j].attr[0]))==1) {
- SAPPENDF(buff,"%s",ind[num].p[j].page);
+ else if (strlen(suffix_2p)>0 && (epage-bpage)==1) {
SAPPENDF(buff,"%s",suffix_2p);
}
else {
- SAPPENDF(buff,"%s",ind[num].p[j].page);
SAPPENDF(buff,"%s",delim_r);
SAPPENDF(buff,"%s",ind[num].p[cc].page);
}
diff -up texlive-base-20210325/source/texk/mendexk/mendex.h.archfix texlive-base-20210325/source/texk/mendexk/mendex.h
--- texlive-base-20210325/source/texk/mendexk/mendex.h.archfix 2021-05-27 15:07:31.173321042 -0400
+++ texlive-base-20210325/source/texk/mendexk/mendex.h 2021-05-27 15:07:50.429422834 -0400
@@ -14,12 +14,12 @@
struct page {
char *page;
char *enc;
- char attr[3];
+ int attr[3];
};
struct index {
int num;
- char words;
+ unsigned char words;
char *org[3];
char *dic[3];
char *idx[3];
diff -up texlive-base-20210325/source/texk/mendexk/tests/mendex.test.archfix texlive-base-20210325/source/texk/mendexk/tests/mendex.test
--- texlive-base-20210325/source/texk/mendexk/tests/mendex.test.archfix 2021-05-27 15:08:12.848541283 -0400
+++ texlive-base-20210325/source/texk/mendexk/tests/mendex.test 2021-05-27 15:13:28.110189451 -0400
@@ -1,6 +1,6 @@
#! /bin/sh -vx
# $Id: mendex.test 58575 2021-03-21 08:54:52Z takuji $
-# Copyright 2017 Karl Berry <tex-live@tug.org>
+# Copyright 2017-2021 Karl Berry <tex-live@tug.org>
# Copyright 2013 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.
@@ -24,13 +24,21 @@ cat $srcdir/tests/uni.idx | \
>uni.ind2 2>uni.ilg2 \
&& diff $srcdir/tests/uni.ind uni.ind2 || exit 1
-# test for page_precedence
-./mendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx -o pprecA-0.ind1 -t pprecA-0.ilg \
+# test for two-element range suffix_2p
+./mendex -s $srcdir/tests/rangetwo.ist $srcdir/tests/rangetwo.idx \
+ -o rangetwo.ind1 -t rangetwo.ilg \
+ && diff $srcdir/tests/rangetwo.ind rangetwo.ind1 || exit 1
+
+# test for page_precedence and suffix_3p
+./mendex -s $srcdir/tests/pprec0.ist $srcdir/tests/pprecA.idx \
+ -o pprecA-0.ind1 -t pprecA-0.ilg \
&& diff $srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 1
-./mendex -s $srcdir/tests/pprec1.ist $srcdir/tests/pprecA.idx -o pprecA-1.ind1 -t pprecA-1.ilg \
+./mendex -s $srcdir/tests/pprec1.ist $srcdir/tests/pprecA.idx \
+ -o pprecA-1.ind1 -t pprecA-1.ilg \
&& diff $srcdir/tests/pprecA-1.ind pprecA-1.ind1 || exit 1
-./mendex -s $srcdir/tests/pprec2.ist $srcdir/tests/pprecA.idx -o pprecA-2.ind1 -t pprecA-2.ilg \
+./mendex -s $srcdir/tests/pprec2.ist $srcdir/tests/pprecA.idx \
+ -o pprecA-2.ind1 -t pprecA-2.ilg \
&& diff $srcdir/tests/pprecA-2.ind pprecA-2.ind1 || exit 1
diff -up texlive-base-20210325/source/texk/mendexk/tests/rangetwo.idx.archfix texlive-base-20210325/source/texk/mendexk/tests/rangetwo.idx
--- texlive-base-20210325/source/texk/mendexk/tests/rangetwo.idx.archfix 2021-05-27 15:14:09.048403077 -0400
+++ texlive-base-20210325/source/texk/mendexk/tests/rangetwo.idx 2021-05-27 15:14:03.416373688 -0400
@@ -0,0 +1,2 @@
+\indexentry{entryA}{1}
+\indexentry{entryA}{2}
diff -up texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ind.archfix texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ind
--- texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ind.archfix 2021-05-27 15:14:30.601515549 -0400
+++ texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ind 2021-05-27 15:14:59.970668807 -0400
@@ -0,0 +1,5 @@
+\begin{theindex}
+
+ \item entryA, 1[[sfx2p]]
+
+\end{theindex}
diff -up texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ist.archfix texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ist
--- texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ist.archfix 2021-05-27 15:15:24.712797920 -0400
+++ texlive-base-20210325/source/texk/mendexk/tests/rangetwo.ist 2021-05-27 15:15:51.412937250 -0400
@@ -0,0 +1,2 @@
+suffix_2p "[[sfx2p]]"
+
diff -U0 texlive-base-20210325/source/texk/upmendex/ChangeLog.archfix texlive-base-20210325/source/texk/upmendex/ChangeLog
--- texlive-base-20210325/source/texk/upmendex/ChangeLog.archfix 2021-05-27 14:58:11.836365567 -0400
+++ texlive-base-20210325/source/texk/upmendex/ChangeLog 2021-05-27 14:59:42.613845327 -0400
@@ -0,0 +1,11 @@
+2021-05-09 Karl Berry <karl@freefriends.org>
+ * mendex.h (page.attr): use int, not char, since we do signed
+ comparison and aarch64 apparently treats char as unsigned.
+ (index.words): use unsigned char for consistency.
+
+ Same fixes as for mendex; see mendexk/ChangeLog.
+ Report from Johannes Hielscher,
+ https://tug.org/pipermail/tlbuild/2021q1/004873.html
+ and follow-up:
+ https://tug.org/pipermail/tlbuild/2021q2/004911.html
+
diff -up texlive-base-20210325/source/texk/upmendex/mendex.h.archfix texlive-base-20210325/source/texk/upmendex/mendex.h
--- texlive-base-20210325/source/texk/upmendex/mendex.h.archfix 2021-05-27 14:59:52.774899013 -0400
+++ texlive-base-20210325/source/texk/upmendex/mendex.h 2021-05-27 15:01:33.381430577 -0400
@@ -14,12 +14,12 @@
struct page {
char *page;
char *enc;
- char attr[3];
+ int attr[3];
};
struct index {
int num;
- char words;
+ unsigned char words;
UChar *dic[3];
UChar *org[3];
UChar *idx[3];

10
SOURCES/texlive-base-20210325-no-setpdfwrite.patch

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
diff -up texlive-base-20210325/source/utils/asymptote/patches/dvipdf.no-setpdfwrite texlive-base-20210325/source/utils/asymptote/patches/dvipdf
--- texlive-base-20210325/source/utils/asymptote/patches/dvipdf.no-setpdfwrite 2021-06-21 10:05:10.392585479 -0400
+++ texlive-base-20210325/source/utils/asymptote/patches/dvipdf 2021-06-21 10:05:30.969698895 -0400
@@ -50,5 +50,5 @@ fi
# We have to include the options twice because -I only takes effect if it
# appears before other options.
-exec dvips $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c .setpdfwrite -
+exec dvips $DVIPSOPTIONS -q -f "$infile" | $GS_EXECUTABLE $OPTIONS -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sstdout=%stderr -sOutputFile="$outfile" $OPTIONS -c 3000000 setvmthreshold -

34
SOURCES/texlive-base-20210325-pdftoepdf-fix-crash.patch

@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
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);
}
}

49
SOURCES/texlive-base-20210325-poppler-22.01.0.patch

@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
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);

345510
SOURCES/texlive.tlpdb

File diff suppressed because it is too large Load Diff

51
SOURCES/tl-format.patch

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
diff -up texlive-base-20180414/source/texk/dvi2tty/dvi2tty-src/DVI.format texlive-base-20180414/source/texk/dvi2tty/dvi2tty-src/DVI
diff -up texlive-base-20180414/source/texk/dvidvi/dvidvi.c.format texlive-base-20180414/source/texk/dvidvi/dvidvi.c
--- texlive-base-20180414/source/texk/dvidvi/dvidvi.c.format 2017-06-23 10:55:46.000000000 -0400
+++ texlive-base-20180414/source/texk/dvidvi/dvidvi.c 2018-04-30 13:07:17.910020544 -0400
@@ -349,7 +349,7 @@ static void stringdvibuf(integer p, inte
* Print a usage error messsage, and quit.
*/
static void usage(void) {
- (void)fprintf(stderr,banner);
+ (void)fprintf(stderr,"%s",banner);
(void)fprintf(stderr,"Usage: dvidvi [options] input[.dvi] [output]\n");
(void)fprintf(stderr,"where options are:\n");
(void)fprintf(stderr," [-f n] first page printed [-l n] last page printed\n");
@@ -828,7 +828,7 @@ default:
} /* else argument with '-' */
} /* for */
if (*iname == 0) {
- (void)fprintf(stderr, banner) ;
+ (void)fprintf(stderr, "%s", banner) ;
error("! no input file specified");
}
/* Inserted by djc@dsmail.hmi.de 3.8.1994 */
@@ -839,7 +839,7 @@ default:
}
if (*oname != 0 && !quiet) {
- (void)fprintf(stderr, banner) ;
+ (void)fprintf(stderr, "%s", banner) ;
(void)fprintf(stderr, "%s -> %s\n",iname,oname);
temp = nextstring ;
}
diff -up texlive-base-20180414/source/texk/web2c/tiedir/tie.c.format texlive-base-20180414/source/texk/web2c/tiedir/tie.c
--- texlive-base-20180414/source/texk/web2c/tiedir/tie.c.format 2016-11-25 13:24:38.000000000 -0500
+++ texlive-base-20180414/source/texk/web2c/tiedir/tie.c 2018-04-30 13:07:27.792787747 -0400
@@ -27,14 +27,14 @@
\
#define term_out stdout
-#define print(a)fprintf(term_out,a)
+#define print(a)fprintf(term_out,"%s",a)
#define print2(a,b)fprintf(term_out,a,b)
#define print3(a,b,c)fprintf(term_out,a,b,c)
#define print_c(v)fputc(v,term_out);
#define new_line(v)fputc('\n',v)
#define term_new_line new_line(term_out) \
-#define print_ln(v){fprintf(term_out,v);term_new_line;} \
+#define print_ln(v){fprintf(term_out,"%s",v);term_new_line;} \
#define print2_ln(a,b){print2(a,b);term_new_line;}
#define print3_ln(a,b,c){print3(a,b,c);term_new_line;} \

12
SOURCES/tl-kpfix.patch

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
diff -up texlive-2013/source/texk/kpathsea/progname.c.kpfix texlive-2013/source/texk/kpathsea/progname.c
--- source/texk/kpathsea/progname.c.kpfix 2013-08-12 09:28:14.422522624 +0200
+++ source/texk/kpathsea/progname.c 2013-08-12 12:16:02.958132658 +0200
@@ -668,7 +668,7 @@ kpathsea_set_program_name (kpathsea kpse
kpathsea_xputenv (kpse, "SELFAUTOLOC", fix_selfdir (sdir));
sdir_parent = xdirname (sdir);
kpathsea_xputenv (kpse, "SELFAUTODIR", fix_selfdir (sdir_parent));
- sdir_grandparent = xdirname (sdir_parent);
+ sdir_grandparent = strdup("/usr/share/texlive");
kpathsea_xputenv (kpse, "SELFAUTOPARENT", fix_selfdir (sdir_grandparent));
sdir_greatgrandparent = xdirname (sdir_grandparent);
kpathsea_xputenv (kpse, "SELFAUTOGRANDPARENT", fix_selfdir (sdir_greatgrandparent));

9845
SPECS/texlive-base.spec

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save