summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/updmap.pl115
1 files changed, 100 insertions, 15 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
index 54db7e1a3d9..5eb985459aa 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: updmap.pl 31320 2013-07-31 01:49:38Z preining $
+# $Id: updmap.pl 31440 2013-08-15 22:39:10Z karl $
# updmap - maintain map files for outline fonts.
# (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
#
@@ -34,7 +34,7 @@ BEGIN {
}
-my $version = '$Id: updmap.pl 31320 2013-07-31 01:49:38Z preining $';
+my $version = '$Id: updmap.pl 31440 2013-08-15 22:39:10Z karl $';
use Getopt::Long qw(:config no_autoabbrev ignore_case_always);
use strict;
@@ -1059,6 +1059,7 @@ sub mkMaps {
print_and_log (sprintf(" [%3d files]\n\n", scalar @notmixedmaps));
only_log("\n");
+ my $first_time_creation_in_usermode = 0;
# Create psfonts_t1.map, psfonts_pk.map, ps2pk.map and pdftex.map:
my $dvipsoutputdir = $opts{'dvipsoutputdir'};
my $pdftexoutputdir = $opts{'pdftexoutputdir'};
@@ -1076,6 +1077,9 @@ sub mkMaps {
push @managed_files, "$pxdvioutputdir/xdvi-ptex.map"
if ($pxdviUse eq "true");
for my $file (@managed_files) {
+ if (!$opts{'sys'} && ! -r $file) {
+ $first_time_creation_in_usermode = 1;
+ }
open FILE, ">$file";
print FILE "% $file:\
% maintained by updmap[-sys] (multi).\
@@ -1214,25 +1218,49 @@ sub mkMaps {
}
}
+ sub check_mismatch {
+ my ($mm, $d, $f, $prog) = @_;
+ chomp (my $kpsefound = `kpsewhich --progname=$prog $f`);
+ if (lc("$d/$f") ne lc($kpsefound)) {
+ $mm->{$f} = $kpsefound;
+ }
+ }
+
+ my %mismatch;
my $d;
$d = "$dvipsoutputdir";
print_and_log(" $d:\n");
foreach my $f ('builtin35.map', 'download35.map', 'psfonts_pk.map',
'psfonts_t1.map', 'ps2pk.map', 'psfonts.map') {
dir ($d, $f, 'psfonts.map');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "dvips");
+ }
}
$d = "$pdftexoutputdir";
print_and_log(" $d:\n");
foreach my $f ('pdftex_dl14.map', 'pdftex_ndl14.map', 'pdftex.map') {
dir ($d, $f, 'pdftex.map');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "pdftex");
+ }
}
$d="$dvipdfmxoutputdir";
print_and_log(" $d:\n");
foreach my $f ('kanjix.map') {
dir ($d, $f, '');
- $updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "dvipdfmx");
+ }
}
if ($pxdviUse eq "true") {
$d="$pxdvioutputdir";
@@ -1240,8 +1268,59 @@ sub mkMaps {
foreach my $f ('xdvi-ptex.map') {
dir ($d, $f, '');
$updLSR->{add}("$d/$f") unless $opts{'dry-run'};
+ if (!$opts{'dry-run'}) {
+ $updLSR->{add}("$d/$f");
+ $updLSR->{exec}();
+ $updLSR->{reset}();
+ check_mismatch(\%mismatch, $d, $f, "xdvi");
+ }
}
}
+
+ # all kind of warning messages
+ if ($first_time_creation_in_usermode) {
+ print_and_log("
+WARNING: you are switching to updmap's per-user mappings.
+
+You have run updmap (as opposed to updmap-sys) for the first time; this
+has created configuration files which are local to your personal account.
+
+Any changes in system map files will *not* be automatically reflected in
+your files; furthermore, running updmap-sys will no longer have any
+effect for you. As a consequence, you have to rerun updmap yourself
+after any change in the system directories; for example, if a new font
+package is added.
+
+If you want to undo this, remove the files mentioned above.
+
+(Run $prg --help for full documentation of updmap.)
+");
+ }
+
+ if (keys %mismatch) {
+ print_and_log("
+WARNING: $prg has found mismatched files!
+
+The following files have been generated as listed above,
+but will not be found because overriding files exist, listed below.
+");
+ #
+ if ($prg eq "updmap-sys") {
+ print_and_log ("
+Perhaps you have run updmap in the past, but are running updmap-sys
+now. Once you run updmap the first time, you have to keep using it,
+or else remove the personal configuration files it creates (the ones
+listed below).
+");
+ }
+ #
+ for my $f (sort keys %mismatch) {
+ print_and_log (" $f: $mismatch{$f}\n");
+ }
+ #
+ print_and_log("(Run $prg --help for full documentation of updmap.)\n");
+ }
+
close LOG unless $opts{'dry-run'};
print "\nTranscript written on \"$logfile\".\n" if !$opts{'quiet'};
@@ -2062,9 +2141,8 @@ sub warning {
print STDERR @_;
}
-#
-# help, version etc etc
-#
+
+# help, version.
sub version {
my $ret = sprintf "%s (TeX Live, multi) version %s\n", $prg, $version;
@@ -2084,6 +2162,12 @@ Among other things, these map files are used to determine which fonts
should be used as bitmaps and which as outlines, and to determine which
font files are included in the PDF or PostScript output.
+updmap-sys is intended to affect the system-wide configuration, while
+updmap affects personal configuration files only, overriding the system
+files. As a consequence, once updmap has been run, even a single time,
+running updmap-sys no longer has any effect. (updmap-sys issues a
+warning in this situation.)
+
By default, the TeX filename database (ls-R) is also updated.
Options:
@@ -2099,7 +2183,7 @@ Options:
--force recreate files even if config hasn't changed
--nomkmap do not recreate map files
--nohash do not run texhash
- --sys run in system wide mode (equivalent to updmap-sys)
+ --sys affect system-wide files (equivalent to updmap-sys)
-n, --dry-run only show the configuration, no output
--quiet, --silent reduce verbosity
@@ -2130,19 +2214,20 @@ KanjiMap entries are added to psfonts_t1.map and kanjix.map.
Explanation of the OPTION names for --showoptions, --showoption, --setoption:
- dvipsPreferOutline true|false (default true)
+ dvipsPreferOutline true,false (default true)
Whether dvips uses bitmaps or outlines, when both are available.
- dvipsDownloadBase35 true|false (default true)
+ dvipsDownloadBase35 true,false (default true)
Whether dvips includes the standard 35 PostScript fonts in its output.
- pdftexDownloadBase14 true|false (default true)
+ pdftexDownloadBase14 true,false (default true)
Whether pdftex includes the standard 14 PDF fonts in its output.
- pxdviUse true|false (default false)
+ pxdviUse true,false (default false)
Whether maps for pxdvi (Japanese-patched xdvi) are under updmap's control.
kanjiEmbed (any string)
kanjiVariant (any string)
See below.
- LW35 URWkb|URW|ADOBEkb|ADOBE (default URWkb)
+ LW35 URWkb,URW,ADOBEkb,ADOBE (default URWkb)
Adapt the font and file names of the standard 35 PostScript fonts.
+
URWkb URW fonts with "berry" filenames (e.g. uhvbo8ac.pfb)
URW URW fonts with "vendor" filenames (e.g. n019064l.pfb)
ADOBEkb Adobe fonts with "berry" filenames (e.g. phvbo8an.pfb)
@@ -2257,7 +2342,7 @@ Explanation of trees and files normally used:
For step-by-step instructions on making new fonts known to TeX, read
http://tug.org/fonts/fontinstall.html. For even more terse
-instructions, read the beginning of updmap.cfg.
+instructions, read the beginning of the main updmap.cfg.
Report bugs to: tex-k\@tug.org
TeX Live home page: <http://tug.org/texlive/>