texlive updates
Signed-off-by: tuibuilder_pel7x64builder0 <tuibuilder@powerel.org>master
parent
b54111dbc8
commit
72163b3f89
|
@ -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
|
|
@ -0,0 +1,284 @@
|
|||
diff -up doc/xelatex/xepersian/dkun-0.3.py.than doc/xelatex/xepersian/dkun-0.3.py
|
||||
--- doc/xelatex/xepersian/dkun-0.3.py.than 2018-05-07 11:52:01.795308478 +0200
|
||||
+++ doc/xelatex/xepersian/dkun-0.3.py 2018-05-07 11:53:32.984620222 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python3
|
||||
|
||||
#########################################
|
||||
# General Public License #
|
||||
@@ -311,7 +311,7 @@ def dk_adjust_shaping(text, i):
|
||||
try:
|
||||
u = table_DK_UN[current][0]
|
||||
except KeyError:
|
||||
- print 'ERROR: unmapped character'
|
||||
+ print('ERROR: unmapped character')
|
||||
return u''
|
||||
|
||||
#if you don't want shaping remove the following comment
|
||||
@@ -407,7 +407,7 @@ def needs_english_wrapper(part):
|
||||
|
||||
# Main body of the program
|
||||
if len(sys.argv) <= 2:
|
||||
- print 'usage: python dkun in_filename out_filename'
|
||||
+ print('usage: python dkun in_filename out_filename')
|
||||
exit(0)
|
||||
|
||||
filename = sys.argv[1]
|
||||
@@ -416,13 +416,13 @@ outfile = sys.argv[2]
|
||||
try:
|
||||
f = open(filename, 'r')
|
||||
except IOError:
|
||||
- print "Can not open the input file: " + filename
|
||||
+ print("Can not open the input file: " + filename)
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
of = codecs.open(outfile, encoding='utf-8', mode='w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + outfile
|
||||
+ print("Can not open the output file: " + outfile)
|
||||
exit(0)
|
||||
|
||||
line_number = 0
|
||||
diff -up doc/xelatex/xepersian/dkun-0.4.py.than doc/xelatex/xepersian/dkun-0.4.py
|
||||
--- doc/xelatex/xepersian/dkun-0.4.py.than 2018-05-07 11:53:54.187692708 +0200
|
||||
+++ doc/xelatex/xepersian/dkun-0.4.py 2018-05-07 11:54:32.272822907 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python3
|
||||
|
||||
#########################################
|
||||
# General Public License #
|
||||
@@ -311,7 +311,7 @@ def dk_adjust_shaping(text, i):
|
||||
try:
|
||||
u = table_DK_UN[current][0]
|
||||
except KeyError:
|
||||
- print 'ERROR: unmapped character'
|
||||
+ print('ERROR: unmapped character')
|
||||
return u''
|
||||
|
||||
#if you don't want shaping remove the following comment
|
||||
@@ -407,7 +407,7 @@ def needs_english_wrapper(part):
|
||||
|
||||
# Main body of the program
|
||||
if len(sys.argv) <= 2:
|
||||
- print 'usage: python dkun in_filename out_filename'
|
||||
+ print('usage: python dkun in_filename out_filename')
|
||||
exit(0)
|
||||
|
||||
filename = sys.argv[1]
|
||||
@@ -416,13 +416,13 @@ outfile = sys.argv[2]
|
||||
try:
|
||||
f = open(filename, 'r')
|
||||
except IOError:
|
||||
- print "Can not open the input file: " + filename
|
||||
+ print("Can not open the input file: " + filename)
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
of = codecs.open(outfile, encoding='utf-8', mode='w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + outfile
|
||||
+ print("Can not open the output file: " + outfile)
|
||||
exit(0)
|
||||
|
||||
line_number = 0
|
||||
diff -up doc/xelatex/xepersian/ftxe-0.12.py.than doc/xelatex/xepersian/ftxe-0.12.py
|
||||
--- doc/xelatex/xepersian/ftxe-0.12.py.than 2018-05-07 11:54:55.163901164 +0200
|
||||
+++ doc/xelatex/xepersian/ftxe-0.12.py 2018-05-07 11:57:58.063526433 +0200
|
||||
@@ -1,4 +1,6 @@
|
||||
-# This program is free software: you can redistribute it and/or modify
|
||||
+#! /usr/bin/python3
|
||||
+
|
||||
+# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
@@ -488,7 +490,7 @@ def read_size(input,index,last_index):
|
||||
dim_index = pt_index
|
||||
next_cmd = input.find(u'\\', index)
|
||||
if (next_cmd == -1 and dim_index == -1):
|
||||
- print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
|
||||
+ print("Error in parsing \epsfxsize command at " + str(line_number) + "\n")
|
||||
return -1
|
||||
elif (next_cmd == -1 or (dim_index != -1 and next_cmd > dim_index)):
|
||||
epsfxsize = input[index:dim_index+2]
|
||||
@@ -499,7 +501,7 @@ def read_size(input,index,last_index):
|
||||
end_cmd += 1
|
||||
return end_cmd
|
||||
else:
|
||||
- print "Error in parsing \epsfxsize command at " + str(line_number) + "\n"
|
||||
+ print("Error in parsing \epsfxsize command at " + str(line_number) + "\n")
|
||||
return -1
|
||||
|
||||
|
||||
@@ -567,7 +569,7 @@ def generate_farsitex_cmds_file(helper_f
|
||||
try:
|
||||
of = codecs.open(helper_filename, encoding='utf-8', mode='w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + helper_filename
|
||||
+ print("Can not open the output file: " + helper_filename)
|
||||
exit(0)
|
||||
of.write(preamble)
|
||||
of.close
|
||||
@@ -875,7 +877,7 @@ def convert_file(f, of, convert_cmds):
|
||||
|
||||
for line in f:
|
||||
line_number += 1
|
||||
- print line_number,
|
||||
+ print (line_number)
|
||||
output_line = u''
|
||||
line_len = len(line)
|
||||
|
||||
@@ -888,7 +890,7 @@ def convert_file(f, of, convert_cmds):
|
||||
# check line-direction character
|
||||
line_direction_rtl = (line[0] == '<')
|
||||
if (line[0] != '>') and (line[0] != '<'):
|
||||
- print "FORMAT ERROR AT LINE: " + str(line_number)
|
||||
+ print("FORMAT ERROR AT LINE: " + str(line_number))
|
||||
exit(0)
|
||||
|
||||
i = 1
|
||||
@@ -970,11 +972,11 @@ def convert_file(f, of, convert_cmds):
|
||||
# end of file processing
|
||||
|
||||
def print_usage():
|
||||
- print 'usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2'
|
||||
- print '-r: (DEFAULT) recursively consider files included in the given files'
|
||||
- print '-s: do not recursively consider files'
|
||||
- print '-x: (DEFAULT) insert xepersian related commands'
|
||||
- print '-u: only convert to unicode'
|
||||
+ print('usage: python ftxe-0-11 [-r] [-s] [-x] [-u] in_filename1 in_filename2')
|
||||
+ print('-r: (DEFAULT) recursively consider files included in the given files')
|
||||
+ print('-s: do not recursively consider files')
|
||||
+ print('-x: (DEFAULT) insert xepersian related commands')
|
||||
+ print('-u: only convert to unicode')
|
||||
|
||||
###################################
|
||||
# Begin of main body of the program
|
||||
@@ -1011,7 +1013,7 @@ while (options_index < len(sys.argv)):
|
||||
options_index += 1
|
||||
|
||||
if (len(filenames) == 0):
|
||||
- print 'error: no input filename is specified!'
|
||||
+ print('error: no input filename is specified!')
|
||||
print_usage()
|
||||
exit(0)
|
||||
|
||||
@@ -1026,17 +1028,17 @@ while (index < len(filenames)):
|
||||
else:
|
||||
outfile = filename + '.tex'
|
||||
|
||||
- print '\n\nConverting "' + filename + '" into "' + outfile + '"'
|
||||
+ print('\n\nConverting "' + filename + '" into "' + outfile + '"')
|
||||
try:
|
||||
f = open(filename, 'r')
|
||||
except IOError:
|
||||
- print "Can not open the input file: " + filename
|
||||
+ print("Can not open the input file: " + filename)
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
of = codecs.open(outfile, encoding='utf-8', mode='w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + outfile
|
||||
+ print("Can not open the output file: " + outfile)
|
||||
exit(0)
|
||||
|
||||
convert_file(f, of, convert_xepersian)
|
||||
diff -up doc/xelatex/xepersian/undk-0.6.py.than doc/xelatex/xepersian/undk-0.6.py
|
||||
--- doc/xelatex/xepersian/undk-0.6.py.than 2018-05-07 11:58:18.706597005 +0200
|
||||
+++ doc/xelatex/xepersian/undk-0.6.py 2018-05-07 11:59:18.079799981 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python3
|
||||
#########################################
|
||||
# General Public License #
|
||||
# Author: Mostafa Vahedi #
|
||||
@@ -328,7 +328,7 @@ def find_form(line, i):
|
||||
def map_char_unicode_DK(c, form):
|
||||
try:
|
||||
n = table_UN_DK[c][0]
|
||||
- except KeyError:
|
||||
+ except KeyError:
|
||||
return c.encode('latin-1')
|
||||
if (n == 1):
|
||||
return table_UN_DK[c][1]
|
||||
@@ -371,7 +371,7 @@ def is_farsi_numerical(c):
|
||||
|
||||
# Main body of the program
|
||||
if len(sys.argv) <= 2:
|
||||
- print 'usage: python undk in_filename out_filename'
|
||||
+ print('usage: python undk in_filename out_filename')
|
||||
exit(0)
|
||||
|
||||
filename = sys.argv[1]
|
||||
@@ -380,13 +380,13 @@ outfile = sys.argv[2]
|
||||
try:
|
||||
f = codecs.open(filename, 'r', 'utf-8')
|
||||
except IOError:
|
||||
- print "Can not open the input file: " + filename
|
||||
+ print("Can not open the input file: " + filename)
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
of = open(outfile, 'w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + outfile
|
||||
+ print("Can not open the output file: " + outfile)
|
||||
exit(0)
|
||||
|
||||
# this is an option
|
||||
@@ -425,7 +425,7 @@ for line in f:
|
||||
this_line += auto_english_part[::-1]
|
||||
auto_english_part = ''
|
||||
inAutoEnglish = 0
|
||||
- print 'Warning: mixed Auto-English and Forced-English'
|
||||
+ print('Warning: mixed Auto-English and Forced-English')
|
||||
if (inFarsiNumber == 1):
|
||||
this_line += number_part[::-1]
|
||||
number_part = ''
|
||||
diff -up doc/xelatex/xepersian/unldk-0.2.py.than doc/xelatex/xepersian/unldk-0.2.py
|
||||
--- doc/xelatex/xepersian/unldk-0.2.py.than 2018-05-07 11:59:41.522880125 +0200
|
||||
+++ doc/xelatex/xepersian/unldk-0.2.py 2018-05-07 12:00:21.999018500 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/env python
|
||||
+#! /usr/bin/python3
|
||||
#########################################
|
||||
# General Public License #
|
||||
# Author: Mostafa Vahedi #
|
||||
@@ -328,7 +328,7 @@ def find_form(line, i):
|
||||
def map_char_unicode_DK(c, form):
|
||||
try:
|
||||
n = table_UN_DK[c][0]
|
||||
- except KeyError:
|
||||
+ except KeyError:
|
||||
return c.encode('latin-1')
|
||||
if (n == 1):
|
||||
return table_UN_DK[c][1]
|
||||
@@ -364,7 +364,7 @@ def is_farsi_numerical(c):
|
||||
|
||||
# Main body of the program
|
||||
if len(sys.argv) <= 2:
|
||||
- print 'usage: python unldk in_filename out_filename'
|
||||
+ print('usage: python unldk in_filename out_filename')
|
||||
exit(0)
|
||||
|
||||
filename = sys.argv[1]
|
||||
@@ -373,13 +373,13 @@ outfile = sys.argv[2]
|
||||
try:
|
||||
f = codecs.open(filename, 'r', 'utf-8')
|
||||
except IOError:
|
||||
- print "Can not open the input file: " + filename
|
||||
+ print("Can not open the input file: " + filename)
|
||||
exit(0)
|
||||
|
||||
try:
|
||||
of = open(outfile, 'w')
|
||||
except IOError:
|
||||
- print "Can not open the output file: " + outfile
|
||||
+ print("Can not open the output file: " + outfile)
|
||||
exit(0)
|
||||
|
||||
inFarsi = 0
|
|
@ -0,0 +1,40 @@
|
|||
diff -up texlive-20180414/source/texk/dvipsk/writet1.c.CVE-2018-17407 texlive-20180414/source/texk/dvipsk/writet1.c
|
||||
--- texlive-20180414/source/texk/dvipsk/writet1.c.CVE-2018-17407 2018-09-26 08:37:29.964110003 +0100
|
||||
+++ texlive-20180414/source/texk/dvipsk/writet1.c 2018-09-26 08:38:06.454784619 +0100
|
||||
@@ -1449,7 +1449,9 @@ static void t1_check_unusual_charstring(
|
||||
*(strend(t1_buf_array) - 1) = ' ';
|
||||
|
||||
t1_getline();
|
||||
+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
strcat(t1_buf_array, t1_line_array);
|
||||
+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
strcpy(t1_line_array, t1_buf_array);
|
||||
t1_line_ptr = eol(t1_line_array);
|
||||
}
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w.CVE-2018-17407 texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w.CVE-2018-17407 2018-09-26 08:34:35.340880599 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/writet1.w 2018-09-26 08:35:45.992187544 +0100
|
||||
@@ -1624,8 +1624,10 @@ static void t1_check_unusual_charstring(
|
||||
/* if no number follows "/CharStrings", let's read the next line */
|
||||
if (sscanf(p, "%i", &i) != 1) {
|
||||
strcpy(t1_buf_array, t1_line_array);
|
||||
+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
t1_getline();
|
||||
strcat(t1_buf_array, t1_line_array);
|
||||
+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
strcpy(t1_line_array, t1_buf_array);
|
||||
t1_line_ptr = eol(t1_line_array);
|
||||
}
|
||||
diff -up texlive-20180414/source/texk/web2c/pdftexdir/writet1.c.CVE-2018-17407 texlive-20180414/source/texk/web2c/pdftexdir/writet1.c
|
||||
--- texlive-20180414/source/texk/web2c/pdftexdir/writet1.c.CVE-2018-17407 2018-09-26 08:36:06.382564736 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/pdftexdir/writet1.c 2018-09-26 08:37:12.213781850 +0100
|
||||
@@ -1598,7 +1598,9 @@ static void t1_check_unusual_charstring(
|
||||
*(strend(t1_buf_array) - 1) = ' ';
|
||||
|
||||
t1_getline();
|
||||
+ alloc_array(t1_buf, strlen(t1_line_array) + strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
strcat(t1_buf_array, t1_line_array);
|
||||
+ alloc_array(t1_line, strlen(t1_buf_array) + 1, T1_BUF_SIZE);
|
||||
strcpy(t1_line_array, t1_buf_array);
|
||||
t1_line_ptr = eol(t1_line_array);
|
||||
}
|
|
@ -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)
|
|
@ -0,0 +1,812 @@
|
|||
diff -up texlive-20180414/source/libs/luajit/LuaJIT-src/src/host/minilua.c.me texlive-20180414/source/libs/luajit/LuaJIT-src/src/host/minilua.c
|
||||
--- texlive-20180414/source/libs/luajit/LuaJIT-src/src/host/minilua.c.me 2018-08-14 10:08:29.573912544 +0100
|
||||
+++ texlive-20180414/source/libs/luajit/LuaJIT-src/src/host/minilua.c 2018-09-24 09:18:24.640331882 +0100
|
||||
@@ -4327,7 +4327,7 @@ if(lh->v.u.s.info==v->u.s.info){
|
||||
conflict=1;
|
||||
lh->v.u.s.info=extra;
|
||||
}
|
||||
-if(lh->v.u.s.aux==v->u.s.info){
|
||||
+if(lh->v.u.s.aux==v->u.s.aux){
|
||||
conflict=1;
|
||||
lh->v.u.s.aux=extra;
|
||||
}
|
||||
diff -up texlive-20180414/source/libs/zziplib/zziplib-src/docs/make-doc.py.me texlive-20180414/source/libs/zziplib/zziplib-src/docs/make-doc.py
|
||||
--- texlive-20180414/source/libs/zziplib/zziplib-src/docs/make-doc.py.me 2018-08-14 10:34:45.827143276 +0100
|
||||
+++ texlive-20180414/source/libs/zziplib/zziplib-src/docs/make-doc.py 2018-08-14 10:35:09.287578374 +0100
|
||||
@@ -951,7 +951,7 @@ def docbook_refpages_perheader(page_list
|
||||
header[file].copyright = page.copyright
|
||||
if not header[file].authors and page.authors:
|
||||
header[file].authors = page.authors
|
||||
- if not header[file].authors and page.authors_list:
|
||||
+ if not header[file].authors_list and page.authors_list:
|
||||
header[file].authors_list = page.authors_list
|
||||
if not header[file].description:
|
||||
found = m(commands.getoutput("cat "+o.package+".spec"),
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/cid.c.me texlive-20180414/source/texk/dvipdfm-x/cid.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/cid.c.me 2018-08-14 14:23:43.959754741 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/cid.c 2018-09-24 10:52:23.863792313 +0100
|
||||
@@ -636,6 +636,7 @@ CIDFont_cache_find (const char *map_name
|
||||
CIDFONT_FLAG_TYPE1C) < 0 &&
|
||||
CIDFont_base_open (font, map_name, cmap_csi, opt) < 0) {
|
||||
CIDFont_release(font);
|
||||
+ RELEASE(font);
|
||||
release_opt(opt);
|
||||
return -1;
|
||||
} else {
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/dvi.c.me texlive-20180414/source/texk/dvipdfm-x/dvi.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/dvi.c.me 2018-08-14 14:31:53.138750339 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/dvi.c 2018-08-14 14:41:37.729500250 +0100
|
||||
@@ -1001,8 +1001,11 @@ dvi_locate_native_font (const char *file
|
||||
char *enc_vec[256];
|
||||
|
||||
fp = DPXFOPEN(filename, DPX_RES_TYPE_T1FONT);
|
||||
- if (!fp)
|
||||
+ if (!fp) {
|
||||
+ if (path)
|
||||
+ free(path);
|
||||
return -1;
|
||||
+ }
|
||||
|
||||
if (!is_pfb(fp))
|
||||
ERROR("Failed to read Type 1 font \"%s\".", filename);
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/fontmap.c.me texlive-20180414/source/texk/dvipdfm-x/fontmap.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/fontmap.c.me 2018-09-24 12:45:22.068268381 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/fontmap.c 2018-09-24 12:45:13.508111517 +0100
|
||||
@@ -849,8 +849,8 @@ pdf_insert_fontmap_record (const char *k
|
||||
subfont_ids = sfd_get_subfont_ids(sfd_name, &n);
|
||||
if (!subfont_ids) {
|
||||
RELEASE(fnt_name);
|
||||
- RELEASE(sfd_name);
|
||||
WARN("Could not open SFD file: %s", sfd_name);
|
||||
+ RELEASE(sfd_name);
|
||||
return NULL;
|
||||
}
|
||||
if (verbose > 3)
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/otl_conf.c.me texlive-20180414/source/texk/dvipdfm-x/otl_conf.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/otl_conf.c.me 2018-09-24 12:55:36.589529234 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/otl_conf.c 2018-09-24 12:55:27.339359728 +0100
|
||||
@@ -83,6 +83,7 @@ parse_uc_coverage (pdf_obj *gclass, cons
|
||||
pdf_add_array(coverage,
|
||||
pdf_link_obj(pdf_get_array(cvalues, i)));
|
||||
}
|
||||
+ RELEASE(glyphclass);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/otl_opt.c.me texlive-20180414/source/texk/dvipdfm-x/otl_opt.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/otl_opt.c.me 2018-09-24 13:00:10.034538046 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/otl_opt.c 2018-09-24 13:13:31.949224947 +0100
|
||||
@@ -134,6 +134,7 @@ parse_expr (const char **pp, const char
|
||||
expr = parse_expr(pp, endptr);
|
||||
if (!expr) {
|
||||
WARN("Syntax error: %s\n", *pp);
|
||||
+ bt_release_tree(root);
|
||||
return NULL;
|
||||
}
|
||||
if (**pp != ')') {
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/pdfdoc.c.me texlive-20180414/source/texk/dvipdfm-x/pdfdoc.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/pdfdoc.c.me 2018-09-24 13:04:07.928895033 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/pdfdoc.c 2018-09-24 13:04:39.329470128 +0100
|
||||
@@ -825,7 +825,7 @@ pdf_doc_close_page_tree (pdf_doc *p)
|
||||
pdf_page *page;
|
||||
|
||||
page = doc_get_page_entry(p, page_no);
|
||||
- if (page->page_obj) {
|
||||
+ if (page->page_ref) {
|
||||
WARN("Nonexistent page #%ld refered.", page_no);
|
||||
pdf_release_obj(page->page_ref);
|
||||
page->page_ref = NULL;
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/pdfencrypt.c.me texlive-20180414/source/texk/dvipdfm-x/pdfencrypt.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/pdfencrypt.c.me 2018-09-24 13:05:05.679952732 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/pdfencrypt.c 2018-09-24 13:10:25.655813021 +0100
|
||||
@@ -616,7 +616,7 @@ pdf_enc_set_passwd (unsigned int bits, u
|
||||
}
|
||||
if (uplain) {
|
||||
if (preproc_password(uplain, upasswd, p->V) < 0)
|
||||
- WARN("Invalid UTF-8 string for passowrd.");
|
||||
+ WARN("Invalid UTF-8 string for password.");
|
||||
} else {
|
||||
while (1) {
|
||||
strncpy(input, getpass("User password: "), MAX_PWD_LEN);
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/pdfobj.c.me texlive-20180414/source/texk/dvipdfm-x/pdfobj.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/pdfobj.c.me 2018-09-24 13:12:23.727975488 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/pdfobj.c 2018-09-24 13:12:43.988346552 +0100
|
||||
@@ -1862,8 +1862,9 @@ apply_filter_TIFF2_1_2_4 (unsigned char
|
||||
}
|
||||
}
|
||||
}
|
||||
- if (outbits > 0)
|
||||
+ if (outbits > 0) {
|
||||
raster[k] = (outbuf << (8 - outbits)); k++;
|
||||
+ }
|
||||
}
|
||||
RELEASE(prev);
|
||||
}
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/pkfont.c.me texlive-20180414/source/texk/dvipdfm-x/pkfont.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/pkfont.c.me 2018-09-24 13:14:24.490187294 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/pkfont.c 2018-09-24 13:17:33.873656807 +0100
|
||||
@@ -329,6 +329,7 @@ pk_decode_bitmap (pdf_obj *stream, uint3
|
||||
}
|
||||
}
|
||||
|
||||
+ free(rowptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/spc_dvips.c.me texlive-20180414/source/texk/dvipdfm-x/spc_dvips.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/spc_dvips.c.me 2018-09-24 13:20:43.777135845 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/spc_dvips.c 2018-09-24 13:45:28.104313939 +0100
|
||||
@@ -402,6 +402,7 @@ spc_handler_ps_tricks_bput (struct spc_e
|
||||
temporary_defs = dpx_create_temp_file();
|
||||
if (!temporary_defs) {
|
||||
WARN("Failed to create temporary input file for PSTricks image conversion.");
|
||||
+ free(formula);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -455,7 +456,7 @@ spc_handler_ps_tricks_brotate (struct sp
|
||||
if (calculate_PS(cmd, strlen(cmd), &value, 0, 0, 0, 0, 0) != 0)
|
||||
return -1;
|
||||
RAngles[RAngleCount] = value;
|
||||
-
|
||||
+ free(cmd);
|
||||
return spc_handler_xtx_do_transform (spe->x_user, spe->y_user,
|
||||
cos(value * M_PI / 180), sin(value * M_PI / 180),
|
||||
-sin(value * M_PI / 180), cos(value * M_PI / 180),
|
||||
@@ -491,12 +492,17 @@ spc_handler_ps_tricks_transform (struct
|
||||
concat[strlen(post)] = 0;
|
||||
concat = strstr(cmd, "{");
|
||||
*concat = ' ';
|
||||
- if (calculate_PS(cmd, strlen(cmd), &d1, &d2, &d3, &d4, &d5, &d6) != 0)
|
||||
+ if (calculate_PS(cmd, strlen(cmd), &d1, &d2, &d3, &d4, &d5, &d6) != 0) {
|
||||
+ free(cmd);
|
||||
return -1;
|
||||
- if (spc_handler_xtx_gsave (0, 0) != 0)
|
||||
+ }
|
||||
+ if (spc_handler_xtx_gsave (0, 0) != 0) {
|
||||
+ free(cmd);
|
||||
return -1;
|
||||
+ }
|
||||
return spc_handler_xtx_do_transform (spe->x_user, spe->y_user, d1, d2, d3, d4, d5, d6);
|
||||
}
|
||||
+ free(cmd);
|
||||
return spc_handler_xtx_grestore (0, 0);
|
||||
}
|
||||
|
||||
@@ -570,7 +576,8 @@ spc_handler_ps_tricks_parse_path (struct
|
||||
fwrite(args->curptr, 1, clip - args->curptr, fp);
|
||||
fprintf(fp, " stroke ");
|
||||
skip_white(&clip, args->endptr);
|
||||
- parse_ident(&clip, args->endptr);
|
||||
+ char *token = parse_ident(&clip, args->endptr);
|
||||
+ free(token);
|
||||
fwrite(clip, 1, args->endptr - clip, fp);
|
||||
}
|
||||
#endif
|
||||
@@ -610,7 +617,9 @@ spc_handler_ps_tricks_parse_path (struct
|
||||
if (error) {
|
||||
WARN("Image format conversion for PSTricks failed.");
|
||||
RELEASE(gs_in);
|
||||
+ RELEASE(gs_out);
|
||||
gs_in = 0;
|
||||
+ gs_out = 0;
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -706,6 +715,7 @@ spc_handler_ps_tricks_render (struct spc
|
||||
WARN("Image format conversion for PSTricks failed.");
|
||||
RELEASE(gs_in);
|
||||
gs_in = 0;
|
||||
+ RELEASE(gs_out);
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -1074,9 +1084,10 @@ int calculate_PS (char *string, int leng
|
||||
fscanf(coord, " %lf %lf ", res1, res2);
|
||||
else
|
||||
fscanf(coord, " [%lf %lf %lf %lf %lf %lf] ", res1, res2, res3, res4, res5, res6);
|
||||
- } else
|
||||
+ } else {
|
||||
+ RELEASE(cmd);
|
||||
return -1;
|
||||
-
|
||||
+ }
|
||||
pclose(coord);
|
||||
RELEASE(cmd);
|
||||
dpx_delete_temp_file(formula, true);
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/spc_util.c.me texlive-20180414/source/texk/dvipdfm-x/spc_util.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/spc_util.c.me 2018-09-24 13:50:50.730216569 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/spc_util.c 2018-09-24 13:54:23.844113385 +0100
|
||||
@@ -149,6 +149,7 @@ spc_read_color_color (struct spc_env *sp
|
||||
char *color_name = parse_c_ident(&ap->curptr, ap->endptr);
|
||||
if (!color_name) {
|
||||
spc_warn(spe, "No valid spot color name specified?");
|
||||
+ RELEASE(q);
|
||||
return -1;
|
||||
}
|
||||
skip_blank(&ap->curptr, ap->endptr);
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/t1_load.c.me texlive-20180414/source/texk/dvipdfm-x/t1_load.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/t1_load.c.me 2018-09-24 13:55:59.085854887 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/t1_load.c 2018-09-24 13:58:52.979034543 +0100
|
||||
@@ -632,6 +632,9 @@ parse_subrs (cff_font *font,
|
||||
if (!PST_INTEGERTYPE(tok) || pst_getIV(tok) < 0 ||
|
||||
pst_getIV(tok) > CS_STR_LEN_MAX) {
|
||||
RELEASE_TOK(tok);
|
||||
+ if (offsets) RELEASE(offsets);
|
||||
+ if (data) RELEASE(data);
|
||||
+ if (lengths) RELEASE(lengths);
|
||||
return -1;
|
||||
}
|
||||
len = pst_getIV(tok);
|
||||
diff -up texlive-20180414/source/texk/dvipdfm-x/tt_cmap.c.me texlive-20180414/source/texk/dvipdfm-x/tt_cmap.c
|
||||
--- texlive-20180414/source/texk/dvipdfm-x/tt_cmap.c.me 2018-09-24 14:03:33.954172208 +0100
|
||||
+++ texlive-20180414/source/texk/dvipdfm-x/tt_cmap.c 2018-09-24 14:07:07.738081269 +0100
|
||||
@@ -1237,6 +1237,7 @@ otf_create_ToUnicode_stream (const char
|
||||
res_id = pdf_findresource("CMap", cmap_name);
|
||||
if (res_id >= 0) {
|
||||
RELEASE(cmap_name);
|
||||
+ RELEASE(normalized_font_name);
|
||||
cmap_ref = pdf_get_resource_reference(res_id);
|
||||
return cmap_ref;
|
||||
}
|
||||
@@ -1254,6 +1255,7 @@ otf_create_ToUnicode_stream (const char
|
||||
sfont = dfont_open(fp, ttc_index);
|
||||
} else {
|
||||
RELEASE(cmap_name);
|
||||
+ RELEASE(normalized_font_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff -up texlive-20180414/source/texk/dvipng/dvipng-src/font.c.me texlive-20180414/source/texk/dvipng/dvipng-src/font.c
|
||||
diff -up texlive-20180414/source/texk/dvipng/dvipng-src/misc.c.me texlive-20180414/source/texk/dvipng/dvipng-src/misc.c
|
||||
diff -up texlive-20180414/source/texk/dvipng/dvipng-src/sfd.c.me texlive-20180414/source/texk/dvipng/dvipng-src/sfd.c
|
||||
--- texlive-20180414/source/texk/dvipng/dvipng-src/sfd.c.me 2018-09-24 14:25:21.188076748 +0100
|
||||
+++ texlive-20180414/source/texk/dvipng/dvipng-src/sfd.c 2018-09-24 14:28:14.741252282 +0100
|
||||
@@ -139,8 +139,10 @@ struct psfontmap* FindSubFont(struct psf
|
||||
sfdname[postfix-sfdspec]='\0';
|
||||
/* Check postfix */
|
||||
postfix++;
|
||||
- if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0)
|
||||
+ if (strcmp(sfdwant+strlen(sfdwant)-strlen(postfix),postfix)!=0) {
|
||||
+ free(sfdname);
|
||||
return(NULL);
|
||||
+ }
|
||||
/* Extract infix */
|
||||
if ((infix=malloc(strlen(sfdwant)-strlen(postfix)+1))==NULL)
|
||||
Fatal("cannot allocate memory for subfont infix");
|
||||
diff -up texlive-20180414/source/texk/dvipos/dvipos.c.me texlive-20180414/source/texk/dvipos/dvipos.c
|
||||
--- texlive-20180414/source/texk/dvipos/dvipos.c.me 2018-09-24 14:28:22.821400126 +0100
|
||||
+++ texlive-20180414/source/texk/dvipos/dvipos.c 2018-09-24 14:33:37.367155421 +0100
|
||||
@@ -246,7 +246,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (infname) free(infname);
|
||||
if (outfname) free(outfname);
|
||||
- if (bbxfname) free(frmfname);
|
||||
+ if (bbxfname) free(bbxfname);
|
||||
if (frmfname) free(frmfname);
|
||||
|
||||
if (outfp) fclose(outfp);
|
||||
diff -up texlive-20180414/source/texk/dvipsk/dospecial.c.me texlive-20180414/source/texk/dvipsk/dospecial.c
|
||||
diff -up texlive-20180414/source/texk/dvipsk/emspecial.c.me texlive-20180414/source/texk/dvipsk/emspecial.c
|
||||
--- texlive-20180414/source/texk/dvipsk/emspecial.c.me 2018-09-24 15:01:40.267917277 +0100
|
||||
+++ texlive-20180414/source/texk/dvipsk/emspecial.c 2018-09-24 15:20:25.108474385 +0100
|
||||
@@ -811,8 +813,10 @@ MSP_2_ps(FILE *f, int wide, int high)
|
||||
linelen = (halfword *) mymalloc((integer)sizeof(halfword) * high);
|
||||
for (i = 0; i < high; i++) {
|
||||
linelen[i] = readhalfword(f);
|
||||
- if (feof(f))
|
||||
+ if (feof(f)) {
|
||||
+ free(linelen);
|
||||
return;
|
||||
+ }
|
||||
}
|
||||
|
||||
line = (char *) mymalloc((integer)tobyte(wide));
|
||||
@@ -1308,6 +1312,8 @@ bmpgraph(FILE *f, char *filename, float
|
||||
default:
|
||||
sprintf(errbuf,"em:graph: Unknown BMP compression\n");
|
||||
specerror(errbuf);
|
||||
+ if (line) free(line);
|
||||
+ if (pshexa) free(pshexa);
|
||||
return;
|
||||
}
|
||||
|
||||
--- texlive-20180414/source/texk/dvipsk/t1part.c.me 2018-09-24 15:47:04.767750977 +0100
|
||||
+++ texlive-20180414/source/texk/dvipsk/t1part.c 2018-09-24 16:02:33.294747092 +0100
|
||||
@@ -2458,6 +2458,7 @@ Afm(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ fclose(fafm);
|
||||
return -2;
|
||||
}
|
||||
|
||||
@@ -2526,6 +2527,7 @@ FontPart(FILE *fout, unsigned char *font
|
||||
NameOfProgram();
|
||||
(void) fprintf(stderr,
|
||||
"Error: %s is not a valid PFA file\n", fontfile);
|
||||
+ fclose(fin);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2543,6 +2545,7 @@ FontPart(FILE *fout, unsigned char *font
|
||||
NameOfProgram();
|
||||
(void) fprintf(stderr,
|
||||
"Error: %s is not a valid PFB file\n", fontfile);
|
||||
+ fclose(fin);
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
@@ -2677,6 +2680,7 @@ LoadVector(int num, CHAR *TmpChar)
|
||||
}
|
||||
else
|
||||
{
|
||||
+ fclose(fvect);
|
||||
fprintf(stderr,"\n Error: ending token 'def' not found in <%s> \n",
|
||||
psvectfile);
|
||||
return -2;
|
||||
diff -up texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/splineorder2.c.me texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/splineorder2.c
|
||||
--- texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/splineorder2.c.me 2018-09-25 08:19:26.742304540 +0100
|
||||
+++ texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/splineorder2.c 2018-09-25 08:20:04.753003584 +0100
|
||||
@@ -1289,9 +1289,9 @@ return;
|
||||
unit.x = from->nextcp.x-from->me.x;
|
||||
unit.y = from->nextcp.y-from->me.y;
|
||||
len = sqrt(unit.x*unit.x + unit.y*unit.y);
|
||||
- if ( len!=0 )
|
||||
+ if ( len!=0 ) {
|
||||
unit.x /= len; unit.y /= len;
|
||||
-
|
||||
+ }
|
||||
if ( (fpt = from->pointtype)==pt_hvcurve ) fpt = pt_curve;
|
||||
if ( (tpt = to->pointtype)==pt_hvcurve ) tpt = pt_curve;
|
||||
if ( from->nextcpdef && to->prevcpdef ) switch ( fpt*3+tpt ) {
|
||||
diff -up texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/tottf.c.me texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/tottf.c
|
||||
--- texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/tottf.c.me 2018-09-25 09:12:58.071419844 +0100
|
||||
+++ texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/tottf.c 2018-09-25 09:12:50.021271829 +0100
|
||||
@@ -4273,9 +4273,10 @@ return( NULL );
|
||||
(subheadcnt-i)*sizeof(struct subhead) + sizeof(uint16);
|
||||
|
||||
sub = tmpfile2();
|
||||
- if ( sub==NULL )
|
||||
-return( NULL );
|
||||
-
|
||||
+ if ( sub==NULL ) {
|
||||
+ free(glyphs);
|
||||
+ return( NULL );
|
||||
+ }
|
||||
putshort(sub,2); /* 8/16 format */
|
||||
putshort(sub,0); /* Subtable length, we'll come back and fix this */
|
||||
putshort(sub,0); /* version/language, not meaningful in ms systems */
|
||||
diff -up texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/ttfspecial.c.me texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/ttfspecial.c
|
||||
--- texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/ttfspecial.c.me 2018-09-25 09:50:27.032676224 +0100
|
||||
+++ texlive-20180414/source/texk/dvisvgm/dvisvgm-src/libs/ff-woff/fontforge/ttfspecial.c 2018-09-25 09:47:22.249288133 +0100
|
||||
@@ -1343,6 +1343,8 @@ static void pfed_read_glyph_layer(FILE *
|
||||
LogError(_("Whoops, Ran out of spiros\n"));
|
||||
}
|
||||
}
|
||||
+ free(cur->layers);
|
||||
+ free(cur);
|
||||
free(contours);
|
||||
}
|
||||
|
||||
diff -up texlive-20180414/source/texk/kpathsea/cnf.c.me texlive-20180414/source/texk/kpathsea/cnf.c
|
||||
--- texlive-20180414/source/texk/kpathsea/cnf.c.me 2018-09-25 10:02:44.406129099 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/cnf.c 2018-09-25 10:50:20.648575054 +0100
|
||||
@@ -132,6 +132,8 @@ do_line (kpathsea kpse, string line)
|
||||
while (len > 0 && ISSPACE (start[len - 1]))
|
||||
len--;
|
||||
if (len == 0) {
|
||||
+ if (prog) free (prog);
|
||||
+ if (var) free (var);
|
||||
return ("No cnf value");
|
||||
}
|
||||
|
||||
@@ -234,7 +236,6 @@ read_all_cnf (kpathsea kpse)
|
||||
xfclose (cnf_file, *cnf);
|
||||
free (*cnf);
|
||||
}
|
||||
- free (cnf_files);
|
||||
} else {
|
||||
string warn = getenv ("KPATHSEA_WARNING");
|
||||
if (!(warn && STREQ (warn, "0"))) {
|
||||
@@ -243,6 +244,7 @@ read_all_cnf (kpathsea kpse)
|
||||
cnf_path);
|
||||
}
|
||||
}
|
||||
+ free (cnf_files);
|
||||
}
|
||||
|
||||
/* Read the cnf files on the first call. Return the first value in the
|
||||
diff -up texlive-20180414/source/texk/kpathsea/fontmap.c.me texlive-20180414/source/texk/kpathsea/fontmap.c
|
||||
--- texlive-20180414/source/texk/kpathsea/fontmap.c.me 2018-09-25 10:24:28.990061334 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/fontmap.c 2018-09-25 10:25:08.310783006 +0100
|
||||
@@ -162,6 +162,7 @@ read_all_maps (kpathsea kpse)
|
||||
map_file_parse (kpse, *filenames);
|
||||
filenames++;
|
||||
}
|
||||
+ free(filenames);
|
||||
}
|
||||
|
||||
/* Look up KEY in texfonts.map's; if it's not found, remove any suffix
|
||||
diff -up texlive-20180414/source/texk/kpathsea/kpsewhich.c.me texlive-20180414/source/texk/kpathsea/kpsewhich.c
|
||||
--- texlive-20180414/source/texk/kpathsea/kpsewhich.c.me 2018-09-25 10:29:35.985696560 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/kpsewhich.c 2018-09-25 10:50:53.349178562 +0100
|
||||
@@ -742,7 +742,8 @@ kpathsea_set_program_enabled (kpse, fmt,
|
||||
DISABLE_MKTEX (kpse_ocp_format);
|
||||
|
||||
/* NULL for no fallback font. */
|
||||
- kpathsea_init_prog (kpse, uppercasify (kpse->program_name), dpi, mode, NULL);
|
||||
+ string PROG = uppercasify (kpse->program_name);
|
||||
+ kpathsea_init_prog (kpse, PROG, dpi, mode, NULL);
|
||||
|
||||
/* Have to do this after setting the program name. */
|
||||
if (user_format_string) {
|
||||
@@ -752,6 +753,7 @@ kpathsea_set_program_enabled (kpse, fmt,
|
||||
user_format_string);
|
||||
}
|
||||
}
|
||||
+ free(PROG);
|
||||
}
|
||||
|
||||
|
||||
diff -up texlive-20180414/source/texk/kpathsea/mktexlsr.me texlive-20180414/source/texk/kpathsea/mktexlsr
|
||||
--- texlive-20180414/source/texk/kpathsea/mktexlsr.me 2018-08-14 09:49:37.815932357 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/mktexlsr 2018-08-14 09:51:12.685644501 +0100
|
||||
@@ -71,18 +71,18 @@ esac
|
||||
|
||||
if tty -s; then verbose=true; else verbose=false; fi
|
||||
dry_run=false
|
||||
-trees=
|
||||
+trees=mktexlsrtrees
|
||||
|
||||
# initialize treefile by either mktemp or some random name
|
||||
# code taken from pdfjam and adjusted
|
||||
{
|
||||
treefile=`
|
||||
- (umask 077 && mktemp "${TMPDIR-/tmp}/mktexlsrtrees.XXXXXXXXXX") 2>/dev/null
|
||||
+ (umask 077 && mktemp "${TMPDIR-/tmp}/$trees.XXXXXXXXXX") 2>/dev/null
|
||||
` && test -n "$treefile" && test -f "$treefile"
|
||||
} || {
|
||||
## We'll use awk to make random number, for portability
|
||||
random=`awk 'END { srand(); printf ("%d\n", rand()*1000000); }' /dev/null`
|
||||
- treefile="${TMPDIR-/tmp}/mktexlsrtrees$$.$random"
|
||||
+ treefile="${TMPDIR-/tmp}/$trees$$.$random"
|
||||
} || exit $?
|
||||
|
||||
trap 'cd /; rm -f $treefile; test -z "$db_dir_tmp" || rm -rf "$db_dir_tmp";
|
||||
diff -up texlive-20180414/source/texk/kpathsea/tex-file.c.me texlive-20180414/source/texk/kpathsea/tex-file.c
|
||||
--- texlive-20180414/source/texk/kpathsea/tex-file.c.me 2018-09-25 10:47:56.305911131 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/tex-file.c 2018-09-25 13:11:34.995055022 +0100
|
||||
@@ -434,6 +434,7 @@ init_maketex (kpathsea kpse, kpse_file_f
|
||||
kpse_src_client_cnf);
|
||||
}
|
||||
|
||||
+ if (progval) free (progval);
|
||||
free (PROG);
|
||||
}
|
||||
|
||||
diff -up texlive-20180414/source/texk/kpathsea/tex-glyph.c.me texlive-20180414/source/texk/kpathsea/tex-glyph.c
|
||||
--- texlive-20180414/source/texk/kpathsea/tex-glyph.c.me 2018-09-25 14:58:28.564047833 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/tex-glyph.c 2018-09-25 14:59:16.634928903 +0100
|
||||
@@ -177,7 +177,7 @@ try_fontmap (kpathsea kpse, const_string
|
||||
*fontname_ptr = xstrdup (first_name);
|
||||
}
|
||||
}
|
||||
-
|
||||
+ free (mapped_names);
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff -up texlive-20180414/source/texk/kpathsea/tex-make.c.me texlive-20180414/source/texk/kpathsea/tex-make.c
|
||||
--- texlive-20180414/source/texk/kpathsea/tex-make.c.me 2018-10-01 12:28:44.510074773 +0100
|
||||
+++ texlive-20180414/source/texk/kpathsea/tex-make.c 2018-10-01 13:24:01.201630392 +0100
|
||||
@@ -116,8 +116,9 @@ misstex (kpathsea kpse, kpse_file_format
|
||||
|
||||
kpse->missfont
|
||||
= missfont_name ? fopen (missfont_name, FOPEN_A_MODE) : NULL;
|
||||
- if (!kpse->missfont && kpathsea_var_value (kpse, "TEXMFOUTPUT")) {
|
||||
- missfont_name = concat3 (kpathsea_var_value (kpse, "TEXMFOUTPUT"),
|
||||
+ char *texmfoutput = kpathsea_var_value (kpse, "TEXMFOUTPUT");
|
||||
+ if (!kpse->missfont && texmfoutput) {
|
||||
+ missfont_name = concat3 (texmfoutput,
|
||||
DIR_SEP_STRING, missfont_name);
|
||||
kpse->missfont = fopen (missfont_name, FOPEN_A_MODE);
|
||||
}
|
||||
@@ -125,6 +126,7 @@ misstex (kpathsea kpse, kpse_file_format
|
||||
if (kpse->missfont)
|
||||
fprintf (stderr, "kpathsea: Appending font creation commands to %s.\n",
|
||||
missfont_name);
|
||||
+ free (texmfoutput);
|
||||
}
|
||||
|
||||
/* Write the command if we have a log file. */
|
||||
@@ -439,6 +441,7 @@ kpathsea_make_tex (kpathsea kpse, kpse_f
|
||||
if (base[0] == '-' /* || IS_DIR_SEP(base[0]) */) {
|
||||
fprintf(stderr, "kpathsea:make_tex: Invalid filename `%s', starts with '%c'\n",
|
||||
base, base[0]);
|
||||
+ free (args);
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; base[i]; i++) {
|
||||
@@ -451,6 +454,7 @@ kpathsea_make_tex (kpathsea kpse, kpse_f
|
||||
{
|
||||
fprintf(stderr, "kpathsea:make_tex: Invalid filename `%s', contains '%c'\n",
|
||||
base, base[i]);
|
||||
+ free (args);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
diff -up texlive-20180414/source/texk/makeindexk/mkindex.me texlive-20180414/source/texk/makeindexk/mkindex
|
||||
--- texlive-20180414/source/texk/makeindexk/mkindex.me 2018-08-14 09:48:13.864392161 +0100
|
||||
+++ texlive-20180414/source/texk/makeindexk/mkindex 2018-08-14 09:48:34.564771939 +0100
|
||||
@@ -13,7 +13,7 @@ unset RUNNING_BSH
|
||||
progname=`basename $0`
|
||||
case $# in
|
||||
0)
|
||||
- echo "usage: `basename $0` file[.idx] ..." 1>&2
|
||||
+ echo "usage: $progname file[.idx] ..." 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
diff -up texlive-20180414/source/texk/web2c/lib/openclose.c.me texlive-20180414/source/texk/web2c/lib/openclose.c
|
||||
--- texlive-20180414/source/texk/web2c/lib/openclose.c.me 2018-10-02 15:06:29.670502929 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/lib/openclose.c 2018-10-02 15:09:52.234270066 +0100
|
||||
@@ -303,6 +303,7 @@ open_output (FILE **f_ptr, const_string
|
||||
fname = concat3(texmfoutput, DIR_SEP_STRING, nameoffile+1);
|
||||
*f_ptr = fopen(fname, fopen_mode);
|
||||
}
|
||||
+ free (texmfoutput);
|
||||
}
|
||||
/* If this succeeded, change nameoffile accordingly. */
|
||||
if (*f_ptr) {
|
||||
diff -up texlive-20180414/source/texk/web2c/lib/texmfmp.c.me texlive-20180414/source/texk/web2c/lib/texmfmp.c
|
||||
--- texlive-20180414/source/texk/web2c/lib/texmfmp.c.me 2018-10-04 09:45:15.432099911 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/lib/texmfmp.c 2018-10-04 10:22:47.004046653 +0100
|
||||
@@ -654,7 +654,9 @@ static boolean
|
||||
texmf_yesno(const_string var)
|
||||
{
|
||||
string value = kpse_var_value (var);
|
||||
- return value && (*value == 't' || *value == 'y' || *value == '1');
|
||||
+ boolean temp_value = (value && (*value == 't' || *value == 'y' || *value == '1'));
|
||||
+ free (value);
|
||||
+ return temp_value;
|
||||
}
|
||||
|
||||
#ifdef pdfTeX
|
||||
@@ -899,6 +901,7 @@ maininit (int ac, string *av)
|
||||
}
|
||||
DUMP_VAR = concat (" ", with_ext); /* adjust array for Pascal */
|
||||
DUMP_LENGTH_VAR = strlen (DUMP_VAR + 1);
|
||||
+ free (with_ext);
|
||||
} else {
|
||||
/* For dump_name to be NULL is a bug. */
|
||||
abort();
|
||||
@@ -1379,11 +1382,9 @@ tcx_get_num (int upb,
|
||||
void
|
||||
readtcxfile (void)
|
||||
{
|
||||
- string orig_filename;
|
||||
if (!find_suffix (translate_filename)) {
|
||||
translate_filename = concat (translate_filename, ".tcx");
|
||||
}
|
||||
- orig_filename = translate_filename;
|
||||
translate_filename
|
||||
= kpse_find_file (translate_filename, kpse_web2c_format, true);
|
||||
if (translate_filename) {
|
||||
@@ -1434,7 +1435,7 @@ readtcxfile (void)
|
||||
}
|
||||
xfclose(translate_file, translate_filename);
|
||||
} else {
|
||||
- WARNING1 ("Could not open char translation file `%s'", orig_filename);
|
||||
+ WARNING1 ("Could not open char translation file `%s'", translate_filename);
|
||||
}
|
||||
}
|
||||
#endif /* !Aleph && !XeTeX */
|
||||
@@ -2888,7 +2889,9 @@ boolean
|
||||
isnewsource (strnumber srcfilename, int lineno)
|
||||
{
|
||||
char *name = gettexstring(srcfilename);
|
||||
- return (compare_paths(name, last_source_name) != 0 || lineno != last_lineno);
|
||||
+ boolean tmp_name = (compare_paths(name, last_source_name) != 0 || lineno != last_lineno);
|
||||
+ free (name);
|
||||
+ return tmp_name;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2926,6 +2929,7 @@ makesrcspecial (strnumber srcfilename, i
|
||||
while (*s)
|
||||
strpool[poolptr++] = *s++;
|
||||
|
||||
+ free (filename);
|
||||
return (oldpoolptr);
|
||||
}
|
||||
|
||||
@@ -3223,6 +3227,7 @@ void getfiledump(integer s, int offset,
|
||||
recorder_record_input(file_name);
|
||||
if (fseek(f, offset, SEEK_SET) != 0) {
|
||||
xfree(file_name);
|
||||
+ fclose(f);
|
||||
return;
|
||||
}
|
||||
/* there is enough space in the string pool, the read
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/luafont.w.me texlive-20180414/source/texk/web2c/luatexdir/font/luafont.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/luafont.w.me 2018-10-04 10:46:48.310815583 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/luafont.w 2018-10-04 10:57:37.192864136 +0100
|
||||
@@ -1102,8 +1102,8 @@ static void font_char_from_lua(lua_State
|
||||
{
|
||||
int k, r, t, lt, u, n;
|
||||
charinfo *co;
|
||||
- kerninfo *ckerns;
|
||||
- liginfo *cligs;
|
||||
+ kerninfo *ckerns = NULL;
|
||||
+ liginfo *cligs = NULL;
|
||||
scaled j;
|
||||
const char *s;
|
||||
int nl = 0; /* number of ligature table items */
|
||||
@@ -1403,6 +1403,8 @@ static void font_char_from_lua(lua_State
|
||||
lua_pop(L, 1); /* ligatures table */
|
||||
}
|
||||
}
|
||||
+ if (ckerns) free (ckerns);
|
||||
+ if (cligs) free (cligs);
|
||||
}
|
||||
|
||||
@ The caller has to fix the state of the lua stack when there is an error!
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/tfmofm.w.me texlive-20180414/source/texk/web2c/luatexdir/font/tfmofm.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/tfmofm.w.me 2018-10-04 11:06:22.002603849 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/tfmofm.w 2018-10-04 11:06:46.713062328 +0100
|
||||
@@ -1036,6 +1036,8 @@ int read_tfm_info(internal_font_number f
|
||||
}
|
||||
}
|
||||
|
||||
+ free (cligs);
|
||||
+ free (ckerns);
|
||||
cligs = NULL;
|
||||
ckerns = NULL;
|
||||
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/vfovf.w.me texlive-20180414/source/texk/web2c/luatexdir/font/vfovf.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/vfovf.w.me 2018-10-04 13:46:33.030731080 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/vfovf.w 2018-10-04 14:05:38.882001697 +0100
|
||||
@@ -760,6 +760,8 @@ void do_vf(internal_font_number f)
|
||||
vf_read_u(4, utmp);
|
||||
cc = (int) utmp;
|
||||
if (!char_exists(f, cc)) {
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("invalid character code");
|
||||
}
|
||||
vf_read(4, k);
|
||||
@@ -768,6 +770,8 @@ void do_vf(internal_font_number f)
|
||||
packet_length = cmd;
|
||||
vf_byte(cc);
|
||||
if (!char_exists(f, cc)) {
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("invalid character code");
|
||||
}
|
||||
vf_read_u(3, utmp);
|
||||
@@ -820,9 +824,12 @@ void do_vf(internal_font_number f)
|
||||
n = 0;
|
||||
while ((n < vf_nf) && (vf_local_fnts[n] != (unsigned) k))
|
||||
n++;
|
||||
- if (n == vf_nf)
|
||||
+ if (n == vf_nf) {
|
||||
+ if (vpackets) free (vpackets);
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("undefined local font");
|
||||
-
|
||||
+ }
|
||||
k = (int) vf_real_fnts[n];
|
||||
append_fnt_set(k);
|
||||
cmd_length = 0;
|
||||
@@ -938,8 +945,12 @@ void do_vf(internal_font_number f)
|
||||
vf_read_u((cmd - xxx1 + 1), utmp);
|
||||
cmd_length = (int) utmp;
|
||||
packet_length -= (cmd - xxx1 + 1);
|
||||
- if (cmd_length <= 0)
|
||||
+ if (cmd_length <= 0) {
|
||||
+ if (vpackets) free (vpackets);
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("special of negative length");
|
||||
+ }
|
||||
packet_length -= (unsigned) cmd_length;
|
||||
|
||||
append_packet(packet_special_code);
|
||||
@@ -982,6 +993,9 @@ void do_vf(internal_font_number f)
|
||||
break;
|
||||
case pop:
|
||||
if (stack_level == 0) {
|
||||
+ if (vpackets) free (vpackets);
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("more POPs than PUSHs in character");
|
||||
} else {
|
||||
decr(stack_level);
|
||||
@@ -993,6 +1007,9 @@ void do_vf(internal_font_number f)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
+ if (vpackets) free (vpackets);
|
||||
bad_vf("improver DVI command");
|
||||
}
|
||||
}
|
||||
@@ -1000,18 +1017,26 @@ void do_vf(internal_font_number f)
|
||||
/* signal end of packet */
|
||||
append_packet(packet_end_code);
|
||||
|
||||
- if (stack_level != 0)
|
||||
+ if (stack_level != 0) {
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
+ if (vpackets) free (vpackets);
|
||||
bad_vf("more PUSHs than POPs in character packet");
|
||||
+ }
|
||||
if (packet_length != 0)
|
||||
bad_vf("invalid packet length or DVI command in packet");
|
||||
/* \.{Store the packet being built} */
|
||||
set_charinfo_packets(co, vpackets);
|
||||
vf_byte(cmd);
|
||||
}
|
||||
- if (cmd != post)
|
||||
+ if (cmd != post) {
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
bad_vf("POST command expected");
|
||||
-
|
||||
+ }
|
||||
xfree(vf_buffer);
|
||||
+ if (vf_local_fnts) free (vf_local_fnts);
|
||||
+ if (vf_real_fnts) free (vf_real_fnts);
|
||||
}
|
||||
|
||||
@ @c
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/writecff.w.me texlive-20180414/source/texk/web2c/luatexdir/font/writecff.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/writecff.w.me 2018-10-04 14:46:50.747887890 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/writecff.w 2018-10-04 16:09:12.999654546 +0100
|
||||
@@ -1105,6 +1105,7 @@ cff_font *read_cff(unsigned char *buf, l
|
||||
if (n > idx->count - 1) {
|
||||
normal_warning("cff","invalid fontset index number");
|
||||
cff_close(cff);
|
||||
+ cff_release_index(idx);
|
||||
return NULL;
|
||||
}
|
||||
cff->name = idx;
|
||||
@@ -1121,6 +1122,7 @@ cff_font *read_cff(unsigned char *buf, l
|
||||
|
||||
if (n > idx->count - 1) {
|
||||
normal_warning("cff","top DICT not exist");
|
||||
+ cff_release_index(idx);
|
||||
cff_close(cff);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1128,6 +1130,7 @@ cff_font *read_cff(unsigned char *buf, l
|
||||
idx->data + idx->offset[n + 1] - 1);
|
||||
if (!cff->topdict) {
|
||||
normal_warning("cff","parsing top DICT data failed");
|
||||
+ cff_release_index(idx);
|
||||
cff_close(cff);
|
||||
return NULL;
|
||||
}
|
||||
@@ -3037,6 +3040,7 @@ cffont->_string = NULL;
|
||||
pdf_out_block(pdf, stream, l);
|
||||
pdf_end_stream(pdf);
|
||||
pdf_end_obj(pdf);
|
||||
+ free(stream);
|
||||
}
|
||||
}
|
||||
/*
|
||||
diff -up texlive-20180414/source/texk/web2c/luatexdir/font/writetype2.w.me texlive-20180414/source/texk/web2c/luatexdir/font/writetype2.w
|
||||
--- texlive-20180414/source/texk/web2c/luatexdir/font/writetype2.w.me 2018-10-04 16:13:09.614046152 +0100
|
||||
+++ texlive-20180414/source/texk/web2c/luatexdir/font/writetype2.w 2018-10-04 16:13:43.084667255 +0100
|
||||
@@ -406,6 +406,7 @@ boolean make_tt_subset(PDF pdf, fd_entry
|
||||
pdf_out_block(pdf, stream, l);
|
||||
pdf_end_stream(pdf);
|
||||
pdf_end_obj(pdf);
|
||||
+ free(stream);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,641 @@
|
|||
diff -up texlive-base-20180414/source/texk/web2c/pdftexdir/pdftoepdf.cc.newpoppler texlive-base-20180414/source/texk/web2c/pdftexdir/pdftoepdf.cc
|
||||
--- texlive-base-20180414/source/texk/web2c/pdftexdir/pdftoepdf.cc.newpoppler 2016-11-25 13:24:37.000000000 -0500
|
||||
+++ texlive-base-20180414/source/texk/web2c/pdftexdir/pdftoepdf.cc 2018-04-30 13:26:10.442342831 -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'.
|
||||
@@ -39,10 +48,7 @@ with this program. If not, see <http://
|
||||
#include <goo/gfile.h>
|
||||
#define GString GooString
|
||||
#else
|
||||
-#include <aconf.h>
|
||||
-#include <GString.h>
|
||||
-#include <gmem.h>
|
||||
-#include <gfile.h>
|
||||
+#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
@@ -84,31 +90,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
|
||||
@@ -212,18 +193,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)
|
||||
@@ -320,10 +289,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");
|
||||
}
|
||||
@@ -376,17 +345,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");
|
||||
@@ -394,10 +363,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;
|
||||
@@ -413,33 +401,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 {
|
||||
@@ -451,24 +445,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");
|
||||
}
|
||||
@@ -557,7 +551,7 @@ static char *convertNumToPDF(double n)
|
||||
|
||||
static void copyObject(Object * obj)
|
||||
{
|
||||
- PdfObject obj1;
|
||||
+ Object obj1;
|
||||
int i, l, c;
|
||||
Ref ref;
|
||||
char *p;
|
||||
@@ -601,8 +595,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);
|
||||
}
|
||||
@@ -612,9 +606,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());
|
||||
@@ -638,9 +631,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
|
||||
@@ -656,7 +648,6 @@ static void writeRefs()
|
||||
pdf_puts("\n");
|
||||
pdfendobj();
|
||||
}
|
||||
- obj1.free();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -685,7 +676,7 @@ static void writeEncodings()
|
||||
#ifdef POPPLER_VERSION
|
||||
r->font->decRefCnt();
|
||||
#else
|
||||
- delete r->font;
|
||||
+#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
delete r;
|
||||
}
|
||||
@@ -728,7 +719,7 @@ read_pdf_info(char *image_name, char *pa
|
||||
#ifdef POPPLER_VERSION
|
||||
int pdf_major_version_found, pdf_minor_version_found;
|
||||
#else
|
||||
- float pdf_version_found, pdf_version_wanted;
|
||||
+#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
// initialize
|
||||
if (!isInit) {
|
||||
@@ -760,19 +751,7 @@ read_pdf_info(char *image_name, char *pa
|
||||
}
|
||||
}
|
||||
#else
|
||||
- pdf_version_found = pdf_doc->doc->getPDFVersion();
|
||||
- pdf_version_wanted = 1 + (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";
|
||||
- if (pdf_inclusion_errorlevel > 0) {
|
||||
- pdftex_fail(msg, pdf_version_found, pdf_version_wanted);
|
||||
- } else if (pdf_inclusion_errorlevel < 0) {
|
||||
- ; /* do nothing */
|
||||
- } else { /* = 0, give warning */
|
||||
- pdftex_warn(msg, pdf_version_found, pdf_version_wanted);
|
||||
- }
|
||||
- }
|
||||
+#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
epdf_num_pages = pdf_doc->doc->getCatalog()->getNumPages();
|
||||
if (page_name) {
|
||||
@@ -839,8 +818,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;
|
||||
@@ -867,8 +846,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
|
||||
@@ -886,7 +865,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);
|
||||
@@ -942,14 +921,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
|
||||
@@ -957,8 +936,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
|
||||
@@ -972,11 +951,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);
|
||||
}
|
||||
}
|
||||
@@ -989,14 +993,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);
|
||||
@@ -1009,8 +1013,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
|
||||
@@ -1021,36 +1025,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-20180414/source/texk/web2c/pdftexdir/pdftosrc.cc.newpoppler texlive-base-20180414/source/texk/web2c/pdftexdir/pdftosrc.cc
|
||||
--- texlive-base-20180414/source/texk/web2c/pdftexdir/pdftosrc.cc.newpoppler 2018-04-30 13:32:27.005472583 -0400
|
||||
+++ texlive-base-20180414/source/texk/web2c/pdftexdir/pdftosrc.cc 2018-04-30 13:38:12.805326988 -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>
|
||||
@@ -32,10 +40,7 @@ with this program. If not, see <http://
|
||||
#include <goo/gmem.h>
|
||||
#include <goo/gfile.h>
|
||||
#else
|
||||
-#include <aconf.h>
|
||||
-#include <GString.h>
|
||||
-#include <gmem.h>
|
||||
-#include <gfile.h>
|
||||
+#error POPPLER_VERSION should be defined.
|
||||
#endif
|
||||
#include <assert.h>
|
||||
|
||||
@@ -86,22 +91,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);
|
||||
@@ -110,7 +113,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);
|
||||
@@ -160,26 +163,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(POPPLER_VERSION) || defined(XPDF304)
|
||||
while (str->getChar() != EOF) ;
|
||||
@@ -187,7 +188,6 @@ int main(int argc, char *argv[])
|
||||
lexer->skipToEOF();
|
||||
#endif
|
||||
delete parser;
|
||||
- objStr.free();
|
||||
|
||||
fprintf(outfile, "%.10lu 00000 n\n",
|
||||
(long unsigned)(firstOffset + localOffset));
|
||||
@@ -198,7 +198,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);
|
||||
@@ -207,7 +206,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;
|
||||
}
|
|
@ -0,0 +1,225 @@
|
|||
From b14146667f4cd6cbc5d5821c88e47096df3c78b5 Mon Sep 17 00:00:00 2001
|
||||
From: Akira Kakuto <kakuto@fuk.kindai.ac.jp>
|
||||
Date: Sat, 28 Apr 2018 07:36:22 +0000
|
||||
Subject: support poppler-0.64.0
|
||||
|
||||
git-svn-id: svn://tug.org/texlive/trunk@47470 c570f23f-e606-0410-a88d-b1316a301751
|
||||
---
|
||||
Build/source/texk/web2c/luatexdir/image/pdftoepdf.w | 4 ++--
|
||||
Build/source/texk/web2c/luatexdir/lua/lepdflib.cc | 4 ++--
|
||||
Build/source/texk/web2c/pdftexdir/ChangeLog | 5 +++++
|
||||
Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc | 14 +++++++-------
|
||||
Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc | 2 +-
|
||||
5 files changed, 17 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w b/Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
|
||||
index 7ba2973..d697959 100644
|
||||
--- Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
|
||||
+++ Build/source/texk/web2c/luatexdir/image/pdftoepdf.w
|
||||
@@ -472,10 +472,10 @@ static void copyObject(PDF pdf, PdfDocument * pdf_doc, Object * obj)
|
||||
break;
|
||||
*/
|
||||
case objString:
|
||||
- copyString(pdf, obj->getString());
|
||||
+ copyString(pdf, (GooString *)obj->getString());
|
||||
break;
|
||||
case objName:
|
||||
- copyName(pdf, obj->getName());
|
||||
+ copyName(pdf, (char *)obj->getName());
|
||||
break;
|
||||
case objNull:
|
||||
pdf_add_null(pdf);
|
||||
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
|
||||
index a16bf3b..32bcdab 100644
|
||||
--- Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
|
||||
+++ Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
|
||||
@@ -674,7 +674,7 @@ static int m_##in##_##function(lua_State * L) \
|
||||
uin = (udstruct *) luaL_checkudata(L, 1, M_##in); \
|
||||
if (uin->pd != NULL && uin->pd->pc != uin->pc) \
|
||||
pdfdoc_changed_error(L); \
|
||||
- gs = ((in *) uin->d)->function(); \
|
||||
+ gs = (GooString *)((in *) uin->d)->function(); \
|
||||
if (gs != NULL) \
|
||||
lua_pushlstring(L, gs->getCString(), gs->getLength()); \
|
||||
else \
|
||||
@@ -1813,7 +1813,7 @@ static int m_Object_getString(lua_State * L)
|
||||
if (uin->pd != NULL && uin->pd->pc != uin->pc)
|
||||
pdfdoc_changed_error(L);
|
||||
if (((Object *) uin->d)->isString()) {
|
||||
- gs = ((Object *) uin->d)->getString();
|
||||
+ gs = (GooString *)((Object *) uin->d)->getString();
|
||||
lua_pushlstring(L, gs->getCString(), gs->getLength());
|
||||
} else
|
||||
lua_pushnil(L);
|
||||
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
|
||||
index c022bc2..f4af035 100644
|
||||
--- Build/source/texk/web2c/pdftexdir/ChangeLog
|
||||
+++ Build/source/texk/web2c/pdftexdir/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2018-04-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
|
||||
+
|
||||
+ * pdftoepdf-newpoppler.cc, pdftosrc-newpoppler.cc:
|
||||
+ Support poppler 0.64.0.
|
||||
+
|
||||
2018-04-14 Karl Berry <karl@tug.org>
|
||||
|
||||
* TeX Live 2018 release, pdftex 1.40.19.
|
||||
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
|
||||
index 10fea29..750579d 100644
|
||||
--- Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
|
||||
+++ Build/source/texk/web2c/pdftexdir/pdftoepdf-newpoppler.cc
|
||||
@@ -290,7 +290,7 @@ static void copyName(char *s)
|
||||
static void copyDictEntry(Object * obj, int i)
|
||||
{
|
||||
Object obj1;
|
||||
- copyName(obj->dictGetKey(i));
|
||||
+ copyName((char *)obj->dictGetKey(i));
|
||||
pdf_puts(" ");
|
||||
obj1 = obj->dictGetValNF(i);
|
||||
copyObject(&obj1);
|
||||
@@ -355,7 +355,7 @@ static void copyProcSet(Object * obj)
|
||||
if (!procset.isName())
|
||||
pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
|
||||
procset.getTypeName());
|
||||
- copyName(procset.getName());
|
||||
+ copyName((char *)procset.getName());
|
||||
pdf_puts(" ");
|
||||
}
|
||||
pdf_puts("]\n");
|
||||
@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object * fontRef)
|
||||
&& fontdescRef.isRef()
|
||||
&& fontdesc.isDict()
|
||||
&& embeddableFont(&fontdesc)
|
||||
- && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
|
||||
+ && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
|
||||
// round /StemV value, since the PDF input is a float
|
||||
// (see Font Descriptors in PDF reference), but we only store an
|
||||
// integer, since we don't want to change the struct.
|
||||
@@ -427,7 +427,7 @@ static void copyFont(char *tag, Object * fontRef)
|
||||
charset = fontdesc.dictLookup("CharSet");
|
||||
if (!charset.isNull() &&
|
||||
charset.isString() && is_subsetable(fontmap))
|
||||
- epdf_mark_glyphs(fd, charset.getString()->getCString());
|
||||
+ epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
|
||||
else
|
||||
embed_whole_font(fd);
|
||||
addFontDesc(fontdescRef.getRef(), fd);
|
||||
@@ -456,7 +456,7 @@ static void copyFontResources(Object * obj)
|
||||
if (fontRef.isRef())
|
||||
copyFont(obj->dictGetKey(i), &fontRef);
|
||||
else if (fontRef.isDict()) { // some programs generate pdf with embedded font object
|
||||
- copyName(obj->dictGetKey(i));
|
||||
+ copyName((char *)obj->dictGetKey(i));
|
||||
pdf_puts(" ");
|
||||
copyObject(&fontRef);
|
||||
}
|
||||
@@ -565,7 +565,7 @@ static void copyObject(Object * obj)
|
||||
} else if (obj->isNum()) {
|
||||
pdf_printf("%s", convertNumToPDF(obj->getNum()));
|
||||
} else if (obj->isString()) {
|
||||
- s = obj->getString();
|
||||
+ s = (GooString *)obj->getString();
|
||||
p = s->getCString();
|
||||
l = s->getLength();
|
||||
if (strlen(p) == (unsigned int) l) {
|
||||
@@ -589,7 +589,7 @@ static void copyObject(Object * obj)
|
||||
pdf_puts(">");
|
||||
}
|
||||
} else if (obj->isName()) {
|
||||
- copyName(obj->getName());
|
||||
+ copyName((char *)obj->getName());
|
||||
} else if (obj->isNull()) {
|
||||
pdf_puts("null");
|
||||
} else if (obj->isArray()) {
|
||||
diff --git a/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc b/Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
|
||||
index 4e2bcad..0db154b 100644
|
||||
--- Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
|
||||
+++ Build/source/texk/web2c/pdftexdir/pdftosrc-newpoppler.cc
|
||||
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "No SourceName found\n");
|
||||
exit(1);
|
||||
}
|
||||
- outname = srcName.getString()->getCString();
|
||||
+ outname = (char *)srcName.getString()->getCString();
|
||||
// We cannot free srcName, as objname shares its string.
|
||||
// srcName.free();
|
||||
} else if (objnum > 0) {
|
||||
--- Build/source/texk/web2c/pdftexdir/pdftosrc.cc
|
||||
+++ Build/source/texk/web2c/pdftexdir/pdftosrc.cc
|
||||
@@ -109,7 +109,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "No SourceName found\n");
|
||||
exit(1);
|
||||
}
|
||||
- outname = srcName.getString()->getCString();
|
||||
+ outname = (char *)srcName.getString()->getCString();
|
||||
// We cannot free srcName, as objname shares its string.
|
||||
// srcName.free();
|
||||
} else if (objnum > 0) {
|
||||
--- Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
|
||||
+++ Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
|
||||
@@ -290,7 +290,7 @@ static void copyName(char *s)
|
||||
static void copyDictEntry(Object * obj, int i)
|
||||
{
|
||||
Object obj1;
|
||||
- copyName(obj->dictGetKey(i));
|
||||
+ copyName((char *)obj->dictGetKey(i));
|
||||
pdf_puts(" ");
|
||||
obj1 = obj->dictGetValNF(i);
|
||||
copyObject(&obj1);
|
||||
@@ -355,7 +355,7 @@ static void copyProcSet(Object * obj)
|
||||
if (!procset.isName())
|
||||
pdftex_fail("PDF inclusion: invalid ProcSet entry type <%s>",
|
||||
procset.getTypeName());
|
||||
- copyName(procset.getName());
|
||||
+ copyName((char *)procset.getName());
|
||||
pdf_puts(" ");
|
||||
}
|
||||
pdf_puts("]\n");
|
||||
@@ -418,7 +418,7 @@ static void copyFont(char *tag, Object * fontRef)
|
||||
&& fontdescRef.isRef()
|
||||
&& fontdesc.isDict()
|
||||
&& embeddableFont(&fontdesc)
|
||||
- && (fontmap = lookup_fontmap(basefont.getName())) != NULL) {
|
||||
+ && (fontmap = lookup_fontmap((char *)basefont.getName())) != NULL) {
|
||||
// round /StemV value, since the PDF input is a float
|
||||
// (see Font Descriptors in PDF reference), but we only store an
|
||||
// integer, since we don't want to change the struct.
|
||||
@@ -427,7 +427,7 @@ static void copyFont(char *tag, Object * fontRef)
|
||||
charset = fontdesc.dictLookup("CharSet");
|
||||
if (!charset.isNull() &&
|
||||
charset.isString() && is_subsetable(fontmap))
|
||||
- epdf_mark_glyphs(fd, charset.getString()->getCString());
|
||||
+ epdf_mark_glyphs(fd, (char *)charset.getString()->getCString());
|
||||
else
|
||||
embed_whole_font(fd);
|
||||
addFontDesc(fontdescRef.getRef(), fd);
|
||||
@@ -456,7 +456,7 @@ static void copyFontResources(Object * obj)
|
||||
if (fontRef.isRef())
|
||||
copyFont(obj->dictGetKey(i), &fontRef);
|
||||
else if (fontRef.isDict()) { // some programs generate pdf with embedded font object
|
||||
- copyName(obj->dictGetKey(i));
|
||||
+ copyName((char *)obj->dictGetKey(i));
|
||||
pdf_puts(" ");
|
||||
copyObject(&fontRef);
|
||||
}
|
||||
@@ -565,7 +565,7 @@ static void copyObject(Object * obj)
|
||||
} else if (obj->isNum()) {
|
||||
pdf_printf("%s", convertNumToPDF(obj->getNum()));
|
||||
} else if (obj->isString()) {
|
||||
- s = obj->getString();
|
||||
+ s = (GooString *)obj->getString();
|
||||
p = s->getCString();
|
||||
l = s->getLength();
|
||||
if (strlen(p) == (unsigned int) l) {
|
||||
@@ -589,7 +589,7 @@ static void copyObject(Object * obj)
|
||||
pdf_puts(">");
|
||||
}
|
||||
} else if (obj->isName()) {
|
||||
- copyName(obj->getName());
|
||||
+ copyName((char *)obj->getName());
|
||||
} else if (obj->isNull()) {
|
||||
pdf_puts("null");
|
||||
} else if (obj->isArray()) {
|
||||
--
|
||||
cgit v1.1
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
diff -up texlive-base-20180414/source/texk/kpathsea/mktexlsr.selinux texlive-base-20180414/source/texk/kpathsea/mktexlsr
|
||||
--- texlive-base-20180414/source/texk/kpathsea/mktexlsr.selinux 2018-01-16 19:55:32.000000000 -0500
|
||||
+++ texlive-base-20180414/source/texk/kpathsea/mktexlsr 2018-04-30 13:10:12.447909163 -0400
|
||||
@@ -228,7 +228,8 @@ for TEXMFLS_R in "$@"; do
|
||||
until PERMS=`kpsestat = "$db_file"`; do sleep 1; done
|
||||
chmod $PERMS "$db_file_tmp"
|
||||
rm -f "$db_file"
|
||||
- mv "$db_file_tmp" "$db_file"
|
||||
+ # selinux fix
|
||||
+ cp "$db_file_tmp" "$db_file"
|
||||
rm -rf "$db_dir_tmp"
|
||||
done
|
||||
|
||||
diff -up texlive-base-20180414/source/texk/texlive/linked_scripts/texlive/fmtutil.pl.selinux texlive-base-20180414/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
|
||||
--- texlive-base-20180414/source/texk/texlive/linked_scripts/texlive/fmtutil.pl.selinux 2018-04-30 13:10:12.447909163 -0400
|
||||
+++ texlive-base-20180414/source/texk/texlive/linked_scripts/texlive/fmtutil.pl 2018-04-30 13:12:43.035361954 -0400
|
||||
@@ -719,7 +719,7 @@ sub rebuild_one_format {
|
||||
|
||||
TeXLive::TLUtils::mkdirhier($destdir);
|
||||
|
||||
- if (!File::Copy::move( $logfile, "$destdir/$logfile")) {
|
||||
+ if (!File::Copy::copy( $logfile, "$destdir/$logfile")) {
|
||||
print_deferred_error("Cannot move $logfile to $destdir.\n");
|
||||
}
|
||||
if ($opts{'recorder'}) {
|
||||
@@ -727,13 +727,13 @@ sub rebuild_one_format {
|
||||
# package dependencies for each format. Unfortunately omega-based
|
||||
# engines gratuitiously changed the extension from .fls to .ofl.
|
||||
my $recfile = $fmt . ($fmt =~ m/^(aleph|lamed)$/ ? ".ofl" : ".fls");
|
||||
- if (!File::Copy::move( $recfile, "$destdir/$recfile")) {
|
||||
+ if (!File::Copy::copy( $recfile, "$destdir/$recfile")) {
|
||||
print_deferred_error("Cannot move $recfile to $destdir.\n");
|
||||
}
|
||||
}
|
||||
|
||||
my $destfile = "$destdir/$fmtfile";
|
||||
- if (File::Copy::move( $fmtfile, $destfile )) {
|
||||
+ if (File::Copy::copy( $fmtfile, $destfile )) {
|
||||
print_info("$destfile installed.\n");
|
||||
#
|
||||
# original fmtutil.sh did some magic trick for mplib-luatex.mem
|
|
@ -0,0 +1,22 @@
|
|||
diff -up doc/otherformats/xmltex/base/langtest.xml.me doc/otherformats/xmltex/base/langtest.xml
|
||||
--- doc/otherformats/xmltex/base/langtest.xml.me 2018-11-09 19:15:17.265859217 +0100
|
||||
+++ doc/otherformats/xmltex/base/langtest.xml 2018-11-09 19:15:37.403926239 +0100
|
||||
@@ -3,8 +3,6 @@
|
||||
|
||||
<!ENTITY englishutf8 SYSTEM "englishutf8.xml">
|
||||
<!ENTITY portugeselatin1 SYSTEM "portugeselatin1.xml">
|
||||
-<!ENTITY englishutf16 SYSTEM "englishutf16.xml">
|
||||
-<!ENTITY russiankoi8 SYSTEM "russiankoi8.xml">
|
||||
<!ENTITY russianutf8 SYSTEM "russianutf8.xml">
|
||||
|
||||
]>
|
||||
@@ -12,9 +10,7 @@
|
||||
<langtest>
|
||||
|
||||
&englishutf8;
|
||||
-&englishutf16;
|
||||
&portugeselatin1;
|
||||
-&russiankoi8;
|
||||
&russianutf8;
|
||||
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
diff -up texlive-base-20190410/source/texk/web2c/am/texmf.am.dt texlive-base-20190410/source/texk/web2c/am/texmf.am
|
||||
--- texlive-base-20190410/source/texk/web2c/am/texmf.am.dt 2015-07-10 05:42:52.000000000 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/am/texmf.am 2019-05-23 15:07:41.663729872 -0400
|
||||
@@ -73,7 +73,7 @@ DISTCLEANFILES += $(nodist_tex_SOURCES)
|
||||
|
||||
# TeX tests
|
||||
#
|
||||
-tex_tests = triptest.test tests/write18-quote-test.pl
|
||||
+tex_tests = tests/write18-quote-test.pl
|
||||
triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
|
||||
tests/write18-quote-test.log: tex$(EXEEXT)
|
||||
EXTRA_DIST += $(tex_tests)
|
||||
@@ -201,7 +201,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-20190410/source/texk/web2c/eptexdir/am/eptex.am.dt texlive-base-20190410/source/texk/web2c/eptexdir/am/eptex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/eptexdir/am/eptex.am.dt 2015-08-06 04:49:49.000000000 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/eptexdir/am/eptex.am 2019-05-23 15:07:41.663729872 -0400
|
||||
@@ -81,7 +81,7 @@ EXTRA_DIST += \
|
||||
|
||||
# e-pTeX Tests
|
||||
#
|
||||
-eptex_tests = eptexdir/eptriptest.test eptexdir/pdfprimitive.test
|
||||
+eptex_tests =
|
||||
eptexdir/eptriptest.log: eptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
|
||||
eptexdir/pdfprimitive.log: eptex$(EXEEXT)
|
||||
|
||||
diff -up texlive-base-20190410/source/texk/web2c/euptexdir/am/euptex.am.dt texlive-base-20190410/source/texk/web2c/euptexdir/am/euptex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/euptexdir/am/euptex.am.dt 2018-01-20 22:48:06.000000000 -0500
|
||||
+++ texlive-base-20190410/source/texk/web2c/euptexdir/am/euptex.am 2019-05-23 15:07:41.663729872 -0400
|
||||
@@ -82,7 +82,7 @@ EXTRA_DIST += \
|
||||
|
||||
# e-upTeX Tests
|
||||
#
|
||||
-euptex_tests = euptexdir/euptriptest.test euptexdir/pdfprimitive.test
|
||||
+euptex_tests =
|
||||
euptexdir/euptriptest.log: euptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
|
||||
euptexdir/pdfprimitive.log: euptex$(EXEEXT)
|
||||
|
||||
diff -up texlive-base-20190410/source/texk/web2c/mfluadir/am/mflua.am.dt texlive-base-20190410/source/texk/web2c/mfluadir/am/mflua.am
|
||||
--- texlive-base-20190410/source/texk/web2c/mfluadir/am/mflua.am.dt 2017-04-16 06:11:22.000000000 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/mfluadir/am/mflua.am 2019-05-23 15:07:41.663729872 -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-20190410/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt texlive-base-20190410/source/texk/web2c/mfluajitdir/am/mfluajit.am
|
||||
--- texlive-base-20190410/source/texk/web2c/mfluajitdir/am/mfluajit.am.dt 2017-04-16 06:11:22.000000000 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/mfluajitdir/am/mfluajit.am 2019-05-23 15:07:41.663729872 -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-20190410/source/texk/web2c/pdftexdir/am/pdftex.am.dt texlive-base-20190410/source/texk/web2c/pdftexdir/am/pdftex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/pdftexdir/am/pdftex.am.dt 2019-05-23 15:07:41.663729872 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/pdftexdir/am/pdftex.am 2019-05-23 15:09:34.941250514 -0400
|
||||
@@ -94,8 +94,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/wprob.log pdftexdir/pdftex.log \
|
||||
pdftexdir/pdfimage.log pdftexdir/expanded.log: pdftex$(EXEEXT)
|
||||
diff -up texlive-base-20190410/source/texk/web2c/ptexdir/am/ptex.am.dt texlive-base-20190410/source/texk/web2c/ptexdir/am/ptex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/ptexdir/am/ptex.am.dt 2019-02-06 05:58:23.000000000 -0500
|
||||
+++ texlive-base-20190410/source/texk/web2c/ptexdir/am/ptex.am 2019-05-23 15:07:41.664729850 -0400
|
||||
@@ -167,7 +167,7 @@ EXTRA_DIST += \
|
||||
|
||||
# pTeX Tests
|
||||
#
|
||||
-ptex_tests = ptexdir/ptriptest.test
|
||||
+ptex_tests =
|
||||
ptexdir/ptriptest.log: ptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
|
||||
pweb_tests = \
|
||||
ptexdir/pbibtex.test \
|
||||
diff -up texlive-base-20190410/source/texk/web2c/uptexdir/am/uptex.am.dt texlive-base-20190410/source/texk/web2c/uptexdir/am/uptex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/uptexdir/am/uptex.am.dt 2018-08-18 07:45:50.000000000 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/uptexdir/am/uptex.am 2019-05-23 15:07:41.664729850 -0400
|
||||
@@ -157,7 +157,7 @@ EXTRA_DIST += \
|
||||
uptexdir/ChangeLog
|
||||
|
||||
# upTeX Tests
|
||||
-uptex_tests = uptexdir/uptriptest.test
|
||||
+uptex_tests =
|
||||
uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
|
||||
upweb_tests = \
|
||||
uptexdir/upbibtex.test \
|
||||
diff -up texlive-base-20190410/source/texk/web2c/xetexdir/am/xetex.am.dt texlive-base-20190410/source/texk/web2c/xetexdir/am/xetex.am
|
||||
--- texlive-base-20190410/source/texk/web2c/xetexdir/am/xetex.am.dt 2018-01-17 17:54:13.000000000 -0500
|
||||
+++ texlive-base-20190410/source/texk/web2c/xetexdir/am/xetex.am 2019-05-23 15:07:41.664729850 -0400
|
||||
@@ -200,7 +200,6 @@ EXTRA_DIST += \
|
||||
# XeTeX Tests
|
||||
#
|
||||
xetex_tests = \
|
||||
- xetexdir/xetex-bug73.test \
|
||||
xetexdir/xetex.test
|
||||
xetexdir/xetex-bug73.log xetexdir/xetex.log: xetex$(EXEEXT)
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,249 @@
|
|||
diff -up texlive-base-20190410/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.73 texlive-base-20190410/source/texk/web2c/pdftexdir/pdftoepdf.cc
|
||||
--- texlive-base-20190410/source/texk/web2c/pdftexdir/pdftoepdf.cc.poppler-0.73 2019-05-23 15:50:17.849768543 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/pdftexdir/pdftoepdf.cc 2019-05-23 16:00:41.022262790 -0400
|
||||
@@ -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
|
||||
@@ -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++) {
|
||||
@@ -310,7 +310,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());
|
||||
@@ -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;
|
||||
@@ -418,7 +418,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.
|
||||
@@ -427,7 +427,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);
|
||||
@@ -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()) {
|
||||
@@ -566,7 +566,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("(");
|
||||
@@ -664,7 +664,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;
|
||||
@@ -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
|
||||
@@ -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);
|
||||
@@ -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");
|
||||
@@ -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 -up texlive-base-20190410/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.73 texlive-base-20190410/source/texk/web2c/pdftexdir/pdftosrc.cc
|
||||
--- texlive-base-20190410/source/texk/web2c/pdftexdir/pdftosrc.cc.poppler-0.73 2019-05-23 15:50:17.850768522 -0400
|
||||
+++ texlive-base-20190410/source/texk/web2c/pdftexdir/pdftosrc.cc 2019-05-23 15:50:17.858768349 -0400
|
||||
@@ -109,7 +109,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) {
|
||||
@@ -118,7 +118,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)
|
||||
@@ -128,7 +128,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");
|
||||
@@ -161,7 +161,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());
|
||||
@@ -173,9 +173,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-20190410/source/texk/web2c/xetexdir/pdfimage.cpp.poppler-0.73 texlive-base-20190410/source/texk/web2c/xetexdir/pdfimage.cpp
|
||||
--- texlive-base-20190410/source/texk/web2c/xetexdir/pdfimage.cpp.poppler-0.73 2018-12-25 00:48:22.000000000 -0500
|
||||
+++ texlive-base-20190410/source/texk/web2c/xetexdir/pdfimage.cpp 2019-05-23 15:50:17.858768349 -0400
|
||||
@@ -78,26 +78,29 @@ pdf_get_rect(char* filename, int page_nu
|
||||
|
||||
Page* page = doc->getCatalog()->getPage(page_num);
|
||||
|
||||
- const PDFRectangle* r;
|
||||
+ PDFRectangle* r;
|
||||
+ const PDFRectangle* cr;
|
||||
switch (pdf_box) {
|
||||
default:
|
||||
case pdfbox_crop:
|
||||
- r = page->getCropBox();
|
||||
+ cr = page->getCropBox();
|
||||
break;
|
||||
case pdfbox_media:
|
||||
- r = page->getMediaBox();
|
||||
+ cr = page->getMediaBox();
|
||||
break;
|
||||
case pdfbox_bleed:
|
||||
- r = page->getBleedBox();
|
||||
+ cr = page->getBleedBox();
|
||||
break;
|
||||
case pdfbox_trim:
|
||||
- r = page->getTrimBox();
|
||||
+ cr = page->getTrimBox();
|
||||
break;
|
||||
case pdfbox_art:
|
||||
- r = page->getArtBox();
|
||||
+ cr = page->getArtBox();
|
||||
break;
|
||||
}
|
||||
|
||||
+ r = new PDFRectangle (cr->x1, cr->y1, cr->x2, cr->y2);
|
||||
+
|
||||
int RotAngle = 0;
|
||||
RotAngle = (int)page->getRotate() % 360;
|
||||
if (RotAngle < 0)
|
||||
@@ -112,6 +115,7 @@ pdf_get_rect(char* filename, int page_nu
|
||||
box->x = 72.27 / 72 * my_fmin(r->x1, r->x2);
|
||||
box->y = 72.27 / 72 * my_fmin(r->y1, r->y2);
|
||||
|
||||
+ delete r;
|
||||
delete doc;
|
||||
|
||||
return 0;
|
|
@ -0,0 +1,14 @@
|
|||
diff -up texlive-base-20190410/source/texk/kpathsea/mktexlsr.selinux texlive-base-20190410/source/texk/kpathsea/mktexlsr
|
||||
--- texlive-base-20190410/source/texk/kpathsea/mktexlsr.selinux 2018-01-16 19:55:32.000000000 -0500
|
||||
+++ texlive-base-20190410/source/texk/kpathsea/mktexlsr 2019-05-23 14:58:50.837886937 -0400
|
||||
@@ -228,7 +228,8 @@ for TEXMFLS_R in "$@"; do
|
||||
until PERMS=`kpsestat = "$db_file"`; do sleep 1; done
|
||||
chmod $PERMS "$db_file_tmp"
|
||||
rm -f "$db_file"
|
||||
- mv "$db_file_tmp" "$db_file"
|
||||
+ # selinux fix
|
||||
+ cp "$db_file_tmp" "$db_file"
|
||||
rm -rf "$db_dir_tmp"
|
||||
done
|
||||
|
||||
diff -up texlive-base-20190410/source/texk/texlive/linked_scripts/texlive/fmtutil.pl.selinux texlive-base-20190410/source/texk/texlive/linked_scripts/texlive/fmtutil.pl
|
|
@ -0,0 +1,22 @@
|
|||
diff -up texlive-base-20190410/source/texk/kpathsea/texmf.cnf.texinfo-fix texlive-base-20190410/source/texk/kpathsea/texmf.cnf
|
||||
--- texlive-base-20190410/source/texk/kpathsea/texmf.cnf.texinfo-fix 2019-05-23 15:03:28.928056938 -0400
|
||||
+++ texlive-base-20190410/source/texk/kpathsea/texmf.cnf 2019-05-23 15:06:38.997072248 -0400
|
||||
@@ -82,6 +82,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 = ~/.texlive2019/texmf-var
|
||||
|
||||
@@ -107,7 +110,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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,11 @@
|
|||
diff -up texlive-base-20180414/source/texk/web2c/synctexdir/synctex_parser.c.shh texlive-base-20180414/source/texk/web2c/synctexdir/synctex_parser.c
|
||||
--- texlive-base-20180414/source/texk/web2c/synctexdir/synctex_parser.c.shh 2019-03-19 11:02:44.303218932 -0400
|
||||
+++ texlive-base-20180414/source/texk/web2c/synctexdir/synctex_parser.c 2019-03-19 11:02:59.545857443 -0400
|
||||
@@ -6023,7 +6023,6 @@ synctex_scanner_p synctex_scanner_new_wi
|
||||
if ((scanner->reader = synctex_reader_init_with_output_file(scanner->reader, output, build_directory))) {
|
||||
return parse? synctex_scanner_parse(scanner):scanner;
|
||||
}
|
||||
- _synctex_error("No file?");
|
||||
return NULL;
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
diff -up ./scripts/pdfbook2/pdfbook2.py3 ./scripts/pdfbook2/pdfbook2
|
||||
--- ./scripts/pdfbook2/pdfbook2.py3 2016-11-25 13:32:54.000000000 -0500
|
||||
+++ ./scripts/pdfbook2/pdfbook2 2018-12-07 14:52:49.197436113 -0500
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
""" pdfbook2 - transform pdf files to booklets
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
@@ -29,11 +29,11 @@ import shutil
|
||||
|
||||
def booklify( name, opts ):
|
||||
#------------------------------------------------------ Check if file exists
|
||||
- print "\nProcessing", name
|
||||
+ print("\nProcessing", name)
|
||||
if not os.path.isfile( name ):
|
||||
- print "SKIP: file not found."
|
||||
+ print("SKIP: file not found.")
|
||||
return
|
||||
- print "Getting bounds...",
|
||||
+ print("Getting bounds...", end=' ')
|
||||
sys.stdout.flush()
|
||||
|
||||
#---------------------------------------------------------- useful constants
|
||||
@@ -50,8 +50,8 @@ def booklify( name, opts ):
|
||||
p.wait()
|
||||
out, err = p.communicate()
|
||||
if len( err ) != 0:
|
||||
- print err
|
||||
- print "\n\nABORT: Problem getting bounds"
|
||||
+ print(err)
|
||||
+ print("\n\nABORT: Problem getting bounds")
|
||||
sys.exit( 1 )
|
||||
lines = out.splitlines()
|
||||
bboxes = [s[len( bboxName ) + 1:] for s in lines if s.startswith( bboxName )]
|
||||
@@ -69,11 +69,11 @@ def booklify( name, opts ):
|
||||
minLOdd -= maxWidth - widthOdd
|
||||
maxREven += maxWidth - widthEven
|
||||
|
||||
- print "done"
|
||||
+ print("done")
|
||||
sys.stdout.flush()
|
||||
|
||||
#--------------------------------------------- crop file to area of interest
|
||||
- print "cropping...",
|
||||
+ print("cropping...", end=' ')
|
||||
sys.stdout.flush()
|
||||
p = subprocess.Popen( ["pdfcrop",
|
||||
"--bbox-odd", "{L} {T} {R} {B}".format( L = minLOdd - opts.innerMargin / 2,
|
||||
@@ -92,16 +92,16 @@ def booklify( name, opts ):
|
||||
p.wait()
|
||||
out, err = p.communicate()
|
||||
if len( err ) != 0:
|
||||
- print err
|
||||
- print "\n\nABORT: Problem with cropping"
|
||||
+ print(err)
|
||||
+ print("\n\nABORT: Problem with cropping")
|
||||
sys.exit( 1 )
|
||||
- print "done"
|
||||
+ print("done")
|
||||
sys.stdout.flush()
|
||||
else:
|
||||
shutil.copy( name, tmpFile )
|
||||
|
||||
#-------------------------------------------------------- create the booklet
|
||||
- print "create booklet...",
|
||||
+ print("create booklet...", end=' ')
|
||||
sys.stdout.flush()
|
||||
pdfJamCallList = [ "pdfjam",
|
||||
"--booklet", "true",
|
||||
@@ -124,7 +124,7 @@ def booklify( name, opts ):
|
||||
p.wait()
|
||||
out, err = p.communicate()
|
||||
if len( out ) == 0:
|
||||
- print "\n\nABORT: The everyshi.sty latex package is needed for short-edge."
|
||||
+ print("\n\nABORT: The everyshi.sty latex package is needed for short-edge.")
|
||||
sys.exit( 1 )
|
||||
else:
|
||||
pdfJamCallList.append( "--preamble" )
|
||||
@@ -139,7 +139,7 @@ def booklify( name, opts ):
|
||||
#-------------------------------------------- move file and remove temp file
|
||||
os.rename( tmpFile[:-4] + "-book.pdf", name[:-4] + "-book.pdf" )
|
||||
os.remove( tmpFile )
|
||||
- print "done"
|
||||
+ print("done")
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ if __name__ == "__main__":
|
||||
if len( args ) == 0:
|
||||
parser.print_version()
|
||||
parser.print_help()
|
||||
- print ""
|
||||
+ print("")
|
||||
sys.exit( 2 )
|
||||
|
||||
#------------------------------------------- run for each provided file name
|
241155
SOURCES/texlive.tlpdb
241155
SOURCES/texlive.tlpdb
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
diff -up source/texk/dvi2tty/dvi2tty-5.3.4/DVI.format source/texk/dvi2tty/dvi2tty-5.3.4/DVI
|
||||
diff -up source/texk/dvidvi/dvidvi.c.format source/texk/dvidvi/dvidvi.c
|
||||
--- source/texk/dvidvi/dvidvi.c.format 2015-07-28 21:21:51.170212574 -0400
|
||||
+++ source/texk/dvidvi/dvidvi.c 2015-07-28 21:22:27.842988620 -0400
|
||||
@@ -327,7 +327,7 @@ static void stringdvibuf(integer p, inte
|
||||
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) {
|
||||
|
@ -11,7 +11,7 @@ diff -up source/texk/dvidvi/dvidvi.c.format source/texk/dvidvi/dvidvi.c
|
|||
(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");
|
||||
@@ -806,7 +806,7 @@ default:
|
||||
@@ -828,7 +828,7 @@ default:
|
||||
} /* else argument with '-' */
|
||||
} /* for */
|
||||
if (*iname == 0) {
|
||||
|
@ -20,7 +20,7 @@ diff -up source/texk/dvidvi/dvidvi.c.format source/texk/dvidvi/dvidvi.c
|
|||
error("! no input file specified");
|
||||
}
|
||||
/* Inserted by djc@dsmail.hmi.de 3.8.1994 */
|
||||
@@ -817,7 +817,7 @@ default:
|
||||
@@ -839,7 +839,7 @@ default:
|
||||
}
|
||||
|
||||
if (*oname != 0 && !quiet) {
|
||||
|
@ -29,118 +29,9 @@ diff -up source/texk/dvidvi/dvidvi.c.format source/texk/dvidvi/dvidvi.c
|
|||
(void)fprintf(stderr, "%s -> %s\n",iname,oname);
|
||||
temp = nextstring ;
|
||||
}
|
||||
diff -up source/texk/ps2pk/objects.h.format source/texk/ps2pk/objects.h
|
||||
--- source/texk/ps2pk/objects.h.format 2015-07-28 21:24:03.356405337 -0400
|
||||
+++ source/texk/ps2pk/objects.h 2015-07-28 21:24:21.397295166 -0400
|
||||
@@ -231,7 +231,7 @@ struct xobject {
|
||||
/*SHARED*/
|
||||
/* NDW: personally, I want to see status and error messages! */
|
||||
#define IfTrace0(condition,model) \
|
||||
- {if (condition) printf(model);}
|
||||
+ {if (condition) printf("%s",model);}
|
||||
#define IfTrace1(condition,model,arg0) \
|
||||
{if (condition) printf(model,arg0);}
|
||||
#define IfTrace2(condition,model,arg0,arg1) \
|
||||
diff -up source/texk/web2c/cwebboot.cin.format source/texk/web2c/cwebboot.cin
|
||||
--- source/texk/web2c/cwebboot.cin.format 2015-07-28 21:24:28.351252699 -0400
|
||||
+++ source/texk/web2c/cwebboot.cin 2015-07-28 21:24:48.779127949 -0400
|
||||
@@ -1098,7 +1098,7 @@ void
|
||||
fatal(const char*s,const char*t)
|
||||
#line 1182 "cwebdir/common.w"
|
||||
{
|
||||
-if(*s)printf(s);
|
||||
+if(*s)printf("%s",s);
|
||||
err_print(t);
|
||||
history= fatal_message;exit(wrap_up());
|
||||
}
|
||||
diff -up source/texk/web2c/cwebdir/common.c.format source/texk/web2c/cwebdir/common.c
|
||||
--- source/texk/web2c/cwebdir/common.c.format 2015-07-28 21:24:56.764079186 -0400
|
||||
+++ source/texk/web2c/cwebdir/common.c 2015-07-28 21:25:24.830907788 -0400
|
||||
@@ -1063,7 +1063,7 @@ void
|
||||
fatal(s,t)
|
||||
char*s,*t;
|
||||
{
|
||||
-if(*s)printf(s);
|
||||
+if(*s)printf("%s",s);
|
||||
err_print(t);
|
||||
history= fatal_message;exit(wrap_up());
|
||||
}
|
||||
diff -up source/texk/web2c/cwebdir/common.w.format source/texk/web2c/cwebdir/common.w
|
||||
--- source/texk/web2c/cwebdir/common.w.format 2015-07-28 21:25:32.886858591 -0400
|
||||
+++ source/texk/web2c/cwebdir/common.w 2015-07-28 21:25:46.117777793 -0400
|
||||
@@ -1180,7 +1180,7 @@ concatenated to print the final error me
|
||||
fatal(s,t)
|
||||
char *s,*t;
|
||||
{
|
||||
- if (*s) printf(s);
|
||||
+ if (*s) printf("%s",s);
|
||||
err_print(t);
|
||||
history=fatal_message; exit(wrap_up());
|
||||
}
|
||||
diff -up source/texk/web2c/cwebdir/cweave.w.format source/texk/web2c/cwebdir/cweave.w
|
||||
--- source/texk/web2c/cwebdir/cweave.w.format 2015-07-28 21:25:55.096722960 -0400
|
||||
+++ source/texk/web2c/cwebdir/cweave.w 2015-07-28 21:26:13.680609471 -0400
|
||||
@@ -1784,7 +1784,7 @@ void
|
||||
print_cat(c) /* symbolic printout of a category */
|
||||
eight_bits c;
|
||||
{
|
||||
- printf(cat_name[c]);
|
||||
+ printf("%s",cat_name[c]);
|
||||
}
|
||||
|
||||
@ The token lists for translated \TEX/ output contain some special control
|
||||
diff -up source/texk/web2c/omegafonts/error_routines.c.format source/texk/web2c/omegafonts/error_routines.c
|
||||
--- source/texk/web2c/omegafonts/error_routines.c.format 2015-07-28 21:26:21.654560776 -0400
|
||||
+++ source/texk/web2c/omegafonts/error_routines.c 2015-07-28 21:27:54.356994659 -0400
|
||||
@@ -62,7 +62,7 @@ void
|
||||
yyerror(const_string fmt)
|
||||
{
|
||||
fprintf(stderr, "line %d (parsing): ", line_number);
|
||||
- fprintf(stderr, fmt);
|
||||
+ fprintf(stderr, "%s", fmt);
|
||||
fprintf(stderr, "\n");
|
||||
num_errors++;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ void
|
||||
warning_0(const_string fmt)
|
||||
{
|
||||
fprintf(stderr, "line %d (warning): ", line_number);
|
||||
- fprintf(stderr, fmt);
|
||||
+ fprintf(stderr, "%s", fmt);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ void
|
||||
fatal_error_0(const_string fmt)
|
||||
{
|
||||
fprintf(stderr, "line %d (fatal): ", line_number);
|
||||
- fprintf(stderr, fmt);
|
||||
+ fprintf(stderr, "%s", fmt);
|
||||
fprintf(stderr, "\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ void
|
||||
internal_error_0(const_string fmt)
|
||||
{
|
||||
fprintf(stderr, "line %d (internal): ", line_number);
|
||||
- fprintf(stderr, fmt);
|
||||
+ fprintf(stderr, "%s", fmt);
|
||||
fprintf(stderr, "\n");
|
||||
exit(2);
|
||||
}
|
||||
diff -up source/texk/web2c/omegafonts/out_routines.c.format source/texk/web2c/omegafonts/out_routines.c
|
||||
--- source/texk/web2c/omegafonts/out_routines.c.format 2015-07-28 21:28:09.547901891 -0400
|
||||
+++ source/texk/web2c/omegafonts/out_routines.c 2015-07-28 21:28:22.209824567 -0400
|
||||
@@ -368,5 +368,5 @@ out_digits(unsigned counter)
|
||||
void
|
||||
out(const_string sval)
|
||||
{
|
||||
- fprintf(file_output, sval);
|
||||
+ fprintf(file_output, "%s", sval);
|
||||
}
|
||||
diff -up source/texk/web2c/tiedir/tie.c.format source/texk/web2c/tiedir/tie.c
|
||||
--- source/texk/web2c/tiedir/tie.c.format 2015-07-28 21:28:30.242775511 -0400
|
||||
+++ source/texk/web2c/tiedir/tie.c 2015-07-28 21:29:04.979563380 -0400
|
||||
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 @@
|
||||
\
|
||||
|
||||
|
@ -158,35 +49,3 @@ diff -up source/texk/web2c/tiedir/tie.c.format source/texk/web2c/tiedir/tie.c
|
|||
|
||||
#define print2_ln(a,b){print2(a,b);term_new_line;}
|
||||
#define print3_ln(a,b,c){print3(a,b,c);term_new_line;} \
|
||||
diff -up source/texk/web2c/tiedir/tie.w.format source/texk/web2c/tiedir/tie.w
|
||||
--- source/texk/web2c/tiedir/tie.w.format 2015-07-28 21:29:13.361512193 -0400
|
||||
+++ source/texk/web2c/tiedir/tie.w 2015-07-28 21:30:18.135116633 -0400
|
||||
@@ -458,14 +458,14 @@ for terminating an output line and writi
|
||||
|
||||
@^system dependencies@>
|
||||
@d term_out stdout
|
||||
-@d print(a) fprintf(term_out,a) /* `|print|' means write on the terminal */
|
||||
+@d print(a) fprintf(term_out,"%s",a) /* `|print|' means write on the terminal */
|
||||
@d print2(a,b) fprintf(term_out,a,b) /* same with two arguments */
|
||||
@d print3(a,b,c) fprintf(term_out,a,b,c) /* same with three arguments */
|
||||
@d print_c(v) fputc(v,term_out); /* print a single character */
|
||||
@d new_line(v) fputc('\n',v) /* start new line */
|
||||
@d term_new_line new_line(term_out)
|
||||
/* start new line of the terminal */
|
||||
-@d print_ln(v) {fprintf(term_out,v);term_new_line;}
|
||||
+@d print_ln(v) {fprintf(term_out,"%s",v);term_new_line;}
|
||||
/* `|print|' and then start new line */
|
||||
@d print2_ln(a,b) {print2(a,b);term_new_line;} /* same with two arguments */
|
||||
@d print3_ln(a,b,c) {print3(a,b,c);term_new_line;}
|
||||
diff -up source/utils/devnag/src/devnag.c.format source/utils/devnag/src/devnag.c
|
||||
--- source/utils/devnag/src/devnag.c.format 2015-07-28 21:23:26.446630739 -0400
|
||||
+++ source/utils/devnag/src/devnag.c 2015-07-28 21:23:34.215583295 -0400
|
||||
@@ -2400,7 +2400,7 @@ void put_macro(short macro) {
|
||||
void err_ill(const char *str) {
|
||||
fprintf(stderr, "Error: illegal character(s) \"%s\" detected at line %d:\n",
|
||||
str, linenumber);
|
||||
- fprintf(stderr, inbuf);
|
||||
+ fprintf(stderr, "%s", inbuf);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,412 @@
|
|||
%global _use_internal_dependency_generator 0
|
||||
|
||||
%global tl_version 20180414
|
||||
%global tl_epoch 7
|
||||
%global shortname texlive
|
||||
%global source_name %{shortname}-%{tl_version}-source
|
||||
|
||||
%{!?_texdir: %global _texdir %{_datadir}/texlive}
|
||||
%{!?_texmf_var: %global _texmf_var %{_var}/lib/texmf}
|
||||
|
||||
# don't export private perl modules
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((PDF::Reuse.*|Pedigree.*|TeXLive.*|Tk::path_tre)\\)
|
||||
|
||||
%global _configure ../configure
|
||||
|
||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
# don't figure any perl requires
|
||||
%global __perl_requires %{nil}
|
||||
%global __find_provides %{nil}
|
||||
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
|
||||
%global __arch_install_post %{nil}
|
||||
|
||||
Name: texlive-extension
|
||||
Version: %{tl_version}
|
||||
Release: 2%{?dist}
|
||||
Epoch: %{tl_epoch}
|
||||
Summary: TeX formatting system
|
||||
Group: Applications/Publishing
|
||||
License: Artistic 2.0 and GPLv2 and GPLv2+ and LGPLv2+ and LPPL and MIT and Public Domain and UCD and Utopia
|
||||
URL: http://tug.org/texlive/
|
||||
|
||||
BuildRequires: xz
|
||||
BuildRequires: libXaw-devel
|
||||
BuildRequires: libXi-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: file
|
||||
BuildRequires: perl(Digest::MD5)
|
||||
BuildRequires: texinfo
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gd-devel
|
||||
%if 0%{?system_teckit}
|
||||
BuildRequires: teckit-devel >= 2.5.7
|
||||
%endif
|
||||
BuildRequires: freetype-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: poppler-devel
|
||||
BuildRequires: zziplib-devel
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: cairo-devel
|
||||
BuildRequires: harfbuzz-devel
|
||||
#BuildRequires: perl-generators
|
||||
BuildRequires: pixman-devel
|
||||
BuildRequires: graphite2-devel
|
||||
BuildRequires: ghostscript-devel
|
||||
BuildRequires: libpaper-devel
|
||||
%if 0%{?system_potrace}
|
||||
BuildRequires: potrace-devel
|
||||
%endif
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: mpfr-devel
|
||||
BuildRequires: chrpath
|
||||
|
||||
Source0: ftp://tug.org/historic/systems/texlive/2018/%{source_name}.tar.xz
|
||||
Source1: texlive-licenses.tar.xz
|
||||
# chktex
|
||||
Source50: http://ctan.math.illinois.edu/systems/texlive/tlnet/archive/chktex.doc.tar.xz
|
||||
Source51: http://ctan.math.illinois.edu/systems/texlive/tlnet/archive/chktex.tar.xz
|
||||
# German language support
|
||||
Source0489: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/babel-german.tar.xz
|
||||
Source0490: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/babel-german.doc.tar.xz
|
||||
Source2753: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/german.tar.xz
|
||||
Source2754: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/german.doc.tar.xz
|
||||
Source2756: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/germbib.tar.xz
|
||||
Source2757: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/germbib.doc.tar.xz
|
||||
Source4788: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/nomencl.tar.xz
|
||||
Source4789: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/nomencl.doc.tar.xz
|
||||
# add missing translator.sty
|
||||
Source8032: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/translator.tar.xz
|
||||
Source8033: ftp://tug.org/historic/systems/texlive/2018/tlnet-final/archive/translator.doc.tar.xz
|
||||
|
||||
Patch1: tl-kpfix.patch
|
||||
Patch2: tl-format.patch
|
||||
Patch3: texlive-20180414-selinux-context.patch
|
||||
Patch5: texlive-2016-kpathsea-texlive-path.patch
|
||||
# fixes from arch and upstream texlive for poppler 0.6x
|
||||
Patch7: texlive-20180414-new-poppler.patch
|
||||
# XML validity
|
||||
Patch8: texlive-20180414-xml.patch
|
||||
# python3 support and mangling shebang
|
||||
Patch9: texlive-2017-python3.patch
|
||||
# fix for poppler-0.63
|
||||
Patch10: texlive-20180414-poppler-0.63.patch
|
||||
# annocheck distro flag failures
|
||||
Patch11: texlive-20180414-annocheck.patch
|
||||
# CVE-2018-17407
|
||||
Patch12: texlive-20180414-CVE-2018-17407.patch
|
||||
# covscan
|
||||
Patch13: texlive-20180414-covscan.patch
|
||||
|
||||
%description
|
||||
%name includes many texlive extension which are dropped in RHEL
|
||||
|
||||
%package -n %{shortname}-chktex
|
||||
Provides: tex-chktex = %{epoch}:%{tl_version}-%{release}
|
||||
Provides: texlive-chktex-bin = %{epoch}:%{tl_version}-%{release}
|
||||
Provides: tex-chktex-bin = %{epoch}:%{tl_version}-%{release}
|
||||
Obsoletes: texlive-chktex-bin < 7:20170520
|
||||
Provides: tex-chktex-doc = %{epoch}:%{tl_version}-%{release}
|
||||
Provides: texlive-chktex-doc = %{epoch}:%{tl_version}-%{release}
|
||||
Obsoletes: texlive-chktex-doc < 7:20170520
|
||||
License: GPL+
|
||||
Summary: Check for errors in LaTeX documents
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea
|
||||
|
||||
%description -n %{shortname}-chktex
|
||||
The program reports typographic and other errors in LaTeX
|
||||
documents. Filters are also provided for checking the LaTeX
|
||||
parts of CWEB documents.
|
||||
|
||||
%package -n %{shortname}-lacheck
|
||||
Provides: tex-lacheck = %{epoch}:%{tl_version}-%{release}
|
||||
Provides: texlive-lacheck-bin = %{epoch}:%{tl_version}-%{release}
|
||||
Provides: tex-lacheck-bin = %{epoch}:%{tl_version}-%{release}
|
||||
Obsoletes: texlive-lacheck-bin < 7:20170520
|
||||
License: GPL+
|
||||
Summary: LaTeX checker
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea
|
||||
|
||||
%description -n %{shortname}-lacheck
|
||||
Lacheck is a tool for finding common mistakes in LaTeX
|
||||
documents. The distribution includes sources, and executables
|
||||
for OS/2 and Win32 environments.
|
||||
|
||||
%package -n %{shortname}-babel-german
|
||||
Provides: tex-babel-german = %{tl_version}
|
||||
License: LPPL 1.3
|
||||
Summary: Babel support for documents written in German
|
||||
BuildArch: noarch
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea-bin, tex-kpathsea
|
||||
Provides: tex(austrian.ldf) = %{tl_version}
|
||||
Provides: tex(german.ldf) = %{tl_version}
|
||||
Provides: tex(germanb.ldf) = %{tl_version}
|
||||
Provides: tex(naustrian.ldf) = %{tl_version}
|
||||
Provides: tex(ngerman.ldf) = %{tl_version}
|
||||
Provides: tex(ngermanb.ldf) = %{tl_version}
|
||||
Provides: tex(nswissgerman.ldf) = %{tl_version}
|
||||
Provides: tex(swissgerman.ldf) = %{tl_version}
|
||||
|
||||
%description -n %{shortname}-babel-german
|
||||
The package defines LaTeX support, within the Babel package, of
|
||||
German (including its Austrian dialect), in both 'old' and
|
||||
'new' orthographies.
|
||||
|
||||
%package -n %{shortname}-german
|
||||
Provides: tex-german = %{tl_version}
|
||||
License: LPPL
|
||||
Summary: Support for German typography
|
||||
BuildArch: noarch
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea-bin, tex-kpathsea
|
||||
Provides: tex(german.sty) = %{tl_version}
|
||||
Provides: tex(ngerman.sty) = %{tl_version}
|
||||
|
||||
%description -n %{shortname}-german
|
||||
Supports the new German orthography (neue deutsche
|
||||
Rechtschreibung).
|
||||
|
||||
%package -n %{shortname}-germbib
|
||||
Provides: tex-germbib = %{tl_version}
|
||||
License: Bibtex
|
||||
Summary: German variants of standard BibTeX styles
|
||||
BuildArch: noarch
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea-bin, tex-kpathsea
|
||||
Requires: tex(german.sty)
|
||||
Provides: tex(bibgerm.sty) = %{tl_version}
|
||||
Provides: tex(mynormal.sty) = %{tl_version}
|
||||
|
||||
%description -n %{shortname}-germbib
|
||||
A development of the (old) german.sty, this bundle provides
|
||||
German packages, BibTeX styles and documentary examples, for
|
||||
writing documents with bibliographies. The author has since
|
||||
developed the babelbib bundle, which (he asserts) supersedes
|
||||
germbib.
|
||||
|
||||
|
||||
%package -n %{shortname}-nomencl
|
||||
Provides: tex-nomencl = %{tl_version}
|
||||
License: LPPL
|
||||
Summary: Produce lists of symbols as in nomenclature
|
||||
BuildArch: noarch
|
||||
Requires: texlive-base
|
||||
Requires: texlive-kpathsea-bin, tex-kpathsea
|
||||
Provides: tex(nomencl.sty) = %{tl_version}
|
||||
Provides: tex(sample01.cfg) = %{tl_version}
|
||||
Provides: tex(sample02.cfg) = %{tl_version}
|
||||
Provides: tex(sample04.cfg) = %{tl_version}
|
||||
Provides: tex(sample05.cfg) = %{tl_version}
|
||||
|
||||
%description -n %{shortname}-nomencl
|
||||
Produces lists of symbols using the capabilities of the
|
||||
MakeIndex program.
|
||||
|
||||
%package -n %{shortname}-translator
|
||||
Summary: Easy translation of strings in LaTeX
|
||||
BuildArch: noarch
|
||||
License: LPPL or GPL+
|
||||
Requires: texlive-base texlive-kpathsea
|
||||
Requires: tex(keyval.sty)
|
||||
Provides: tex(translator.sty) = %{tl_version}
|
||||
|
||||
%description -n %{shortname}-translator
|
||||
This LaTeX package provides a flexible mechanism for
|
||||
translating individual words into different languages. For
|
||||
example, it can be used to translate a word like "figure" into,
|
||||
say, the German word "Abbildung". Such a translation mechanism
|
||||
is useful when the author of some package would like to
|
||||
localize the package such that texts are correctly translated
|
||||
into the language preferred by the user. This package is not
|
||||
intended to be used to automatically translate more than a few
|
||||
words.
|
||||
|
||||
%prep
|
||||
%setup -q -c -T -a 0 -a 1
|
||||
[ -e %{source_name} ] && mv %{source_name} source
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch5 -p0
|
||||
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8
|
||||
%patch7 -p1 -b .newpoppler
|
||||
%patch10 -p1 -b .poppler-0.63.0
|
||||
%endif
|
||||
%patch11 -p1 -b .annocheck
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
cd source
|
||||
PREF=`pwd`/inst
|
||||
rm -rf texk/
|
||||
mkdir -p work
|
||||
cd work
|
||||
%configure \
|
||||
--prefix=$PREF --datadir=$PREF \
|
||||
--libdir=$PREF/lib \
|
||||
--includedir=$PREF/include \
|
||||
--datarootdir=$PREF/share \
|
||||
--mandir=$PREF/share/man \
|
||||
--infodir=$PREF/share/info \
|
||||
--exec_prefix=$PREF \
|
||||
--bindir=$PREF/bin \
|
||||
--with-system-zlib \
|
||||
--with-system-libpng \
|
||||
--with-system-xpdf \
|
||||
--with-system-gd \
|
||||
%if 0%{?system_teckit}
|
||||
--with-system-teckit \
|
||||
%endif
|
||||
--with-system-freetype2 \
|
||||
--with-system-poppler \
|
||||
--with-system-zziplib \
|
||||
--with-system-cairo \
|
||||
--with-system-icu \
|
||||
--with-system-harfbuzz \
|
||||
--with-system-graphite2 \
|
||||
--with-system-libgs \
|
||||
--with-system-pixman \
|
||||
--with-system-libpaper \
|
||||
%if 0%{?system_potrace}
|
||||
--with-system-potrace \
|
||||
%endif
|
||||
--with-pic \
|
||||
--with-xdvi-x-toolkit=xaw \
|
||||
--with-system-mpfr \
|
||||
--with-system-gmp \
|
||||
--disable-xindy \
|
||||
--disable-xindy-docs \
|
||||
--disable-xindy-make-rules \
|
||||
--enable-shared \
|
||||
--enable-compiler-warnings=max \
|
||||
--without-cxx-runtime-hack \
|
||||
--disable-native-texlive-build \
|
||||
--disable-t1utils \
|
||||
--disable-t1lib \
|
||||
--disable-psutils \
|
||||
--disable-biber \
|
||||
--disable-ptexenc \
|
||||
--disable-largefile \
|
||||
%ifarch aarch64 %{mips} %{power64} s390 s390x x86_64
|
||||
--disable-luajittex \
|
||||
--disable-mfluajit \
|
||||
%endif
|
||||
--disable-texk \
|
||||
--disable-rpath
|
||||
|
||||
# disable rpath
|
||||
for i in `find . -name libtool`; do
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $i
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $i
|
||||
done
|
||||
|
||||
make world %{?_smp_mflags} STRIPPROG=/bin/true STRIP=/bin/true
|
||||
|
||||
%install
|
||||
# create directory tree
|
||||
mkdir -p %{buildroot}%{_texdir}/../texmf
|
||||
mkdir -p %{buildroot}%{_texdir}/texmf-config/web2c
|
||||
mkdir -p %{buildroot}%{_texmf_var}
|
||||
mkdir -p %{buildroot}%{_texdir}/texmf-dist
|
||||
mkdir -p %{buildroot}%{_texdir}/texmf-local
|
||||
|
||||
# install lacheck and chktex
|
||||
mkdir -p %{buildroot}%{_bindir} %{buildroot}%{_mandir}/man1
|
||||
for f in lacheck chktex chkweb deweb ; do
|
||||
cp -a source/inst/bin/$f %{buildroot}%{_bindir}
|
||||
cp -a source/inst/share/man/man1/$f* %{buildroot}%{_mandir}/man1/
|
||||
done
|
||||
|
||||
# extract sources
|
||||
# chktex
|
||||
xz -dc %{SOURCE50} | tar x -C %{buildroot}%{_texdir}/
|
||||
xz -dc %{SOURCE51} | tar x -C %{buildroot}%{_texdir}/
|
||||
# babel-german
|
||||
xz -dc %{SOURCE489} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
xz -dc %{SOURCE490} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
# german
|
||||
xz -dc %{SOURCE2753} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
xz -dc %{SOURCE2754} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
# germbib
|
||||
xz -dc %{SOURCE2756} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
xz -dc %{SOURCE2757} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
# nomencl
|
||||
xz -dc %{SOURCE4788} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
xz -dc %{SOURCE4789} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
# translator
|
||||
xz -dc %{SOURCE8032} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
xz -dc %{SOURCE8033} | tar x -C %{buildroot}%{_texdir}/texmf-dist
|
||||
|
||||
# nuke useless tlmgr packaging stuff and doc droppings
|
||||
rm -rf %{buildroot}%{_texdir}/tlpkg
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/tlpkg
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/man
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/info
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/texlive/texlive-common/tlmgr*
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/texlive/texlive-common/tlcockpit-packages.png
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/doc/texlive/texlive-common/tlshell-macos.png
|
||||
|
||||
# Also nuke any sources that come out
|
||||
rm -rf %{buildroot}%{_texdir}/texmf-dist/source
|
||||
|
||||
%files -n %{shortname}-chktex
|
||||
%license gpl.txt
|
||||
%{_bindir}/chktex
|
||||
%{_bindir}/chkweb
|
||||
%{_bindir}/deweb
|
||||
%{_mandir}/man1/chktex.1*
|
||||
%{_mandir}/man1/chkweb.1*
|
||||
%{_mandir}/man1/deweb.1*
|
||||
%{_texdir}/texmf-dist/chktex/
|
||||
%{_texdir}/texmf-dist/scripts/chktex/
|
||||
%doc %{_texdir}/texmf-dist/doc/chktex/
|
||||
|
||||
%files -n %{shortname}-lacheck
|
||||
%license gpl.txt
|
||||
%{_bindir}/lacheck
|
||||
%{_mandir}/man1/lacheck.1*
|
||||
|
||||
%files -n %{shortname}-babel-german
|
||||
%license lppl1.3.txt
|
||||
%{_texdir}/texmf-dist/tex/generic/babel-german/
|
||||
%doc %{_texdir}/texmf-dist/doc/generic/babel-german/
|
||||
|
||||
%files -n %{shortname}-german
|
||||
%license lppl1.txt
|
||||
%{_texdir}/texmf-dist/tex/generic/german/
|
||||
%doc %{_texdir}/texmf-dist/doc/generic/german/
|
||||
|
||||
%files -n %{shortname}-germbib
|
||||
%{_texdir}/texmf-dist/bibtex/bst/germbib/
|
||||
%{_texdir}/texmf-dist/tex/latex/germbib/
|
||||
%doc %{_texdir}/texmf-dist/doc/bibtex/germbib/
|
||||
|
||||
%files -n %{shortname}-nomencl
|
||||
%license lppl1.txt
|
||||
%{_texdir}/texmf-dist/makeindex/nomencl/
|
||||
%{_texdir}/texmf-dist/tex/latex/nomencl/
|
||||
%doc %{_texdir}/texmf-dist/doc/latex/nomencl/
|
||||
|
||||
%files -n %{shortname}-translator
|
||||
%license lppl1.3.txt
|
||||
%license gpl.txt
|
||||
%{_texdir}/texmf-dist/tex/latex/translator/
|
||||
%doc %{_texdir}/texmf-dist/doc/latex/translator/
|
||||
|
||||
%changelog
|
||||
* Fri Feb 28 2020 Than Ngo <than@redhat.com> - 20180414-2
|
||||
- added lacheck and chktex
|
||||
|
||||
* Mon Jan 13 2020 Than Ngo <than@redhat.com> - 20180414-1
|
||||
- initial rpm for rhel8
|
Loading…
Reference in New Issue