summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2012-01-19 00:41:48 +0000
committerNorbert Preining <preining@logic.at>2012-01-19 00:41:48 +0000
commit6cece0d4d6a1fe506048de6a7b15d1f01b9b133d (patch)
treef0f8501fc0f091f35bafc8a6cf5ed15fc5f957f6
parent19b5e94fbacf01a42023c8ff862c8b80f637e1ef (diff)
allow --enable Map foo.map again
git-svn-id: svn://tug.org/texlive/trunk@25145 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/tetex/ChangeLog4
-rwxr-xr-xBuild/source/texk/tetex/updmap.pl36
2 files changed, 28 insertions, 12 deletions
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/tetex/ChangeLog
index d59d508d69b..16726b04c63 100644
--- a/Build/source/texk/tetex/ChangeLog
+++ b/Build/source/texk/tetex/ChangeLog
@@ -1,3 +1,7 @@
+2012-01-19 Norbert Preining <preining@logic.at>
+
+ * updmap.pl: allow --enable Map foo.map again
+
2011-12-12 Karl Berry <karl@tug.org>
* updmap.pl: untabify, formatting.
diff --git a/Build/source/texk/tetex/updmap.pl b/Build/source/texk/tetex/updmap.pl
index 66aff4f100d..01d03f0d5d2 100755
--- a/Build/source/texk/tetex/updmap.pl
+++ b/Build/source/texk/tetex/updmap.pl
@@ -1,8 +1,11 @@
#! /usr/bin/env perl
# updmap: utility to maintain map files for outline fonts.
#
-# Copyright 2002-2011 Thomas Esser.
-# Fabrice Popineau wrote the Perl version.
+# Copyright 2002-2011 Thomas Esser (for the shell version)
+# Copyright 2002-2011 Fabrice Popineau (for the first perl version)
+# Copyright 2009-2011 Reinhard Kotucha
+# Copyright 2011-2012 Norbert Preining
+#
# Anyone may freely use, modify, and/or distribute this file, without
# limitation.
@@ -209,27 +212,36 @@ EOF
sub processOptions {
#
# We parse the command line twice. The first time is to handle
- # --setoption, which might take either one or two following values.
- # the second to handle everything else. The Getopt::Long feature to
+ # --setoption and --enable, which might take either one or two following
+ # values, the second to handle everything else. The Getopt::Long feature to
# handle this is only supported in 5.8.8 (released in 2006) or later,
# and a few people run older perls.
#
my $oldconfig = Getopt::Long::Configure(qw(pass_through));
#
- sub read_for_set_options {
- my ($setopt, $val) = @_;
+ sub read_one_or_two {
+ my ($opt, $val) = @_;
# check if = occurs in $val, if not, get the next argument
if ($val =~ m/=/) {
- push (@setoptions, $val);
+ if ($opt eq "setoption") {
+ push @setoptions, $val;
+ } else {
+ $enableItem = $val;
+ }
} else {
my $vv = shift @ARGV;
- die "$0: --setoption $val given with no value; try --help.\n"
+ die "Try \"$0 --help\" for more information.\n"
if !defined($vv);
- push (@setoptions, "$val=$vv");
+ if ($opt eq "setoption") {
+ push @setoptions, "$val=$vv";
+ } else {
+ $enableItem = "$val=$vv";
+ }
}
}
- GetOptions("setoption=s@" => \&read_for_set_options)
- || die "$0: could not read for --setoption; try --help.\n";
+ GetOptions("setoption=s@" => \&read_one_or_two,
+ "enable=s" => \&read_one_or_two) ||
+ die "$0: illegal arguments, try --help for more information.\n";
# restore old getopt config and read everything else.
Getopt::Long::Configure($oldconfig);
@@ -239,7 +251,7 @@ sub processOptions {
"disable=s" => \@disableItem,
"dvipdfmoutputdir=s" => \$dvipdfmoutputdir,
"dvipsoutputdir=s" => \$dvipsoutputdir,
- "enable=s" => \$enableItem,
+ # "enable=s" => \$enableItem,
"edit" => \$opt_edit,
"force" => \$opt_force,
"listavailablemaps" => \$listavailablemaps,