summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-01-10 04:33:14 +0000
committerNorbert Preining <preining@logic.at>2012-01-10 04:33:14 +0000
commit22f6dff338ab7828c368bb8e9a67f34ff9475dfd (patch)
treecdc9fca61940fc5fd3cb0363a077f1ba628f5217 /Master/texmf
parent670704c76cc5c7ea3f3afbdbac27210ea7e97693 (diff)
support reading updmap-local.cfg file in mupdmap
git-svn-id: svn://tug.org/texlive/trunk@25067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/mupdmap.pl36
1 files changed, 31 insertions, 5 deletions
diff --git a/Master/texmf/scripts/texlive/mupdmap.pl b/Master/texmf/scripts/texlive/mupdmap.pl
index 440fcd41d18..c46a873a9ef 100755
--- a/Master/texmf/scripts/texlive/mupdmap.pl
+++ b/Master/texmf/scripts/texlive/mupdmap.pl
@@ -1,5 +1,6 @@
#!/usr/bin/env perl
# mupdmap: utility to maintain map files for outline fonts.
+# $Id$
#
# Copyright 2011, 2012 Norbert Preining
# This file is licensed under the GNU General Public License version 2
@@ -13,9 +14,11 @@
# Anyone may freely use, modify, and/or distribute this file, without
# limitation.
#
-# TODO TODO
-# it seems that the entries from KanjiMap end up in the dvips
-# config file where it should NOT end up!!!
+# TODO after inclusion in TL:
+# - remove the special code that excludes TEXMFMAIN and reorder the rest,
+# should not be necessary anymore
+# - after TL2012? Maybe remove support for reading updmap-local.cfg
+#
my $TEXMFROOT;
@@ -202,7 +205,16 @@ sub main {
}
}
}
- if ($found) {
+ my $old_updmap_local_found = 0;
+ if (-r "$TMLabs/web2c/updmap-local.cfg") {
+ $old_updmap_local_found = 1;
+ warning("Old configuration file TEXMFLOCAL/web2c/updmap-local.cfg found!\n");
+ if ($found) {
+ warning("Will read this file *instead* of TEXMFLOCAL/web2c/updmap.cfg!!!\n");
+ }
+ warning("Please consider moving the information from updmap-local.cfg to TEXMFLOCAL/web2c/updmap.cfg\n");
+ }
+ if ($found || $old_updmap_local_found) {
my @tmp;
my $local_pushed = 0;
for my $f (@used_files) {
@@ -212,7 +224,11 @@ sub main {
if (!$local_pushed) {
# should we use the return value of grep here, but we know
# what we will find?!?!
- push @tmp, "$TEXMFLOCAL/web2c/updmap.cfg";
+ if ($old_updmap_local_found) {
+ push @tmp, "$TEXMFLOCAL/web2c/updmap-local.cfg";
+ } else {
+ push @tmp, "$TEXMFLOCAL/web2c/updmap.cfg";
+ }
$local_pushed = 1;
}
# push the original
@@ -1506,6 +1522,7 @@ sub read_updmap_files {
sub read_updmap_file {
my $fn = shift;
+ my $is_old_local = ($fn =~ m/updmap-local.cfg/ ? 1 : 0);
my %data;
if (!open(FN,"<$fn")) {
die ("Cannot read $fn: $!");
@@ -1519,6 +1536,15 @@ sub read_updmap_file {
for (@lines) {
$i++;
chomp;
+ if ($is_old_local) {
+ # in case we read an old updmap-local.cfg we have to make sure
+ # that the disable lines
+ # ^#!foo.map
+ # are rewritten to proper disable lines
+ # ^#! Map foo.map
+ # we are guessing here the type of the map (namely Map)
+ $_ =~ s/^#!([^ ])/#! Map $1/;
+ }
next if /^\s*$/;
next if /^\s*#$/;
next if /^\s*#[^!]/;