diff options
author | Karl Berry <karl@freefriends.org> | 2008-01-05 17:52:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-01-05 17:52:40 +0000 |
commit | bc05dfcc5a53a2178d76992313665a87de22d73f (patch) | |
tree | f43d04ec8daf420647445f1d2f7b31382176d2e3 | |
parent | 3c1bc8d1d7f732c21c6ec386cbfbb74e78aa8c87 (diff) |
add generation line, error messages, etc.
git-svn-id: svn://tug.org/texlive/trunk@6043 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf/web2c/updmap-hdr.cfg | 70 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 37 | ||||
-rwxr-xr-x | Master/tlpkg/bin/generate-updmap | 42 |
3 files changed, 54 insertions, 95 deletions
diff --git a/Master/texmf/web2c/updmap-hdr.cfg b/Master/texmf/web2c/updmap-hdr.cfg index d841b3c433c..132bbb5e4da 100644 --- a/Master/texmf/web2c/updmap-hdr.cfg +++ b/Master/texmf/web2c/updmap-hdr.cfg @@ -1,7 +1,11 @@ -# updmap.cfg +# $Id$ +# updmap.cfg is itself generated by concatenating updmap-hdr.cfg with +# all the Map and MixedMap lines from an installation. +# ################################################################ # OPTIONS ################################################################ + # # dvipsPreferOutline # @@ -47,7 +51,7 @@ dvipsDownloadBase35 false # (ps / pdf tools / printers) use bad default fonts, it is safer to download # the fonts. The pdf files will get bigger, though. # Valid settings are true (download the fonts) or false (don't download -# the fonts). Adobe recomments to embed all fonts. +# the fonts). Adobe recommends embedding all fonts. pdftexDownloadBase14 true # @@ -70,64 +74,4 @@ dvipdfmDownloadBase14 true # in the default map of dvips if dvipsPreferOutline is false. Inactive # Map files should be marked by "#! " (without the quotes), not just #. # -# (comments on a few map files from the teTeX updmap.cfg; for TeX Live, -# the actual Map lines are created during installation.) -# -# AntykwaPoltawskiego; CTAN:fonts/psfonts/polish/antp/ -# -# AntykwaTorunska; CTAN:fonts/antt/ -# -# "quasi" fonts derived from URW and enhanced (from the Polish TeX users); -# CTAN:fonts/psfonts/polish/qfonts/ -# -# Bitstream Charter text font -# -# Computer Modern fonts extended with Russian letters; -# CTAN:fonts/cyrillic/cmcyr/ -# -# symbols for ConTeXt macro package -# -# latin modern; CTAN:fonts/lm. -# -# a symbol font; CTAN:fonts/psfonts/marvosym/ -# -# two font map entries for the mathpple package -# -# for Omega -# -# the pazo fonts; CTAN:fonts/mathpazo -# -# pxfonts (palatino extension); CTAN:fonts/pxfonts -# -# txfonts (times extension); CTAN:fonts/txfonts -# -# XY-pic fonts; CTAN:macros/generic/diagrams/xypic -# -# 7-8-9 sizes for cmex taken from TeXtrace2001 different implementation -# for font entries found in ams-cmex-bsr-interpolated.map and -# cmother-bsr-interpolated.map. -# -# ps-type1 versions for ams; CTAN:fonts/amsfonts/ps-type1 -# -# ps-type1 versions for cm; CTAN:fonts/cm/ps-type1/bluesky -# -# CSTeX; http://math.feld.cvut.cz/olsak/cstex/ -# -# mf -> type1 converted fonts by Taco Hoekwater -# -# Polish version of Computer Modern; CTAN:language/polish/plpsfont -# -# Polish version of Computer Concrete; CTAN:fonts/psfonts/polish/cc-pl -# -# See comments in doc/fonts/belleek/README about using mt-belleek.map -# instead of mt-yy.map: -# -# Euro Symbol fonts by Henrik Theiling; CTAN:fonts/eurosym -# -# vntex support, see http://vntex.org/ -# -# Doublestroke, based on Knuth's Computer Modern Roman; CTAN:fonts/doublestroke -# -# FPL, free substitutes for the commercial Palatino SC/OsF fonts -# are available from CTAN:fonts/fpl; used by psnfss 9.2. -# + diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 43b0f376ea8..a76b0e09278 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -907,11 +907,11 @@ sub make_local_skeleton { =item C<create_language($tlpdb, $dest, $localconf)> -These three functions create fmtutil.cnf, updmap.cfg, and language.dat in -in $dest (which normally should be somewhere below TEXMFSYSVAR). -These functions merge -the information present in the TLPDB $tlpdb (formats, maps, hyphenations) -with local configuration additions: $localconf. +These three functions create C<fmtutil.cnf>, C<updmap.cfg>, and +C<language.dat> in in C<$dest> (which by default is below +C<$TEXMFSYSVAR>). These functions merge the information present in the +TLPDB C<$tlpdb> (formats, maps, hyphenations) with local configuration +additions: C<$localconf>. Currently the "merging" is done trivially by appending the content of the local configuration files at the end of the file. This could be @@ -928,15 +928,16 @@ sub create_fmtutil { # this should be done more intelligently, but for now only add those # lines without any duplication check ... open FOO, "<$localconf" - or die "strange -r but cannot open?\n"; + or die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { open(OUTFILE,">$dest") - or die("Cannot open $dest for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); + or die("Cannot open $dest for writing: $!"); + print OUTFILE "# Generated by $0 " . `date`; + print OUTFILE @lines; + close(OUTFILE) || warn "close(>$dest) failed: $!"; } } @@ -949,15 +950,16 @@ sub create_updmap { # this should be done more intelligently, but for now only add those # lines without any duplication check ... open FOO, "<$localconf" - or die "strange -r but cannot open?\n"; + or die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { open(OUTFILE,">$dest") - or die("Cannot open $dest for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); + or die("Cannot open $dest for writing: $!"); + print OUTFILE "# Generated by $0 " . `date`; + print OUTFILE @lines; + close(OUTFILE) || warn "close(>$dest) failed: $!"; } } @@ -970,15 +972,16 @@ sub create_language { # this should be done more intelligently, but for now only add those # lines without any duplication check ... open FOO, "<$localconf" - or die "strange -r but cannot open?\n"; + or die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; push @lines, @tmp; } if ($#lines >= 0) { open(OUTFILE,">$dest") - or die("Cannot open $dest for writing!\n"); - foreach (@lines) { print OUTFILE; } - close(OUTFILE); + or die("Cannot open $dest for writing: $!"); + print OUTFILE "% Generated by $0 " . `date`; + print OUTFILE @lines; + close(OUTFILE) || warn "close(>$dest) failed: $!"; } } diff --git a/Master/tlpkg/bin/generate-updmap b/Master/tlpkg/bin/generate-updmap index f428ef0bbc8..a2cf4419b32 100755 --- a/Master/tlpkg/bin/generate-updmap +++ b/Master/tlpkg/bin/generate-updmap @@ -26,10 +26,10 @@ our $mydir; our $opt_debug = 0; my $help = 0; my $dest = ""; -my $localconf = ""; +my $local = ""; -GetOptions("debug!", "dest=s" => \$dest, - "local=s" => \$localconf, "help|?" => \$help) or pod2usage(1); +GetOptions("debug!", "dest=s" => \$dest, "local=s" => \$local, + "help|?" => \$help) or pod2usage(1); pod2usage(-exitstatus => 0, -verbose => 2) if $help; @@ -41,12 +41,18 @@ sub main chomp (my $Master = `cd $mydir/../.. && pwd`); # xx TLPDB should default my $tlpdb = TeXLive::TLPDB->new ("root" => "$Master"); - my $sysvar = `kpsewhich -expand-var '\$TEXMFSYSVAR'`; chomp($sysvar); - my $tmflocal = `kpsewhich -expand-var '\$TEXMFLOCAL'`; chomp($tmflocal); - $dest || ($dest = "$sysvar/web2c/updmap.cfg"); - $localconf || ($localconf = "$tmflocal/web2c/updmap-local.cfg"); - print "writing updmap.cfg data to $dest\n"; - TeXLive::TLUtils::create_updmap($tlpdb, $dest, $localconf); + if (! $dest) { + chomp (my $sysvar = `kpsewhich -expand-var '\$TEXMFSYSVAR'`); + $dest = "$sysvar/web2c/updmap.cfg"; + } + + if (! $local) { + chomp (my $tmflocal = `kpsewhich -expand-var '\$TEXMFLOCAL'`); + $local = "$tmflocal/web2c/updmap-local.cfg"; + } + + print "$0: writing new updmap.cfg to $dest\n"; + TeXLive::TLUtils::create_updmap ($tlpdb, $dest, $local); } @@ -54,7 +60,7 @@ __END__ =head1 NAME -generate-updmap - generate updmap.cfg from a TLPDB and local additions +generate-updmap - generate updmap.cfg from a TeX Live db and local additions =head1 SYNOPSIS @@ -64,13 +70,15 @@ generate-updmap [OPTION]... =over 8 -=item C<-dest> I<output file> +=item C<-dest> I<output_file> -specifies the output file +specifies the output file; defaults to +C<$TEXMFSYSVAR/texmf/web2c/updmap.cfg>. -=item C<-local> I<local conf file> +=item C<-local> I<local_conf_file> -specifies the local additions +specifies the local additions, if any; defaults to +C<$TEXMFLOCAL/web2c/updmap-local.cfg>. =back @@ -79,7 +87,11 @@ See the tlpfiles documentation for details. =head1 DESCRIPTION -Missing +B<generate-updmap> creates an updated C<updmap.cfg> file with the C<Map> +and C<MixedMap> entries taken from the TL database, plus (optionally) +local additions. + +No repository actions are performed in any case. =head1 AUTHORS AND COPYRIGHT |