1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
$NetBSD: patch-bin_fmtutil,v 1.5 2018/05/13 10:41:47 markd Exp $
--- bin/fmtutil.orig 2017-11-21 07:07:45.000000000 +0000
+++ bin/fmtutil
@@ -14,7 +14,7 @@ my $TEXMFROOT;
BEGIN {
$^W = 1;
- $TEXMFROOT = `kpsewhich -var-value=TEXMFROOT`;
+ $TEXMFROOT = `@KPSEWHICH@ -var-value=TEXMFROOT`;
if ($?) {
die "$0: kpsewhich -var-value=TEXMFROOT failed, aborting early.\n";
}
@@ -70,12 +70,12 @@ TeXLive::TLUtils::prepend_own_path();
# this function checks by itself whether it is running on windows or not
reset_root_home();
-chomp(our $TEXMFDIST = `kpsewhich --var-value=TEXMFDIST`);
-chomp(our $TEXMFVAR = `kpsewhich -var-value=TEXMFVAR`);
-chomp(our $TEXMFSYSVAR = `kpsewhich -var-value=TEXMFSYSVAR`);
-chomp(our $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
-chomp(our $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
-chomp(our $TEXMFHOME = `kpsewhich -var-value=TEXMFHOME`);
+chomp(our $TEXMFDIST = `@KPSEWHICH@ --var-value=TEXMFDIST`);
+chomp(our $TEXMFVAR = `@KPSEWHICH@ -var-value=TEXMFVAR`);
+chomp(our $TEXMFSYSVAR = `@KPSEWHICH@ -var-value=TEXMFSYSVAR`);
+chomp(our $TEXMFCONFIG = `@KPSEWHICH@ -var-value=TEXMFCONFIG`);
+chomp(our $TEXMFSYSCONFIG = `@KPSEWHICH@ -var-value=TEXMFSYSCONFIG`);
+chomp(our $TEXMFHOME = `@KPSEWHICH@ -var-value=TEXMFHOME`);
# make sure that on windows *everything* is in lower case for comparison
if (win32()) {
@@ -254,7 +254,7 @@ sub main {
for my $e (sort @all_engines) {
my $hf = $alldata->{'merged'}{$f}{$e}{'hyphen'};
next if ($hf eq '-');
- my $ff = `kpsewhich -progname='$f' -format=tex '$hf'`;
+ my $ff = `@KPSEWHICH@ -progname='$f' -format=tex '$hf'`;
chomp($ff);
if ($ff ne "") {
if ($#all_engines > 0) {
@@ -494,13 +494,13 @@ sub select_and_rebuild_format {
if ($fmthyp ne '-') {
if ($whatarg =~ m!^/!) {
# $whatarg is a full path, we need to expand $fmthyp, too
- chomp (my $fmthyplong = `kpsewhich -progname=$fmt -engine=$eng $fmthyp`) ;
+ chomp (my $fmthyplong = `@KPSEWHICH@ -progname=$fmt -engine=$eng $fmthyp`) ;
if ($fmthyplong) {
$fmthyp = $fmthyplong;
} else {
# we might have searched language.dat --engine=tex --progname=tex
# which will not work. Search again without engine/format
- chomp ($fmthyplong = `kpsewhich $fmthyp`) ;
+ chomp ($fmthyplong = `@KPSEWHICH@ $fmthyp`) ;
if ($fmthyplong) {
$fmthyp = $fmthyplong;
} else {
@@ -595,7 +595,7 @@ sub rebuild_one_format {
else { $prgswitch .= $fmt; }
# check for existence of ini file before doing anything else
- if (system("kpsewhich -progname=$fmt -format=$kpsefmt $inifile >$nul 2>&1") != 0) {
+ if (system("@KPSEWHICH@ -progname=$fmt -format=$kpsefmt $inifile >$nul 2>&1") != 0) {
# we didn't find the ini file, skip
print_deferred_warning("inifile $inifile for $fmt/$eng not found.\n");
# The original script just skipped it but in TeX Live we expect that
@@ -624,7 +624,7 @@ sub rebuild_one_format {
$texargs = $addargs;
}
if ($pool) {
- chomp ( my $poolfile = `kpsewhich -progname=$eng $pool.poo 2>$nul` );
+ chomp ( my $poolfile = `@KPSEWHICH@ -progname=$eng $pool.poo 2>$nul` );
if ($poolfile && -f $poolfile) {
print_verbose("attempting to create localized format "
. "using pool=$pool and tcx=$tcx.\n");
@@ -1016,7 +1016,7 @@ sub determine_config_files {
# in the list is the one where changes will be written to.
($changes_config_file) = @{$opts{'cnffile'}};
} else {
- my @all_files = `kpsewhich -all $fn`;
+ my @all_files = `@KPSEWHICH@ -all $fn`;
chomp(@all_files);
my @used_files;
for my $f (@all_files) {
@@ -1026,10 +1026,10 @@ sub determine_config_files {
my $TEXMFLOCALVAR;
my @TEXMFLOCAL;
if (win32()) {
- chomp($TEXMFLOCALVAR =`kpsewhich --expand-path=\$TEXMFLOCAL`);
+ chomp($TEXMFLOCALVAR =`@KPSEWHICH@ --expand-path=\$TEXMFLOCAL`);
@TEXMFLOCAL = map { lc } split(/;/ , $TEXMFLOCALVAR);
} else {
- chomp($TEXMFLOCALVAR =`kpsewhich --expand-path='\$TEXMFLOCAL'`);
+ chomp($TEXMFLOCALVAR =`@KPSEWHICH@ --expand-path='\$TEXMFLOCAL'`);
@TEXMFLOCAL = split /:/ , $TEXMFLOCALVAR;
}
#
|