summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/tetex/Makefile.am5
-rw-r--r--Build/source/texk/tetex/Makefile.in7
-rw-r--r--Build/source/texk/tetex/old-fontinst.bat2
-rwxr-xr-xBuild/source/texk/tetex/old-updmap1449
-rwxr-xr-xBuild/source/texk/tetex/updmap-single.pl1546
-rw-r--r--Build/source/texk/texlive/context/Makefile.am4
-rw-r--r--Build/source/texk/texlive/context/Makefile.in8
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.am36
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.in21
-rw-r--r--Build/source/texk/texlive/linked_scripts/context/context.1 (renamed from Build/source/texk/texlive/context/context.man)0
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/context/lua/mtxrun.lua (renamed from Build/source/texk/texlive/context/mtxrun)0
-rw-r--r--Build/source/texk/texlive/linked_scripts/context/mptopdf.1 (renamed from Build/source/texk/texlive/context/mptopdf.man)0
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/context/shell/context.sh (renamed from Build/source/texk/texlive/context/context)0
-rw-r--r--Build/source/texk/texlive/linked_scripts/scripts.lst2
-rw-r--r--Build/source/texk/texlive/linked_scripts/tetex/ChangeLog (renamed from Build/source/texk/tetex/ChangeLog)0
15 files changed, 54 insertions, 3026 deletions
diff --git a/Build/source/texk/tetex/Makefile.am b/Build/source/texk/tetex/Makefile.am
index fec265ce561..6d34cecd4c2 100644
--- a/Build/source/texk/tetex/Makefile.am
+++ b/Build/source/texk/tetex/Makefile.am
@@ -6,8 +6,5 @@
ACLOCAL_AMFLAGS = -I ../../m4
EXTRA_DIST = \
- README.texdoctk \
- old-fontinst.bat \
- old-updmap \
- updmap-single.pl
+ README.texdoctk
diff --git a/Build/source/texk/tetex/Makefile.in b/Build/source/texk/tetex/Makefile.in
index 559b558560c..d9897830f05 100644
--- a/Build/source/texk/tetex/Makefile.in
+++ b/Build/source/texk/tetex/Makefile.in
@@ -54,7 +54,7 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
../../build-aux/config.guess ../../build-aux/config.sub \
../../build-aux/depcomp ../../build-aux/install-sh \
../../build-aux/ltmain.sh ../../build-aux/missing \
- ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog
+ ../../build-aux/texinfo.tex ../../build-aux/ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -164,10 +164,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
EXTRA_DIST = \
- README.texdoctk \
- old-fontinst.bat \
- old-updmap \
- updmap-single.pl
+ README.texdoctk
all: all-am
diff --git a/Build/source/texk/tetex/old-fontinst.bat b/Build/source/texk/tetex/old-fontinst.bat
deleted file mode 100644
index fe9be9b7187..00000000000
--- a/Build/source/texk/tetex/old-fontinst.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-tex -progname=fontinst -fmt=tex %1 %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/Build/source/texk/tetex/old-updmap b/Build/source/texk/tetex/old-updmap
deleted file mode 100755
index 15c6e738927..00000000000
--- a/Build/source/texk/tetex/old-updmap
+++ /dev/null
@@ -1,1449 +0,0 @@
-#!/bin/sh
-# updmap - utility to maintain map files for outline fonts.
-# Public domain. Originally written by Thomas Esser.
-# Run with --help for usage.
-
-###############################################################################
-# program history:
-# further changes in texk/tetex/ChangeLog.
-# Sun May 25 21:05:32 CEST 2008 (Reinhard Kotucha)
-# add function symlink_or_copy needed by tl-portable.
-# Post-te retirement, now maintained in TeX Live; see
-# Build/texk/tetex/ChangeLog for further changes.
-# Fr Jul 22 07:22:38 CEST 2005
-# write hint about log file into output files
-# Fr Apr 8 19:15:05 CEST 2005
-# cleanup now has an argument for the return code
-# So Mär 27 18:52:06 CEST 2005
-# honor $TMPDIR, $TEMP and $TMP, not just $TMP
-# Do Mär 10 19:31:39 CET 2005
-# add a few quotes for $cnfFile with whitespace
-# Sa Jan 15 18:13:46 CET 2005
-# avoid multiple variable assignments in one statement
-# Sa Dez 25 12:44:23 CET 2004
-# implementaion adopted for teTeX-3.0 (tcfmgr)
-# Mi Nov 3 16:33:22 CET 2004
-# add "--setoption option=value" syntax
-# Fr Okt 29 21:05:53 CEST 2004
-# add --enable Map=... / --enable MixedMap=...
-# Mi Okt 20 19:17:19 CEST 2004
-# transcript added; even better warnings / error messages
-# So Okt 17 19:07:17 CEST 2004
-# improved warnings / error messages
-# added --syncwithtrees
-# added --listavailablemaps
-# Mi Okt 6 16:37:49 CEST 2004
-# commenty may start with any of *#;%
-# Sun Aug 1 11:42:14 CEST 2004, te
-# remove pdftex related hacks; pdftex no longer needs them!
-# Thu May 13 22:04:23 CEST 2004, te
-# support user with new map file locations
-# Fri Mar 19 15:22:55 CET 2004, te
-# output "xxx yyy" instead of " xxx yyy " (less blanks)
-# Fri Jan 2 22:41:11 CET 2004, te:
-# add version string
-# Wed Aug 20 18:51:47 CEST 2003
-# store map files to fonts/map, add options for dvipsoutputdir,
-# pdftexoutputdir, dvipdfmoutputdir
-# Mon Mar 24 13:40:55 CET 2003
-# fix fmex[789] for dvipdfm (no -r option)
-# Sun Mar 23 18:58:00 CET 2003
-# make the script robust against whitespace in filenames
-# Mon Jan 27 22:38:44 CET 2003
-# don't call a function before processOptions; we may loose our
-# argument list with some broken shells
-# Mon Jan 27 06:55:28 CET 2003
-# fix unportable egrep / sed
-# Sat Jan 18 10:10:26 CET 2003
-# use $tmp8 in dvips2dvipdfm()
-# Thu Jan 2 23:14:34 CET 2003
-# add umask 022, so generated files are always world-readable
-# Sun Oct 27 11:33:04 CET 2002
-# write output in normalized format
-# add support for dvipdfm
-# Mon Sep 22 19:18:57 CEST 2002
-# fix typo: buildin -> builtin
-# Mon Sep 2 19:18:57 CEST 2002
-# fix condensed <-> narrow mapping
-# Sun Sep 1 15:02:28 CEST 2002
-# add dvipsDownloadBase35 / pdftexDownloadBase14 options
-# Wed May 22 20:00:13 CEST 2002
-# listmaps option added by Gerben Wierda
-# Tue May 21 05:27:37 CEST 2002
-# now removing map files before rewriting them; fixes permission problems
-# Tue May 21 05:05:34 CEST 2002:
-# cli options added: showoptions, setoption, enable, disable, nomkmap
-# now even more verbose; now reporting non-existing map files
-# fixing trap for MAC OS/X compatibility
-# Fri May 17 22:38:37 CEST 2002:
-# rewritten from teTeX-1.0 version; Completely new designed.
-###############################################################################
-
-test -f /bin/ksh && test -z "$RUNNING_KSH" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xULTRIX; } 2>/dev/null \
- && { RUNNING_KSH=true; export RUNNING_KSH; exec /bin/ksh $0 ${1+"$@"}; }
-unset RUNNING_KSH
-
-test -f /bin/bsh && test -z "$RUNNING_BSH" \
- && { UNAMES=`uname -s`; test "x$UNAMES" = xAIX; } 2>/dev/null \
- && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bsh $0 ${1+"$@"}; }
-unset RUNNING_BSH
-
-export PATH
-
-# hack around a bug in zsh:
-test -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"'
-
-# the version string
-version='$Id$'
-
-#
-###############################################################################
-# help()
-# display help message and exit
-###############################################################################
-help()
-{
- cat <<eof
-$version
-Usage: updmap [OPTION]... [COMMAND]...
-
-Update the default font map files used by pdftex, dvips, and dvipdfm, as
-determined by updmap.cfg (the one returned by running "kpsewhich
-updmap.cfg").
-
-Among other things, these font map files are used to determine which
-fonts should be used as bitmaps and which as outlines, and to determine
-which fonts are included in the output.
-
-By default, the TeX filename database is also rebuilt (with mktexlsr).
-
-Valid options:
- --cnffile FILE read FILE for the updmap configuration
- --pdftexoutputdir DIR specify output directory (pdftex syntax)
- --dvipsoutputdir DIR specify output directory (dvips syntax)
- --dvipdfmoutputdir DIR specify output directory (dvipdfm syntax)
- --outputdir DIR specify output directory (for all files)
- --copy cp generic files rather than using symlinks
- --nomkmap do not recreate map files
- --nohash do not run texhash
- -n, --dry-run only show the configuration, no output
- --quiet reduce verbosity
-
-Valid commands:
- --help show this message
- --edit edit $cnfFileShort file
- --showoptions ITEM show alternatives for options
- --setoption OPTION VALUE set option, where OPTION is one of:
- dvipsPreferOutline LW35 dvipsDownloadBase35
- pdftexDownloadBase14 dvipdfmDownloadBase14
- --setoption OPTION=VALUE see above, just different syntax
- --enable MAPTYPE MAPFILE add "MAPTYPE MAPFILE" to updmap.cfg,
- where MAPTYPE is either Map or MixedMap
- --enable Map=MAPFILE add "Map MAPFILE" to updmap.cfg
- --enable MixedMap=MAPFILE add "MixedMap MAPFILE" to updmap.cfg
- --disable MAPFILE disable MAPFILE, whether Map or MixedMap
- --syncwithtrees entries with unavailable map files will be
- disabled in the config file
- --listmaps list all active and inactive maps
- --listavailablemaps same as --listmaps, but without
- unavailable map files
-
-Explanation of the map types: the (only) difference between Map and
-MixedMap is that MixedMap entries are not added to psfonts_pk.map. The
-purpose is to help users with printers that render Type 1 outline fonts
-worse than mode-tuned Type 1 bitmap fonts. So MixedMap is used for
-fonts that are available as both Type 1 and Metafont.
-
-To see the precise locations of the various files that will be read and
-written, run updmap -n.
-
-For step-by-step instructions on making new fonts known to TeX, see
-http://tug.org/fonts/fontinstall.html.
-
-Report bugs to: tex-k@tug.org
-TeX Live home page: <http://tug.org/texlive/>
-eof
- (exit 0); exit
-}
-
-#
-###############################################################################
-# verboseMsg(msg)
-# print `msg' to stderr is $verbose is true
-###############################################################################
-verboseMsg() {
- test -n "$log" && echo ${1+"$@"} >> "$log"
- $verbose && echo ${1+"$@"} >&2
-}
-
-###############################################################################
-# verboseCat()
-# cat to stderr is $verbose is true
-###############################################################################
-verboseCat() {
- if $verbose; then
- if test -n "$log"; then
- cat ${1+"$@"} | tee -a "$log" >&2
- else
- cat ${1+"$@"} >&2
- fi
- else
- test -n "$log" && cat ${1+"$@"} >> "$log"
- fi
-}
-
-###############################################################################
-# warn(msg)
-# print `msg' to stderr
-###############################################################################
-warn()
-{
- test -n "$log" && echo ${1+"$@"} >> "$log"
- echo ${1+"$@"} >&2
-}
-
-###############################################################################
-# abort(errmsg)
-# print `errmsg' to stderr and exit with error code 1
-###############################################################################
-abort()
-{
- warn "$progname: $1."
- cleanup 1
-}
-
-###############################################################################
-# cfgval(variable)
-# read variable ($1) from config file, first match wins
-###############################################################################
-cfgval()
-{
- cat "$cnfFile" | sed -n 's/^'"$1"'[ =][ =]*//p' | sed q
-}
-
-###############################################################################
-# symlink_or_copy()
-# if --copy is not set, try to create a symlink. If this fails, write
-# a message to stderr and copy the file instead.
-###############################################################################
-symlink_or_copy()
-{
- if $copy; then
- $copy_cmd "$1" "$2"
- else
- $link_cmd "$1" "$2" ||
- {
- echo "Creating symbolic link failed, the file is copied instead." 1>&2 &&
- $copy_cmd "$1" "$2"
- }
- fi
-}
-
-###############################################################################
-# setupSymlinks()
-# set symlink (or copy)
-# for psfonts.map according to dvipsPreferOutline variable,
-# and for pdftex.map and dvipdfm.map according to pdftexDownloadBase14.
-###############################################################################
-setupSymlinks()
-{
- (
- cd "$dvipsoutputdir" || exit 1
- rm -f psfonts.map
- if test "x$dvipsPreferOutline" = xtrue; then
- symlink_or_copy psfonts_t1.map psfonts.map
- else
- symlink_or_copy psfonts_pk.map psfonts.map
- fi
-
- cd "$pdftexoutputdir" || exit 1
- rm -f pdftex.map
- if test "x$pdftexDownloadBase14" = xtrue; then
- symlink_or_copy pdftex_dl14.map pdftex.map
- else
- symlink_or_copy pdftex_ndl14.map pdftex.map
- fi
-
- cd "$dvipdfmoutputdir" || exit 1
- rm -f dvipdfm.map
- if test "x$dvipdfmDownloadBase14" = xtrue; then
- symlink_or_copy dvipdfm_dl14.map dvipdfm.map
- else
- symlink_or_copy dvipdfm_ndl14.map dvipdfm.map
- fi
- )
-}
-
-###############################################################################
-# transLW35(args ...)
-# transform fontname and filenames according to transformation specified
-# by mode
-###############################################################################
-transLW35()
-{
- verboseMsg "$progname: transLW35 according to: $mode"
- case $mode in
- ""|URWkb)
- cat ${1+"$@"}
- ;;
- URW)
- fileURW ${1+"$@"}
- ;;
- ADOBE|ADOBEkb)
- psADOBE ${1+"$@"} | file$mode
- ;;
- esac
-}
-
-###############################################################################
-# catMaps(regex)
-# filter config file by regex for map lines and extract the map filenames.
-# These are then looked up (by kpsewhich in locateMap) and the content of
-# all map files is send to stdout.
-###############################################################################
-catMaps()
-{
- rm -f $catMapsFailed
- egrep "$1" "$cnfFile" \
- | sed 's@#.*@@' \
- | awk '{print $2}' \
- | sort \
- | uniq \
- | grep . > $tmp4
-
- while read map; do
- file=`locateMap "$map"` || { touch $catMapsFailed; break; }
-
- # output the file; also output a newline, because the final newline
- # might be missing in the map file; Empty lines are filtered out later,
- # so it does not really hurt do do this here.
- test -n "$file" && { cat "$file"; echo; }
- done < $tmp4
- if test -f $catMapsFailed; then
- false; return 1
- else
- true; return 0
- fi
-}
-
-###############################################################################
-# configReplace(file, pattern, line)
-# The first line in file that matches pattern gets replaced by line.
-# line will be added at the end of the file if pattern does not match.
-###############################################################################
-configReplace()
-{
- file=$1; pat=$2; line=$3
-
- if grep "$pat" "$file" >/dev/null; then
- ed "$file" >/dev/null 2>&1 <<-eof
- /$pat/
- c
- $line
- .
- w
- q
-eof
- else
- echo "$line" >> "$file"
- fi
-}
-
-###############################################################################
-# setOption (option, value)
-# sets option to value in the config file (replacing the existing setting
-# or by adding a new line to the config file).
-###############################################################################
-setOption()
-{
- opt=$1
- val=$2
- case "$opt" in
- LW35)
- case "$val" in
- URWkb|URW|ADOBE|ADOBEkb)
- ;;
- *)
- abort "invalid value $val for option $opt"
- ;;
- esac
- ;;
- dvipsPreferOutline|dvipsDownloadBase35|pdftexDownloadBase14|dvipdfmDownloadBase14)
- case "$val" in
- true|false)
- ;;
- *)
- abort "invalid value $val for option $opt"
- esac
- ;;
- *)
- abort "unsupported option $opt"
- ;;
- esac
-
- configReplace "$cnfFile" "^$opt[ ]" "$opt $val"
-}
-
-###############################################################################
-# enableMap (type, map)
-# enables an entry in the config file for map with a given type.
-###############################################################################
-enableMap()
-{
- case $1 in
- Map|MixedMap)
- ;;
- *)
- abort "invalid mapType $1"
- ;;
- esac
-
- # a map can only have one type, so we carefully disable everything
- # about map here:
- disableMap "$2"
-
- # now enable with the right type:
- configReplace "$cnfFile" "^#![ ]*$1[ ]*$2" "$1 $2"
-}
-
-###############################################################################
-# disableMap (map)
-# disables map in config file (any type)
-###############################################################################
-disableMap()
-{
- #mapType=`awk '($1 == "MixedMap" || $1 == "Map") && $2 == map { print $1 }' \
- # map=$1 <"$cnfFile" | sort | uniq`
- map=$1
- mapType=`egrep "^(MixedMap|Map)[ ]*$map( | |$)" "$cnfFile" | awk '{print $1}' | sort | uniq`
- for type in $mapType; do
- configReplace "$cnfFile" "^$type[ ]*$1" "#! $type $1"
- done
-}
-
-###############################################################################
-# psADOBE()
-# transform fontnames from URW to Adobe
-###############################################################################
-psADOBE()
-{
- sed \
- -e 's/ URWGothicL-Demi / AvantGarde-Demi /' \
- -e 's/ URWGothicL-DemiObli / AvantGarde-DemiOblique /' \
- -e 's/ URWGothicL-Book / AvantGarde-Book /' \
- -e 's/ URWGothicL-BookObli / AvantGarde-BookOblique /' \
- -e 's/ URWBookmanL-DemiBold / Bookman-Demi /' \
- -e 's/ URWBookmanL-DemiBoldItal / Bookman-DemiItalic /' \
- -e 's/ URWBookmanL-Ligh / Bookman-Light /' \
- -e 's/ URWBookmanL-LighItal / Bookman-LightItalic /' \
- -e 's/ NimbusMonL-Bold / Courier-Bold /' \
- -e 's/ NimbusMonL-BoldObli / Courier-BoldOblique /' \
- -e 's/ NimbusMonL-Regu / Courier /' \
- -e 's/ NimbusMonL-ReguObli / Courier-Oblique /' \
- -e 's/ NimbusSanL-Bold / Helvetica-Bold /' \
- -e 's/ NimbusSanL-BoldCond / Helvetica-Narrow-Bold /' \
- -e 's/ NimbusSanL-BoldItal / Helvetica-BoldOblique /' \
- -e 's/ NimbusSanL-BoldCondItal / Helvetica-Narrow-BoldOblique /' \
- -e 's/ NimbusSanL-Regu / Helvetica /' \
- -e 's/ NimbusSanL-ReguCond / Helvetica-Narrow /' \
- -e 's/ NimbusSanL-ReguItal / Helvetica-Oblique /' \
- -e 's/ NimbusSanL-ReguCondItal / Helvetica-Narrow-Oblique /' \
- -e 's/ CenturySchL-Bold / NewCenturySchlbk-Bold /' \
- -e 's/ CenturySchL-BoldItal / NewCenturySchlbk-BoldItalic /' \
- -e 's/ CenturySchL-Roma / NewCenturySchlbk-Roman /' \
- -e 's/ CenturySchL-Ital / NewCenturySchlbk-Italic /' \
- -e 's/ URWPalladioL-Bold / Palatino-Bold /' \
- -e 's/ URWPalladioL-BoldItal / Palatino-BoldItalic /' \
- -e 's/ URWPalladioL-Roma / Palatino-Roman /' \
- -e 's/ URWPalladioL-Ital / Palatino-Italic /' \
- -e 's/ StandardSymL / Symbol /' \
- -e 's/ NimbusRomNo9L-Medi / Times-Bold /' \
- -e 's/ NimbusRomNo9L-MediItal / Times-BoldItalic /' \
- -e 's/ NimbusRomNo9L-Regu / Times-Roman /' \
- -e 's/ NimbusRomNo9L-ReguItal / Times-Italic /' \
- -e 's/ URWChanceryL-MediItal / ZapfChancery-MediumItalic /' \
- -e 's/ Dingbats / ZapfDingbats /' \
- ${1+"$@"}
-}
-
-###############################################################################
-# fileADOBEkb()
-# transform filenames from URW to ADOBE (both berry names)
-###############################################################################
-fileADOBEkb()
-{
- sed \
- -e 's/\([^A-Za-z]\)uagd8a.pfb/\1pagd8a.pfb/' \
- -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1pagdo8a.pfb/' \
- -e 's/\([^A-Za-z]\)uagk8a.pfb/\1pagk8a.pfb/' \
- -e 's/\([^A-Za-z]\)uagko8a.pfb/\1pagko8a.pfb/' \
- -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1pbkd8a.pfb/' \
- -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1pbkdi8a.pfb/' \
- -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1pbkl8a.pfb/' \
- -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1pbkli8a.pfb/' \
- -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1pcrb8a.pfb/' \
- -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1pcrbo8a.pfb/' \
- -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1pcrr8a.pfb/' \
- -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1pcrro8a.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1phvb8a.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1phvb8an.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1phvbo8a.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1phvbo8an.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1phvr8a.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1phvr8an.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1phvro8a.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1phvro8an.pfb/' \
- -e 's/\([^A-Za-z]\)uncb8a.pfb/\1pncb8a.pfb/' \
- -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1pncbi8a.pfb/' \
- -e 's/\([^A-Za-z]\)uncr8a.pfb/\1pncr8a.pfb/' \
- -e 's/\([^A-Za-z]\)uncri8a.pfb/\1pncri8a.pfb/' \
- -e 's/\([^A-Za-z]\)uplb8a.pfb/\1pplb8a.pfb/' \
- -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1pplbi8a.pfb/' \
- -e 's/\([^A-Za-z]\)uplr8a.pfb/\1pplr8a.pfb/' \
- -e 's/\([^A-Za-z]\)uplri8a.pfb/\1pplri8a.pfb/' \
- -e 's/\([^A-Za-z]\)usyr.pfb/\1psyr.pfb/' \
- -e 's/\([^A-Za-z]\)utmb8a.pfb/\1ptmb8a.pfb/' \
- -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1ptmbi8a.pfb/' \
- -e 's/\([^A-Za-z]\)utmr8a.pfb/\1ptmr8a.pfb/' \
- -e 's/\([^A-Za-z]\)utmri8a.pfb/\1ptmri8a.pfb/' \
- -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1pzcmi8a.pfb/' \
- -e 's/\([^A-Za-z]\)uzdr.pfb/\1pzdr.pfb/' \
- ${1+"$@"}
-}
-
-###############################################################################
-# fileURW()
-# transform filenames from URWkb (berry names) to URW (vendor names)
-###############################################################################
-fileURW()
-{
- sed \
- -e 's/\([^A-Za-z]\)uagd8a.pfb/\1a010015l.pfb/' \
- -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1a010035l.pfb/' \
- -e 's/\([^A-Za-z]\)uagk8a.pfb/\1a010013l.pfb/' \
- -e 's/\([^A-Za-z]\)uagko8a.pfb/\1a010033l.pfb/' \
- -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1b018015l.pfb/' \
- -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1b018035l.pfb/' \
- -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1b018012l.pfb/' \
- -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1b018032l.pfb/' \
- -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1n022004l.pfb/' \
- -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1n022024l.pfb/' \
- -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1n022003l.pfb/' \
- -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1n022023l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1n019004l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1n019044l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1n019024l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1n019064l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1n019003l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1n019043l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1n019023l.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1n019063l.pfb/' \
- -e 's/\([^A-Za-z]\)uncb8a.pfb/\1c059016l.pfb/' \
- -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1c059036l.pfb/' \
- -e 's/\([^A-Za-z]\)uncr8a.pfb/\1c059013l.pfb/' \
- -e 's/\([^A-Za-z]\)uncri8a.pfb/\1c059033l.pfb/' \
- -e 's/\([^A-Za-z]\)uplb8a.pfb/\1p052004l.pfb/' \
- -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1p052024l.pfb/' \
- -e 's/\([^A-Za-z]\)uplr8a.pfb/\1p052003l.pfb/' \
- -e 's/\([^A-Za-z]\)uplri8a.pfb/\1p052023l.pfb/' \
- -e 's/\([^A-Za-z]\)usyr.pfb/\1s050000l.pfb/' \
- -e 's/\([^A-Za-z]\)utmb8a.pfb/\1n021004l.pfb/' \
- -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1n021024l.pfb/' \
- -e 's/\([^A-Za-z]\)utmr8a.pfb/\1n021003l.pfb/' \
- -e 's/\([^A-Za-z]\)utmri8a.pfb/\1n021023l.pfb/' \
- -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1z003034l.pfb/' \
- -e 's/\([^A-Za-z]\)uzdr.pfb/\1d050000l.pfb/' \
- ${1+"$@"}
-}
-
-###############################################################################
-# fileADOBE()
-# transform filenames from URWkb (berry names) to ADOBE (vendor names)
-###############################################################################
-fileADOBE()
-{
- sed \
- -e 's/\([^A-Za-z]\)uagd8a.pfb/\1agd_____.pfb/' \
- -e 's/\([^A-Za-z]\)uagdo8a.pfb/\1agdo____.pfb/' \
- -e 's/\([^A-Za-z]\)uagk8a.pfb/\1agw_____.pfb/' \
- -e 's/\([^A-Za-z]\)uagko8a.pfb/\1agwo____.pfb/' \
- -e 's/\([^A-Za-z]\)ubkd8a.pfb/\1bkd_____.pfb/' \
- -e 's/\([^A-Za-z]\)ubkdi8a.pfb/\1bkdi____.pfb/' \
- -e 's/\([^A-Za-z]\)ubkl8a.pfb/\1bkl_____.pfb/' \
- -e 's/\([^A-Za-z]\)ubkli8a.pfb/\1bkli____.pfb/' \
- -e 's/\([^A-Za-z]\)ucrb8a.pfb/\1cob_____.pfb/' \
- -e 's/\([^A-Za-z]\)ucrbo8a.pfb/\1cobo____.pfb/' \
- -e 's/\([^A-Za-z]\)ucrr8a.pfb/\1com_____.pfb/' \
- -e 's/\([^A-Za-z]\)ucrro8a.pfb/\1coo_____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8a.pfb/\1hvb_____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvb8ac.pfb/\1hvnb____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8a.pfb/\1hvbo____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvbo8ac.pfb/\1hvnbo___.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8a.pfb/\1hv______.pfb/' \
- -e 's/\([^A-Za-z]\)uhvr8ac.pfb/\1hvn_____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8a.pfb/\1hvo_____.pfb/' \
- -e 's/\([^A-Za-z]\)uhvro8ac.pfb/\1hvno____.pfb/' \
- -e 's/\([^A-Za-z]\)uncb8a.pfb/\1ncb_____.pfb/' \
- -e 's/\([^A-Za-z]\)uncbi8a.pfb/\1ncbi____.pfb/' \
- -e 's/\([^A-Za-z]\)uncr8a.pfb/\1ncr_____.pfb/' \
- -e 's/\([^A-Za-z]\)uncri8a.pfb/\1nci_____.pfb/' \
- -e 's/\([^A-Za-z]\)uplb8a.pfb/\1pob_____.pfb/' \
- -e 's/\([^A-Za-z]\)uplbi8a.pfb/\1pobi____.pfb/' \
- -e 's/\([^A-Za-z]\)uplr8a.pfb/\1por_____.pfb/' \
- -e 's/\([^A-Za-z]\)uplri8a.pfb/\1poi_____.pfb/' \
- -e 's/\([^A-Za-z]\)usyr.pfb/\1sy______.pfb/' \
- -e 's/\([^A-Za-z]\)utmb8a.pfb/\1tib_____.pfb/' \
- -e 's/\([^A-Za-z]\)utmbi8a.pfb/\1tibi____.pfb/' \
- -e 's/\([^A-Za-z]\)utmr8a.pfb/\1tir_____.pfb/' \
- -e 's/\([^A-Za-z]\)utmri8a.pfb/\1tii_____.pfb/' \
- -e 's/\([^A-Za-z]\)uzcmi8a.pfb/\1zcmi____.pfb/' \
- -e 's/\([^A-Za-z]\)uzdr.pfb/\1zd______.pfb/' \
- ${1+"$@"}
-}
-
-###############################################################################
-# locateWeb2c (file ...)
-# apply kpsewhich with format 'web2c files'
-###############################################################################
-locateWeb2c()
-{
- kpsewhich --format='web2c files' ${1+"$@"}
-}
-
-###############################################################################
-# locateMap (file ...)
-# apply kpsewhich with format 'map'
-###############################################################################
-locateMap()
-{
-
- # Always use the "migration checking version". This might become
- # consigurable, but for now, we always want to check.
- if :; then
- locateMapMigrate "$@"
- return $?
- fi
-
- # The old version of the code; not used at the moment.
- for map
- do
- file=`kpsewhich --format=map "$map"`
- if test -f "$file"; then
- verboseMsg "$progname: using map file \`$file'"
- echo "$file"
- else
- warn "map file not found: \`$map'"
- fi
- done
-}
-
-###############################################################################
-# locateMapMigrate (file ...)
-# look for map file; assist user with possibly files in wrong locations;
-# also watch out for possibly hidden conflicts
-###############################################################################
-locateMapMigrate()
-{
- for map
- do
- # look up using the new search path
- file=`kpsewhich --format=map "$map"`
-
- # look up using the old search path
- file2=`kpsewhich --format='dvips config' "$map"`
-
- # Well, the search paths should not overlap. If they do, and if
- # file1 = file2, we don't want to complain about file2, so:
- test "x$file" = "x$file2" && file2=
-
- if test -f "$file"; then
-
- verboseMsg "$progname: using map file \`$file'"
- echo "$file"
-
- # we have found the file where we should. If we have additional
- # ones: complain!
- if test -f "$file2"; then
- mapCmp "$file" "$file2" \
- && mapWarn obsoleteCopy "$map" "$file2" \
- || mapWarn manualResolve "$map" "$file" "$file2"
- fi
-
- else
- if test -f "$file2"; then
- # bad: map file exists in the wrong location only
- mapWarn badLocation "$map" "$file2"
- else
- # bad: map file does not exist at all
- mapWarn notFound "$map"
- fi
- false; return 1
- fi
- done
- true; return 0
-}
-
-###############################################################################
-# mapCmp(file, file2)
-# compare two map files like cmp; but less strict, so changes regarding
-# whitespaces, comments etc. are tolerated. Important is only the
-# return value here.
-###############################################################################
-mapCmp()
-{
- file=$1; file2=$2
-
- # For reasons of speed only. Avoid normalizeLines if files are 100%
- # the same.
- cmp "$file" "$file2" >/dev/null 2>&1 && return 0
-
- normalizeLines <"$file" >"$tmpdir/mapCmp-1"
- normalizeLines <"$file2" >"$tmpdir/mapCmp-2"
- cmp "$tmpdir/mapCmp-1" "$tmpdir/mapCmp-2" >/dev/null 2>&1
-}
-
-###############################################################################
-# mapWarn()
-###############################################################################
-mapWarn()
-{
-
- case $1 in
- obsoleteCopy)
- warn "
-!!! WARNING: Identical copy of used file for \`$2'
- exists in obsolete location
- $3
- Please, consider removing this file.
-"
- touch $mapWarnCalled
- ;;
- manualResolve)
- warn "
-!!! WARNING: While searching for the right map file for \`$2', we have
- found the file
- $3
- in the right location and we are using this
- file. However, a map file with different content has been found in
- the obsolete location
- $4
- Please, see which version you want to use and eventually update the
- content of the used map file. Additionally, consider removing the
- obsolete file.
-"
- touch $mapWarnCalled
- ;;
- badLocation)
- map=$2
- location=$3
-
- m="
-!!! ERROR: The right location for map files has been
- changed for this release and the map file \`$map' has
- not been found in the right location, but in the obsolete
- location
- $location
- instead.
-
- To fix this, please move this file into an appropriate
- subdirectory of fonts/map in one of your texmf trees.
-
- For more information about the changed search paths, see
- the release notes section in the teTeX manual. You probably
- can read this document by executing the command
- texdoc TETEXDOC
- else visit the web page
- http://tug.org/texlive/mapenc.html
-"
- warn "$m"
- false; return 1
- ;;
- notFound)
- warn "
-!!! ERROR! The map file \`$2' has not been found at all.
-
- Either put this file into the right place or remove the
- reference from the configuration file. An automatic way
- to disable unavailable map files is to call
- $progname --syncwithtrees
-
- For manual editing, call
- $progname --edit
-"
-
- false; return 1
- ;;
- esac
-}
-
-###############################################################################
-# cleanup()
-# clean up the temp area and exit with proper exit status
-###############################################################################
-cleanup()
-{
- rc=$1
- $needsCleanup && test -n "$tmpdir" && test -d "$tmpdir" \
- && { cd $orig_pwd && rm -rf "$tmpdir"; }
- (exit $rc); exit $rc
-}
-
-###############################################################################
-# setupTmpDir()
-# set up a temp directory and a trap to remove it
-###############################################################################
-setupTmpDir()
-{
- $needsCleanup && return
-
- trap 'cleanup 1' 1 2 3 7 13 15
- needsCleanup=true
- mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
-}
-
-###############################################################################
-# showOptions(item)
-# show Options for an item
-###############################################################################
-showOptions()
-{
- item=$1
-
- case "$item" in
- LW35)
- echo "URWkb URW ADOBE ADOBEkb"
- ;;
- dvipsPreferOutline|pdftexDownloadBase14|dvipdfmDownloadBase14|dvipsDownloadBase35)
- echo "true false"
- ;;
- *)
- abort "Unknown item \"$item\". Choose one of LW35, dvipsPreferOutline, dvipsDownloadBase35, pdftexDownloadBase14 or dvipdfmDownloadBase14"
- ;;
- esac
-
- (exit 0); exit 0
-}
-
-###############################################################################
-# mktexdir(args)
-# call mktexdir script, disable all features (to prevent sticky directories)
-###############################################################################
-mktexdir()
-{
- MT_FEATURES=none "$TEXMFMAIN/web2c/mktexdir" "$@" >&2
-}
-
-###############################################################################
-# setupDestDir()
-# Assign output directories which are not yet assigned. Always use
-# the TEXMFVAR for this.
-###############################################################################
-setupDestDir()
-{
- vartexmf=`kpsewhich -var-value=TEXMFVAR`
-
- # dvips
- if test -z "$dvipsoutputdir"; then
- dvipsoutputdir=$vartexmf/fonts/map/dvips/updmap
- fi
-
- # pdftex
- if test -z "$pdftexoutputdir"; then
- pdftexoutputdir=$vartexmf/fonts/map/pdftex/updmap
- fi
-
- # dvipdfm
- if test -z "$dvipdfmoutputdir"; then
- dvipdfmoutputdir=$vartexmf/fonts/map/dvipdfm/updmap
- fi
-
- mktexdir "$dvipsoutputdir" "$pdftexoutputdir" "$dvipdfmoutputdir" >/dev/null 2>&1
- for d in "$dvipsoutputdir" "$pdftexoutputdir" "$dvipdfmoutputdir"; do
- test -d "$d" || abort "output directory \`$d' does not exist"
- test -w "$d" || abort "output directory \`$d' is not writable"
- done
-
-}
-
-###############################################################################
-# setupLog(cfgFile)
-# try to set up a log file in $TEXMFVAR/web2c
-###############################################################################
-setupLog()
-{
- vartexmf=`kpsewhich -var-value=TEXMFVAR`
- dir=$vartexmf/web2c
- mktexdir "$dir" >/dev/null 2>&1
- log="$dir/$progname.log"
- if test -d "$dir" && test -w "$dir"; then
- rm -f "$log"
- > "$log"
- fi
- if test -w "$log"; then
- if $chicken_mode; then
- log=
- else
- date > "$log"
- verboseMsg "$progname: This is $progname, version $version"
- verboseMsg "$progname: using transcript file \`$log'"
- fi
- else
- log=
- verboseMsg "$progname: This is $progname, version $version"
- verboseMsg "$progname: no permissions for writing $dir/$progname.log', so no transcript"
- fi
-}
-
-###############################################################################
-# setupCfgFile()
-# find config file if none specified on cmd line.
-###############################################################################
-setupCfgFile()
-{
- case "$cnfFile" in
- "") cnfFile=`locateWeb2c $cnfFileShort`
- case "$cnfFile" in
- "") abort "config file $cnfFileShort not found (ls-R missing?)"
- esac;;
- esac
- setupLog
-}
-
-###############################################################################
-# processOptions()
-# process cmd line options
-###############################################################################
-processOptions()
-{
- while
- case $1 in
- --quiet|-q)
- verbose=false;;
- --cnffile)
- cfgparam=1; cnfFile=$2; shift;;
- --cnffile=*)
- cfgparam=1; cnfFile=`echo "$1" | sed 's/--cnffile=//'`;;
- --copy)
- copy=true;;
- --dry-run|-n)
- chicken_mode=true;;
- --dvipsoutputdir)
- dvipsoutputdirparam=1; dvipsoutputdir=$2; shift;;
- --dvipsoutputdir=*)
- dvipsoutputdirparam=1; dvipsoutputdir=`echo "$1" | sed 's/--dvipsoutputdir=//'`;;
- --pdftexoutputdir)
- pdftexoutputdirparam=1; pdftexoutputdir=$2; shift;;
- --pdftexoutputdir=*)
- pdftexoutputdirparam=1; pdftexoutputdir=`echo "$1" | sed 's/--pdftexoutputdir=//'`;;
- --dvipdfmoutputdir)
- dvipdfmoutputdirparam=1; dvipdfmoutputdir=$2; shift;;
- --dvipdfmoutputdir=*)
- dvipdfmoutputdirparam=1; dvipdfmoutputdir=`echo "$1" | sed 's/--dvipdfmoutputdir=//'`;;
- --outputdir)
- dvipsoutputdirparam=1; dvipsoutputdir=$2
- pdftexoutputdirparam=1; pdftexoutputdir=$2
- dvipdfmoutputdirparam=1; dvipdfmoutputdir=$2
- shift
- ;;
- --outputdir=*)
- outputdir=`echo "$1" | sed 's/--outputdir=//'`
- dvipsoutputdirparam=1; dvipsoutputdir=$outputdir
- pdftexoutputdirparam=1; pdftexoutputdir=$outputdir
- dvipdfmoutputdirparam=1; dvipdfmoutputdir=$outputdir
- ;;
- --setoption)
- cfgmaint=1
- cmd=setoption
- case $2 in
- *=*)
- setoptionOpt=`echo $2 | sed 's@=.*@@'`
- setoptionVal=`echo $2 | sed 's@[^=]*=@@'`
- shift
- ;;
- *)
- test $# -ge 3 || { abort "--setoption needs two parameters: option value"; }
- setoptionOpt=$2; setoptionVal=$3; shift; shift
- ;;
- esac
- ;;
- --enable)
- cfgmaint=1
- cmd=enable
- case $2 in
- Map=*)
- enableMapType=Map; enableMapFile=`echo "$2" | sed 's/Map=//'`; shift;;
- MixedMap=*)
- enableMapType=MixedMap; enableMapFile=`echo "$2" | sed 's/MixedMap=//'`; shift;;
- Map|MixedMap)
- test $# -ge 3 || { abort "--enable needs two parameters: mapType mapFile"; }
- enableMapType=$2; enableMapFile=$3; shift; shift;;
- *)
- abort "--enable needs two parameters mapType mapFile";;
- esac
- ;;
- --syncwithtrees)
- cfgmaint=1
- cmd=syncwithtrees;;
- --disable)
- cfgmaint=1
- cmd=disable; disableMapFile=$2; shift
- ;;
- --disable=*)
- cfgmaint=1
- disableMapFile=`echo "$1" | sed 's/--disable=//'`
- cmd=disable
- ;;
- --edit|-e)
- cfgmaint=1
- cmd=edit;;
- --listmaps|-l)
- cmd=listmaps;;
- --listavailablemaps)
- cmd=listavailablemaps;;
- --showoptions)
- cmd=showoptions; showoptionsItem=$2; shift;;
- --showoptions=*)
- cmd=showoptions; showoptionsItem=`echo "$1" | sed 's/--showoptions=//'`;;
-
- --nohash)
- texhashEnabled=false;;
- --nomkmap)
- mkmapEnabled=false;;
- --help|-help|-h)
- help;;
- --version)
- echo "$progname version $version"; (exit 0); exit 0;;
- "") break;;
- *) abort "$progname: unknown option \`$1'. Try $progname --help for help";;
- esac
- do test $# -gt 0 && shift; done
-
- if test -n "$cfgparam"; then
- if test -z "$cnfFile" || test ! -f "$cnfFile"; then
- abort "config file \`$cnfFileShort' not found"
- fi
- fi
-
- if test -n "$dvipdoutputdirparam"; then
- if test -z "$dvipdoutputdir" || test ! -d "$dvipdoutputdir"; then
- abort "dvips output directory \`$1' not found"
- fi
- fi
- if test -n "$pdftexoutputdirparam"; then
- if test -z "$pdftexoutputdir" || test ! -d "$pdftexoutputdir"; then
- abort "pdftex output directory \`$1' not found"
- fi
- fi
- if test -n "$dvipdfmoutputdirparam"; then
- if test -z "$dvipdfmoutputdir" || test ! -d "$dvipdfmoutputdir"; then
- abort "dvipdfm output directory \`$1' not found"
- fi
- fi
-
-}
-
-###############################################################################
-# listMaps()
-# list all maps mentioned in the config file
-###############################################################################
-listMaps()
-{
- egrep '^(#! *)?(Mixed)?Map' "$cnfFile"
-}
-
-###############################################################################
-# listAvailableMaps()
-# list maps mentioned in the config file if they are available
-###############################################################################
-listAvailableMaps()
-{
- # loop over each possible line in the config file (-> $line)
- # extract the name of the map file (-> $m)
- # check if the map file exists and in that case echo the line
- OLDIFS=$IFS
- IFS='
-'
- for line in `egrep '^(#! *)?(Mixed)?Map' "$cnfFile"`; do
- m=`echo "$line" | sed 's@[ ]*$@@; s@.*[ ]@@'`
- kpsewhich --format=map "$m" >/dev/null && echo "$line"
- done
- IFS=$OLDIFS
-}
-
-###############################################################################
-# syncWithTrees()
-# update the config file: uncomment all lines which refer to map files that
-# are unavailabe in the texmf trees
-###############################################################################
-syncWithTrees()
-{
- for i in `egrep '^(Mixed)?Map' "$cnfFile" | sed 's@.* @@'`; do
- kpsewhich --format=map "$i" >/dev/null || echo "$i"
- done > $tmp1
- {
- sed 's@/@\\/@g; s@^@/^MixedMap[ ]*@; s@$@$/s/^/#! /@' <$tmp1
- sed 's@/@\\/@g; s@^@/^Map[ ]*@; s@$@$/s/^/#! /@' <$tmp1
- } > $tmp2
- sed -f $tmp2 "$cnfFile" > $tmp3 && cat $tmp3 > "$cnfFile"
-}
-
-###############################################################################
-# normalizeLines()
-# remove comments, whitespace is exactly one space, no empty lines,
-# no whitespace at end of line, one space before and after ",
-# no CR's (as in skaknew).
-###############################################################################
-normalizeLines()
-{
- sed \
- -e '/^[*#;%]/d' \
- -e 's@[ ][ ]*@ @g' \
- -e '/^ *$/d' \
- -e 's@ $@@' \
- -e 's@ *" *@ " @g' \
- -e 's@" \([^"]*\) "@"\1"@g' \
- | tr -d '\r' \
- | sort | uniq
-}
-
-###############################################################################
-# dvips2dvipdfm()
-# reads from stdin, writes to stdout. It transforms "dvips"-like syntax into
-# "dvipdfm"-like syntax. It is a very ugly hack.
-###############################################################################
-dvips2dvipdfm()
-{
- sed -e 's@$@ %@' \
- -e 's@^\(\([^ ]*\).*\)@\1\2@' \
- -e 's@\(.*<\[* *\([^ ]*\)\.enc\(.*\)\)@\1 \2@' \
- -e '/%[^ ]*$/s@$@ default@' \
- -e 's@\(.*<<* *\([^ ]*\)\.pf[ab].*\)@\1 \2@' \
- -e '/%[^ ]* [^ ]*$/s@\( \([^ ]*\).*\)$@\1 \2@' \
- -e 's@\(.*[" ]\([.0-9-][.0-9-]*\) *ExtendFont.*\)@\1 -e \2@' \
- -e 's@\(.*[" ]\([.0-9-][.0-9-]*\) *SlantFont.*\)@\1 -s \2@' \
- -e 's@.*%@@' |
- awk '$1 == $3 && $2 == "default" {$2=""; $3=""} {print}' > $tmp8
-
- egrep '^(cm|eu|la|lc|line|msam|xy)' $tmp8 \
- | sed 's@$@ -r@; s@\(fmex[789]\) -r$@\1@'
- egrep -v '^(cm|eu|la|lc|line|msam|xy)' $tmp8
-}
-
-
-###############################################################################
-# mkMaps()
-# the main task of this script: create the output files
-###############################################################################
-mkMaps()
-{
- newline='
-'
- mode=`cfgval LW35`
- dvipsPreferOutline=`cfgval dvipsPreferOutline`
- dvipsDownloadBase35=`cfgval dvipsDownloadBase35`
- pdftexDownloadBase14=`cfgval pdftexDownloadBase14`
- dvipdfmDownloadBase14=`cfgval dvipdfmDownloadBase14`
-
- # defaults
- test -z "$mode" && mode=URWkb
- test -z "$dvipsPreferOutline" && dvipsPreferOutline=true
- test -z "$dvipsDownloadBase35" && dvipsDownloadBase35=false
- test -z "$pdftexDownloadBase14" && pdftexDownloadBase14=false
- test -z "$dvipdfmDownloadBase14" && dvipdfmDownloadBase14=false
-
- outputFiles="$dvipsoutputdir/download35.map
-$dvipsoutputdir/builtin35.map
-$dvipsoutputdir/psfonts_t1.map
-$dvipsoutputdir/psfonts_pk.map
-$pdftexoutputdir/pdftex_dl14.map
-$pdftexoutputdir/pdftex_ndl14.map
-$dvipdfmoutputdir/dvipdfm_dl14.map
-$dvipdfmoutputdir/dvipdfm_ndl14.map
-$dvipsoutputdir/ps2pk.map"
-
- outputLinks="$dvipsoutputdir/psfonts.map
-$pdftexoutputdir/pdftex.map
-$dvipdfmoutputdir/dvipdfm.map"
-
- allOutput="$outputFiles
-$outputLinks"
-
- notfound=false
- OLDIFS=$IFS; IFS=$newline
- for o in $allOutput; do
- test -f "$o" || notfound=true
- done
- IFS=$OLDIFS
- $notfound || texhashEnabled=false
-
- verboseCat <<-eof
- updmap: creating new map files using the following configuration:
-
- config file: \`$cnfFile'
- dvips output directory: \`$dvipsoutputdir'
- pdftex output directory: \`$pdftexoutputdir'
- dvipdfm output directory: \`$dvipdfmoutputdir'
-
- prefer outlines: \`$dvipsPreferOutline'
- texhash enabled: \`$texhashEnabled'
- download standard fonts (dvips): \`$dvipsDownloadBase35'
- download standard fonts (pdftex): \`$pdftexDownloadBase14'
- download standard fonts (dvipdfm): \`$dvipdfmDownloadBase14'
-eof
-
- verboseMsg
- verboseMsg "$progname: scanning for LW35 support files"
- dvips35=`locateMap dvips35.map` || cleanup 1
- pdftex35=`locateMap pdftex35.map` || cleanup 1
- dvipdfm35=`locateMap dvipdfm35.map` || cleanup 1
- ps2pk35=`locateMap ps2pk35.map` || cleanup 1
-
- if $chicken_mode; then
- echo
- echo "$progname: chicken mode, skipping all output generation, goodbye."
- exit 0
- fi
-
- verboseMsg
- verboseMsg "$progname: scanning for MixedMap entries:"
- catMaps '^MixedMap' > $tmp1 || cleanup 1
-
- verboseMsg
- verboseMsg "$progname: scanning for Map entries:"
- catMaps '^Map' > $tmp2 || cleanup 1
- verboseMsg
-
- # files should be world-readable
- umask 022
-
- OLDIFS=$IFS; IFS=$newline
- for file in $allOutput; do
- rm -f "$file"
- cat > "$file" <<-eof
- % $file: maintained by the script updmap.
- % Don't change this file directly. Edit texmf/web2c/$cnfFileShort
- % and run updmap to recreate this file.
-eof
- if test -n "$log"; then
- cat >> "$file" <<-eof
- % A log of the updmap run that has created this file is available here:
- % $log
-eof
- fi
- done
- IFS=$OLDIFS
-
- verboseMsg "$progname: generating output for ps2pk..."
- { transLW35 "$ps2pk35"; cat $tmp1 $tmp2; } \
- | normalizeLines >> "$dvipsoutputdir/ps2pk.map"
- verboseMsg "$progname: $ps2pk35 -> ps2pk.map"
-
- verboseMsg "$progname: generating output for dvips..."
- { transLW35 "$ps2pk35"; } \
- | normalizeLines >> "$dvipsoutputdir/download35.map"
- verboseMsg "$progname: $ps2pk35 -> download35.map"
- #
- { transLW35 "$dvips35"; } \
- | normalizeLines >> "$dvipsoutputdir/builtin35.map"
- verboseMsg "$progname: $dvips35 -> builtin35.map"
- #
- if test "x$dvipsDownloadBase35" = xtrue; then
- dftdvips=$ps2pk35
- else
- dftdvips=$dvips35
- fi
- { transLW35 "$dftdvips"; cat $tmp1 $tmp2; } \
- | normalizeLines >> "$dvipsoutputdir/psfonts_t1.map"
- verboseMsg "$progname: $dftdvips -> psfonts_t1.map"
- #
- { transLW35 "$dftdvips"; cat $tmp2; } \
- | normalizeLines >> "$dvipsoutputdir/psfonts_pk.map"
- verboseMsg "$progname: $dftdvips -> psfonts_pk.map"
-
- verboseMsg "$progname: generating output for pdftex..."
- # remove PaintType due to Sebastian's request
- { transLW35 "$pdftex35"; cat $tmp1 $tmp2; } \
- | grep -v PaintType | grep . > $tmp3
- verboseMsg "$progname: $pdftex35 -> pdftex_ndl14.map"
- <$tmp3 normalizeLines >> "$pdftexoutputdir/pdftex_ndl14.map"
-
- { transLW35 "$ps2pk35"; cat $tmp1 $tmp2; } \
- | grep -v PaintType | grep . > $tmp7
- verboseMsg "$progname: $ps2pk35 -> pdftex_dl14.map"
- <$tmp7 normalizeLines >> "$pdftexoutputdir/pdftex_dl14.map"
-
- verboseMsg "$progname: generating output for dvipdfm..."
- verboseMsg "$progname: $ps2pk35 -> dvipdfm_dl14.map"
- <$tmp7 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_dl14.map"
-
- { transLW35 "$dvipdfm35"; cat $tmp1 $tmp2; } \
- | grep -v PaintType | grep . > $tmp6
- verboseMsg "$progname: $dvipdfm35 -> dvipdfm_ndl14.map"
- <$tmp6 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_ndl14.map"
-
- verboseMsg "$progname: all output generated."
- verboseMsg
-
- setupSymlinks
- $texhashEnabled && { $verbose && texhash || texhash >/dev/null 2>&1; }
-
- verboseMsg
- verboseMsg "$progname: files generated:"
- OLDIFS=$IFS; IFS=$newline
- ls -l $outputFiles | verboseCat
- IFS=$OLDIFS
- verboseMsg
-
- verboseMsg "$progname: map file links or copies:"
- ls -l "$dvipsoutputdir"/psfonts.map \
- "$pdftexoutputdir"/pdftex.map \
- "$dvipdfmoutputdir"/dvipdfm.map | verboseCat
-
- if test -f $mapWarnCalled; then
- m="
-
-!!! NOTICE:
-
- With this release, the search paths for map files have been changed
- and we have found that some files exist in the new path as well as
- in the obsolete path.
-
- This is not an error per se, but please consider removing duplicates
- from the old location and search the above output"
-
- test -n "$log" && m="$m or the transcript file
- $log
- "
-
- m="$m for warnings.
-
- For more information about the changed search paths, see
- the release notes section in the teTeX manual. You probably
- can read this document by executing the command
- texdoc TETEXDOC
- else visit the web page
- http://tug.org/texlive/mapenc.html
-"
- warn "$m"
- fi
-
- verboseMsg
- verboseMsg "$progname: done."
- return 0
-}
-
-###############################################################################
-# main()
-# execution starts here
-###############################################################################
-main()
-{
- # initialize global variables
- progname=updmap
- cmd=
- log=
- chicken_mode=false
- link_cmd="ln -s"
- copy_cmd="cp"
- copy=false
- orig_pwd=`pwd`
-
- cfgparam=
- outputdirparam=
- cfgmaint=
- texhashEnabled=true
- mkmapEnabled=true
- verbose=true
- needsCleanup=false
-
- cnfFileShort=updmap.cfg
- cnfFile=
- dvipsoutputdir=; pdftexoutputdir=; dvipdfmoutputdir=
- : ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`}
-
- tmpdir=${TMPDIR-${TEMP-${TMP-/tmp}}}/$progname.$$
- tmp1=$tmpdir/a
- tmp2=$tmpdir/b
- tmp3=$tmpdir/c
- tmp4=$tmpdir/d
- tmp5=$tmpdir/e
- tmp6=$tmpdir/f
- tmp7=$tmpdir/g
- tmp8=$tmpdir/h
- mapWarnCalled=$tmpdir/mapWarnCalled
- catMapsFailed=$tmpdir/catMapsFailed
-
- processOptions ${1+"$@"}
-
- case "$cmd" in
- showoptions) showOptions "$showoptionsItem"; (exit 0); exit;;
- help) help; (exit 0); exit;;
- esac
-
- setupCfgFile
- case "$cmd" in
- listmaps) listMaps; (exit 0); exit;;
- listavailablemaps) listAvailableMaps; (exit 0); exit;;
- esac
-
- # keep a copy of config file, so that we can see if the file was modified
- setupTmpDir
-
- if test -n "$cfgmaint"; then
- if test -z "$cfgparam"; then
- co=`"$TEXMFMAIN/texconfig/tcfmgr" --tmp $tmpdir --cmd co --file $cnfFileShort`
- test $? = 0 || cleanup 1
- set x $co; shift
- id=$1; cnfFile=$3; orig=$4
- verboseMsg "$progname: initial config file is \`$orig'"
- else
- verboseMsg "$progname: config file is \`$cnfFile'"
- cp "$cnfFile" $tmp5
- fi
-
- case "$cmd" in
- edit)
- ${VISUAL-${EDITOR-vi}} "$cnfFile";;
- setoption)
- setOption "$setoptionOpt" "$setoptionVal";;
- enable)
- enableMap "$enableMapType" "$enableMapFile";;
- disable)
- disableMap "$disableMapFile";;
- syncwithtrees)
- syncWithTrees;;
- esac
-
- unchanged=true
- if test -z "$cfgparam"; then
- ci=`"$TEXMFMAIN/texconfig/tcfmgr" --tmp $tmpdir --cmd ci --id $id`
- test $? = 0 || cleanup 1
- case "$ci" in
- "") : ;;
- *) unchanged=false
- cnfFile=$ci
- ;;
- esac
- else
- cmp "$cnfFile" $tmp5 >/dev/null 2>&1 || unchanged=false
- fi
- case $unchanged in
- true) if $mkmapEnabled; then
- verboseMsg "$progname: configuration (updmap.cfg) unchanged. Map files will not be recreated."
- mkmapEnabled=false
- else
- verboseMsg "$progname: configuration (updmap.cfg) unchanged."
- fi;;
- *)
- verboseMsg "$progname: configuration file updated: \`$cnfFile'";;
- esac
- fi
-
- $mkmapEnabled || return
- setupDestDir
- mkMaps
-}
-
-main ${1+"$@"}
-cleanup 0
diff --git a/Build/source/texk/tetex/updmap-single.pl b/Build/source/texk/tetex/updmap-single.pl
deleted file mode 100755
index 58b51f986f3..00000000000
--- a/Build/source/texk/tetex/updmap-single.pl
+++ /dev/null
@@ -1,1546 +0,0 @@
-#! /usr/bin/env perl
-# updmap: utility to maintain map files for outline fonts.
-#
-# 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.
-
-BEGIN {
- $^W=1;
- chomp($TEXMFROOT = `kpsewhich -var-value=TEXMFROOT`);
- unshift (@INC, "$TEXMFROOT/tlpkg");
-}
-
-my $version = '$Id$';
-
-use strict;
-use TeXLive::TLUtils qw(mkdirhier mktexupd win32);
-use Getopt::Long;
-$Getopt::Long::autoabbrev=0;
-Getopt::Long::Configure (qw(ignore_case_always));
-
-my $short_progname = "updmap";
-
-my $cnfFile;
-my $cnfFileShort;
-my $outputdir;
-my $dvipsoutputdir;
-my $pdftexoutputdir;
-my $dvipdfmoutputdir;
-my $pxdvioutputdir;
-my $quiet;
-my $nohash;
-my $nomkmap;
-my (@psADOBE, @fileADOBE, @fileADOBEkb, @fileURW);
-
-my $enableItem;
-my @setoptions = ();
-my @showoptions = ();
-my @showoption = ();
-my @disableItem = ();
-my $listmaps;
-my $listavailablemaps;
-my $syncwithtrees;
-
-my $opt_edit;
-my $opt_force;
-my $opt_help;
-my $dry_run;
-my $TEXMFMAIN;
-my $TEXMFVAR;
-
-my $mode;
-my $dvipsPreferOutline;
-my $dvipsDownloadBase35;
-my $pdftexDownloadBase14;
-my $pxdviUse;
-my $kanjiEmbed;
-my $kanjiVariant;
-
-my $dvips35;
-my $pdftex35;
-my $ps2pk35;
-
-my $newcnf;
-my $copy;
-my %link;
-my %maps;
-my @missing;
-my $writelog = 0;
-my $cache = 0; # don't change!
-my $pdftexStripEnc = 0;
-
-# initialize mktexupd
-my $updLSR=&mktexupd();
-$updLSR->{mustexist}(0);
-
-my @cfg = ();
-
-&main;
-exit 0;
-
-
-# return program name + version string.
-sub version {
- my $ret = sprintf "%s (TeX Live) version %s\n", $short_progname, $version;
- return $ret;
-}
-
-###############################################################################
-# help()
-# display help message and exit
-#
-sub help {
- my $usage= <<"EOF";
-Usage: $short_progname [OPTION] ... [COMMAND]
- or: $short_progname-sys [OPTION] ... [COMMAND]
-
-Update the default font map files used by pdftex, dvips, and dvipdfm(x),
-(and optionally pxdvi) as determined by the configuration file updmap.cfg
-(the one returned by running "kpsewhich updmap.cfg").
-
-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
-fonts are embedded in the output.
-
-By default, the TeX filename database (ls-R) is also updated.
-
-Options:
- --cnffile FILE read FILE for the updmap configuration
- --dvipdfmoutputdir DIR specify output directory (kanjix.map)
- --dvipsoutputdir DIR specify output directory (dvips syntax)
- --pdftexoutputdir DIR specify output directory (pdftex syntax)
- --pxdvioutputdir DIR specify output directory (pxdvi syntax)
- --outputdir DIR specify output directory (for all files)
- --copy cp generic files rather than using symlinks
- --force recreate files even if config hasn't changed
- --nomkmap do not recreate map files
- --nohash do not run texhash
- -n, --dry-run only show the configuration, no output
- --quiet, --silent reduce verbosity
-
-Commands:
- --help show this message and exit
- --version show version information and exit
- --showoptions ITEM show alternatives for options
- --showoption ITEM show value of option
- --setoption OPTION VALUE set option, where OPTION is one of:
- LW35, dvipsPreferOutline, dvipsDownloadBase35,
- pdftexDownloadBase14, pxdviUse, kanjiEmbed,
- or kanjiVariant
- --setoption OPTION=VALUE as above, just different syntax
- --enable MAPTYPE MAPFILE add "MAPTYPE MAPFILE" to updmap.cfg,
- where MAPTYPE is one of: Map, MixedMap, KanjiMap
- --enable Map=MAPFILE add \"Map MAPFILE\" to updmap.cfg
- --enable MixedMap=MAPFILE add \"MixedMap MAPFILE\" to updmap.cfg
- --enable KanjiMap=MAPFILE add \"KanjiMap MAPFILE\" to updmap.cfg
- --disable MAPFILE disable MAPFILE, of any type
- --listmaps list all active and inactive maps
- --listavailablemaps same as --listmaps, but without
- unavailable map files
- --syncwithtrees disable unavailable map files in updmap.cfg
-
-Explanation of the map types: the (only) difference between Map and
-MixedMap is that MixedMap entries are not added to psfonts_pk.map.
-The purpose is to help users with printers that render Type 1 outline
-fonts worse than mode-tuned Type 1 bitmap fonts. So, MixedMap is used
-for fonts that are available as both Type 1 and Metafont.
-
-KanjiMap, on the other hand, specifies possibly several map files for
-Kanji font support; see below. KanjiMap entries are added to
-psfonts_t1.map and kanjix.map.
-
-Explanation of the --setoption possibilities:
-
- dvipsPreferOutline true|false (default true)
- Whether dvips uses bitmaps or outlines, when both are available.
- dvipsDownloadBase35 true|false (default false)
- Whether dvips includes the standard 35 PostScript fonts in its output.
- pdftexDownloadBase14 true|false (default true)
- Whether pdftex includes the standard 14 PDF fonts in its output.
- pxdviUse true|false (default false)
- Whether maps for pxdvi (Japanese-patched xdvi) is under control of updmap.
- kanjiEmbed any string, default noEmbed
- specify embedding and choice of Kanji fonts,
- kanjiVariant any string, default empty
- used as suffix for some Kanji maps; set to -04 for JIS2004.
- 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)
- ADOBE Adobe fonts with "vendor" filenames (e.g. hvnbo___.pfb)
-
- These options are only read and acted on by updmap; dvips, pdftex, etc.,
- do not know anything about them. They work by changing the default map
- file which the programs read, so they can be overridden by specifying
- command-line options or configuration files to the programs, as
- explained at the beginning of updmap.cfg.
-
- The options kanjiEmbed and kanjiVariant determine special replacements
- in map lines: the string \@kanjiEmbed\@ is replaced by the value of
- the respective option; similarly for kanjiVariant. These are useful
- on KanjiMap lines. This allows Japanese TeX users to easily select
- different fonts to be included in the final PDF output from dvipdfmx.
-
-Explanation of trees and files normally used:
-
- updmap both reads and writes TEXMFCONFIG/web2c/updmap.cfg, according
- to the actions specified.
-
- updmap writes the map files for dvips (psfonts.map) and pdftex
- (pdftex.map) to the TEXMFVAR/fonts/map/updmap/{dvips,pdftex}/
- directories. The map file for Kanji fonts, read by dvipdfmx, is
- written to TEXMFVAR/fonts/map/updmap/dvipdfm/kanjix.map.
-
- The log file is written to TEXMFVAR/web2c/updmap.log.
-
- When updmap-sys is run, TEXMFSYSCONFIG and TEXMFSYSVAR are used
- instead. This is the only difference between updmap-sys and updmap.
-
- Other locations can be used if overridden on the command line, or these
- trees don't exist, or you are not using the original TeX Live.
-
- To see the precise locations of the various files that
- will be read and written, give the -n option.
-
-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.
-
-Report bugs to: tex-k\@tug.org
-TeX Live home page: <http://tug.org/texlive/>
-EOF
-;
- print &version();
- print $usage;
- exit 0;
-}
-
-
-
-###############################################################################
-# processOptions()
-# process cmd line options
-#
-sub processOptions {
- #
- # We parse the command line twice. The first time is to handle
- # --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_one_or_two {
- my ($opt, $val) = @_;
- # check if = occurs in $val, if not, get the next argument
- if ($val =~ m/=/) {
- if ($opt eq "setoption") {
- push @setoptions, $val;
- } else {
- $enableItem = $val;
- }
- } else {
- my $vv = shift @ARGV;
- die "Try \"$0 --help\" for more information.\n"
- if !defined($vv);
- if ($opt eq "setoption") {
- push @setoptions, "$val=$vv";
- } else {
- $enableItem = "$val=$vv";
- }
- }
- }
- 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);
- unless (&GetOptions (
- "cnffile=s" => \$cnfFile,
- "copy" => \$copy,
- "disable=s" => \@disableItem,
- "dvipdfmoutputdir=s" => \$dvipdfmoutputdir,
- "dvipsoutputdir=s" => \$dvipsoutputdir,
- # "enable=s" => \$enableItem,
- "edit" => \$opt_edit,
- "force" => \$opt_force,
- "listavailablemaps" => \$listavailablemaps,
- "l|listmaps" => \$listmaps,
- "nohash" => \$nohash,
- "nomkmap" => \$nomkmap,
- "n|dry-run" => \$dry_run,
- "outputdir=s" => \$outputdir,
- "pdftexoutputdir=s" => \$pdftexoutputdir,
- "pxdvioutputdir=s" => \$pxdvioutputdir,
- "q|quiet|silent" => \$quiet,
- "setoption" =>
- sub {die "$0: --setoption needs an option and value; try --help.\n"},
- "showoptions=s" => \@showoptions,
- "showoption=s" => \@showoption,
- "syncwithtrees" => \$syncwithtrees,
- "version" => sub { print &version(); exit(0); },
- "h|help" => \$opt_help)) {
- die "Try \"$0 --help\" for more information.\n";
- }
-
- if (@ARGV) {
- warn "$0: Ignoring unexpected non-option argument(s): @ARGV.\n";
- }
-
- if ($outputdir) {
- $dvipsoutputdir = $outputdir if (! $dvipsoutputdir);
- $pdftexoutputdir = $outputdir if (! $pdftexoutputdir);
- $dvipdfmoutputdir = $outputdir if (! $dvipdfmoutputdir);
- $pxdvioutputdir = $outputdir if (! $pxdvioutputdir);
- }
- if ($cnfFile && ! -f $cnfFile) {
- die "$0: Config file \"$cnfFile\" not found.\n";
- }
- if ($dvipsoutputdir && ! $dry_run && ! -d $dvipsoutputdir) {
- &mkdirhier ($dvipsoutputdir);
- }
- if ($dvipdfmoutputdir && ! $dry_run && ! -d $dvipdfmoutputdir) {
- &mkdirhier ($dvipdfmoutputdir);
- }
- if ($pdftexoutputdir && ! $dry_run && ! -d $pdftexoutputdir) {
- &mkdirhier ($pdftexoutputdir);
- }
- if ($pxdvioutputdir && ! $dry_run && ! -d $pxdvioutputdir) {
- &mkdirhier ($pxdvioutputdir);
- }
-}
-
-
-###############################################################################
-# equalize_file(filename[, comment_char])
-# read a file and return its processed content as a string.
-# look into the source code for more details.
-#
-sub equalize_file {
- my $file=shift;
- my $comment=shift;
- my @temp;
-
- open IN, "$file";
- my @lines = (<IN>);
- close IN;
- chomp(@lines);
-
- for (@lines) {
- s/\s*${comment}.*// if (defined $comment); # remove comments
- next if /^\s*$/; # remove empty lines
- s/\s+/ /g; # replace multiple whitespace chars by a single one
- push @temp, $_;
- }
- return join('X', sort(@temp));
-}
-
-###############################################################################
-# files_are_different(file_A, file_B[, comment_char])
-# compare two equalized files.
-#
-sub files_are_different {
- my $file_A=shift;
- my $file_B=shift;
- my $comment=shift;
- my $retval=0;
-
- my $A=equalize_file("$file_A", $comment);
- my $B=equalize_file("$file_B", $comment);
- $retval=1 unless ($A eq $B);
- return $retval;
-}
-
-###############################################################################
-# files_are_equal(file_A, file_B[, comment_char])
-# compare two equalized files. Same as files_are_different() with
-# return value inverted.
-#
-sub files_are_equal {
- return (&files_are_different (@_))? 0:1;
-}
-
-###############################################################################
-# files_are_identical(file_A, file_B)
-# compare two files. Same as cmp(1).
-#
-sub files_are_identical {
- my $file_A=shift;
- my $file_B=shift;
- my $retval=0;
-
- open IN, "$file_A";
- my $A=(<IN>);
- close IN;
- open IN, "$file_B";
- my $B=(<IN>);
- close IN;
-
- $retval=1 if ($A eq $B);
- return $retval;
-}
-
-###############################################################################
-# getLines()
-#
-###############################################################################
-sub getLines {
- my @lines = ();
- foreach my $fname (@_) {
- next if (! $fname);
- if (! exists $maps{"$fname"}) {
- open FILE, "<$fname" or die "$0: can't get lines from $fname: $!";
- my @file=<FILE>;
- close FILE;
- if ($writelog) {
- print LOG ("\n$fname:\n");
- foreach my $line (@file) {
- next if $line =~ /^\s*%/; # comment
- next if $line =~ /^\s*#/; # comment
- next if $line =~ /^\s*$/; # empty line
- my $tfm;
- ($tfm)=split ' ', $line;
- print LOG "$tfm\n";
- }
- }
- $maps{"$fname"} = [ @file ] if ($cache);
- push @lines, @file;
- } else {
- push @lines, @{$maps{"$fname"}};
- }
- }
- chomp @lines;
- return @lines;
-}
-
-###############################################################################
-# writeLines()
-# write the lines in $filename
-#
-sub writeLines {
- my ($fname, @lines) = @_;
- map { ($_ !~ m/\n$/ ? s/$/\n/ : $_ ) } @lines;
- open FILE, ">$fname" or die "$0: can't write lines to $fname: $!";
- print FILE @lines;
- close FILE;
-}
-
-###############################################################################
-# copyFile()
-# copy file $src to $dst, sets $dst creation and mod time
-#
-sub copyFile {
- my ($src, $dst) = @_;
- my $dir;
- ($dir=$dst)=~s/(.*)\/.*/$1/;
- mkdirhier $dir;
-
- $src eq $dst && return "can't copy $src to itself!\n";
-
- open IN, "<$src" or die "$0: can't open source file $src for copying: $!";
- open OUT, ">$dst";
-
- binmode(IN);
- binmode(OUT);
- print OUT <IN>;
- close(OUT);
- close(IN);
- my @t = stat($src);
- utime($t[8], $t[9], $dst);
-}
-
-###############################################################################
-# SymlinkOrCopy(dir, src, dest)
-# create symlinks if possible, otherwise copy files
-#
-sub SymlinkOrCopy {
- my ($dir, $src, $dest) = @_;
- if (&win32 || $copy) { # always copy
- &copyFile("$dir/$src", "$dir/$dest");
- } else { # symlink if supported by fs, copy otherwise
- system("cd \"$dir\" && ln -s $src $dest 2>/dev/null || "
- . "cp -p \"$dir/$src\" \"$dir/$dest\"");
- }
- # remember for "Files generated" in &mkMaps.
- $link{"$dest"}="$src";
-}
-
-###############################################################################
-# setupSymlinks()
-# set symlink for psfonts.map according to dvipsPreferOutline variable
-#
-sub setupSymlinks {
- my $src;
-
- if ($dvipsPreferOutline) {
- $src = "psfonts_t1.map";
- } else {
- $src = "psfonts_pk.map";
- }
- unlink "$dvipsoutputdir/psfonts.map";
- &SymlinkOrCopy("$dvipsoutputdir", "$src", "psfonts.map");
-
- if ($pdftexDownloadBase14) {
- $src = "pdftex_dl14.map";
- } else {
- $src = "pdftex_ndl14.map";
- }
- unlink "$pdftexoutputdir/pdftex.map";
- &SymlinkOrCopy("$pdftexoutputdir", "$src", "pdftex.map");
-}
-
-
-###############################################################################
-# transLW35(args ...)
-# transform fontname and filenames according to transformation specified
-# by mode. Possible values:
-# URW|URWkb|ADOBE|ADOBEkb
-#
-sub transLW35 {
- my ($name) = @_;
- my @lines = &getLines($name);
-
- if ($mode eq "" || $mode eq "URWkb") {
- # do nothing
- } elsif ($mode eq "URW") {
- for my $r (@fileURW) {
- map { eval($r); } @lines;
- }
- } elsif ($mode eq "ADOBE" || $mode eq "ADOBEkb") {
- for my $r (@psADOBE) {
- map { eval($r); } @lines;
- }
- my @filemode = eval ("\@file" . $mode);
- for my $r (@filemode) {
- map { eval($r); } @lines;
- }
- }
- return @lines;
-}
-
-###############################################################################
-# locateWeb2c (file ...)
-# apply kpsewhich with format 'web2c files'
-#
-sub locateWeb2c {
- my @files = @_;
- return @files if ($#files < 0);
-
- @files = split (/\n/, `kpsewhich --format="web2c files" @files`);
- if (wantarray) {
- return @files;
- }
- else {
- return $files[0];
- }
-}
-
-###############################################################################
-# locateMap (file ...)
-# apply kpsewhich with format 'map'
-#
-sub locateMap {
- my @maps = @_;
- return @maps if ($#maps < 0);
-
- my @files = `kpsewhich --format=map @maps`;
- chomp @files;
-
- foreach my $map (@maps) {
- push @missing, $map if (! grep /\/$map(\.map)?$/, @files);
- }
-
- if (wantarray) {
- return @files;
- } else {
- return $files[0];
- }
-}
-
-
-###############################################################################
-# cfgval(variable)
-# read variable ($1) from config file
-#
-sub cfgval {
- my ($variable) = @_;
- my $value;
-
- if ($#cfg < 0) {
- open FILE, "<$cnfFile" or die "$0: can't open configuration file $cnfFile: $!";
- while (<FILE>) {
- s/\s*$//; # strip trailing spaces
- push @cfg, $_;
- }
- close FILE;
- chomp (@cfg);
- }
- for my $line (@cfg) {
- if ($line =~ m/^\s*${variable}[\s=]+(.*)\s*$/) {
- $value = $1;
- if ($value =~ m/^(true|yes|t|y|1)$/) {
- $value = 1;
- }
- elsif ($value =~ m/^(false|no|f|n|0)$/) {
- $value = 0;
- }
- last;
- }
- }
- return $value;
-}
-
-###############################################################################
-# configReplace(file, pattern, line)
-# The first line in file that matches pattern gets replaced by line.
-# line will be added at the end of the file if pattern does not match.
-#
-sub configReplace {
- my ($file, $pat, $line) = @_;
- my @lines = &getLines($file);
- my $found = 0;
- map {
- if (/$pat/) {
- $found = 1; $_ = $line;
- }
- } @lines;
- if (! $found) {
- push @lines, $line;
- }
- &writeLines($file, @lines);
-}
-
-###############################################################################
-# setOption (@options)
-# parse @options for "key=value" (one element of @options)
-# or "key", "value" (two elements of @options) pairs.
-# (These were the values provided to --setoption.)
-#
-sub setOptions {
- my (@options) = @_;
- for (my $i = 0; $i < @options; $i++) {
- my $o = $options[$i];
-
- my ($key,$val);
- if ($o =~ /=/) {
- ($key,$val) = split (/=/, $o, 2);
- } else {
- $key = $o;
- die "$0: no value for --setoption $key, goodbye.\n"
- if $i + 1 >= @options;
- $val = $options[$i + 1];
- $i++;
- }
-
- die "$0: unexpected empty key or val for options (@options), goodbye.\n"
- if !$key || !defined($val);
- &setOption ($key, $val);
- }
-}
-
-###############################################################################
-# setOption (option, value)
-# sets option to value in the config file (replacing the existing setting
-# or by adding a new line to the config file).
-#
-sub setOption {
- my ($opt, $val) = @_;
-
- if ($opt eq "LW35") {
- if ($val !~ m/^(URWkb|URW|ADOBE|ADOBEkb)$/) {
- die "$0: Invalid value $val for option $opt; try --help.\n";
- }
- } elsif ($opt =~
-m/^(dvipsPreferOutline|dvipsDownloadBase35|(pdftex|dvipdfm)DownloadBase14|pxdviUse)$/) {
- if ($val !~ m/^(true|false)$/) {
- die "$0: Invalid value $val for option $opt; should be \"true\" or \"false\".\n";
- }
- } elsif ($opt eq "kanjiEmbed" || $opt eq "kanjiVariant"){
- # do nothing
- } else {
- die "$0: Unsupported option $opt (value given: $val).\n";
- }
-
- # silently accept this old option name, just in case.
- return if $opt eq "dvipdfmDownloadBase14";
-
- #print "Setting option $opt to $val...\n" if !$quiet;
- &configReplace("$cnfFile", "^" . "$opt" . "\\s", "$opt $val");
-}
-
-###############################################################################
-# showOption(item item ...)
-# show current value for an item
-#
-sub showOption {
- sub doit {
- my ($a, $b) = @_;
- my $v = &cfgval($a);
- $v = $b unless (defined $v);
- print "$a=$v\n";
- }
- foreach my $item (@_) {
- doit("LW35", "URWkb") if ($item eq "LW35");
- doit("dvipsPreferOutline", 1) if ($item eq "dvipsPreferOutline");
- doit("dvipsDownloadBase35", 1) if ($item eq "dvipsDownloadBase35");
- doit("pdftexDownloadBase14", 1) if ($item eq "pdftexDownloadBase14");
- doit("kanjiEmbed", "noEmbed") if ($item eq "kanjiEmbed");
- doit("kanjiVariant", "") if ($item eq "kanjiVariant");
- doit("pxdviUse", 0) if ($item eq "pxdviUse");
- }
-}
-
-###############################################################################
-# showOptions(item)
-# show Options for an item
-#
-sub showOptions {
- foreach my $item (@_) {
- if ($item eq "LW35") {
- print "URWkb URW ADOBE ADOBEkb\n";
- }
- elsif ($item =~
-m/(dvipsPreferOutline|(dvipdfm|pdftex)DownloadBase14|dvipsDownloadBase35|pxdviUse)/) {
- print "true false\n";
- }
- elsif ($item eq "kanjiEmbed" || $item eq "kanjiVariant") {
- print "(any string)\n";
- }
- else {
- print "Unknown item \"$item\"; should be one of LW35, dvipsPreferOutline,\n"
- . " dvipsDownloadBase35, pdftexDownloadBase14, pxdviUse, kanjiEmbed, or kanjiVariant\n";
- }
- }
- exit 0
-}
-
-
-###############################################################################
-# enableMap (type, map)
-# enables an entry in the config file for map with a given type.
-#
-sub enableMap {
- my ($type, $map) = @_;
-
- if ($type !~ m/^(Map|MixedMap|KanjiMap)$/) {
- die "$0: Invalid mapType $type\n";
- }
- # a map can only have one type, so we carefully disable everything
- # about map here:
- &disableMap("$map");
-
- # now enable with the right type:
- &configReplace("$cnfFile", "^#!\\s*" . "$type" . "\\s*$map", "$type $map");
-}
-
-###############################################################################
-# disableMap (map)
-# disables map in config file (any type)
-#
-sub disableMap {
- my ($map) = @_;
- my %count = ();
- my $type;
-
- my @mapType = grep {
- my @fields = split;
- if ($fields[0] and $fields[0] =~ /^(MixedMap|Map|KanjiMap)$/
- and $fields[1] eq $map and ++$count{$fields[0]}) {
- $_ = $fields[0];
- }
- else {
- $_ = '';
- }
- } &getLines($cnfFile);
-
- foreach $type (@mapType) {
- &configReplace("$cnfFile", "^$type" . "\\s*$map", "#! $type $map");
- }
-}
-
-###############################################################################
-# setupDestDir()
-# find an output directory if none specified on cmd line. First choice is
-# $TEXMFVAR/fonts/map/updmap (if TEXMFVAR is set), next is relative to
-# config file location. Fallback is $TEXMFMAIN/fonts/map/updmap.
-#
-sub setupOutputDir {
- my($od, $driver) = @_;
-
- if (!$od) {
- my $rel = "fonts/map/$driver/updmap";
- my $tf;
- # Try TEXMFVAR tree. Use it if variable is set and $rel can
- # be written.
- chomp($tf = `kpsewhich --var-value=TEXMFVAR`);
- if ($tf) {
- &mkdirhier("$tf/$rel");
- if (! -w "$tf/$rel") {
- die "$0: Directory \"$tf/$rel\" isn't writable.\n";
- }
- }
- $od = "$tf/$rel";
- }
- &mkdirhier($od);
- print "$driver output dir: \"$od\"\n" if !$quiet;
- return $od;
-}
-
-sub setupDestDir {
- $dvipsoutputdir = &setupOutputDir($dvipsoutputdir, "dvips");
- $pdftexoutputdir = &setupOutputDir($pdftexoutputdir, "pdftex");
- $dvipdfmoutputdir = &setupOutputDir($dvipdfmoutputdir, "dvipdfm");
- $pxdvioutputdir = &setupOutputDir($pxdvioutputdir, "pxdvi");
-}
-
-###############################################################################
-# setupCfgFile()
-# find config file if none specified on cmd line.
-#
-sub setupCfgFile {
- if (! $cnfFile) {
- my $tf = `kpsewhich --var-value=TEXMFCONFIG`;
- chomp($tf);
- if ($tf && ! -f "$tf/web2c/$cnfFileShort") {
- &mkdirhier("$tf/web2c") if (! -d "$tf/web2c");
- if (-d "$tf/web2c" && -w "$tf/web2c") {
- unlink "$tf/web2c/$cnfFileShort";
- my $original_cfg=`kpsewhich updmap.cfg`;
- chomp($original_cfg);
- print("copy $original_cfg => $tf/web2c/$cnfFileShort\n") if !$quiet;
- $newcnf="$tf/web2c/$cnfFileShort";
- &copyFile("$original_cfg", "$tf/web2c/$cnfFileShort");
- $updLSR->{add}("$tf/web2c/$cnfFileShort");
- }
- }
- $cnfFile = "$tf/web2c/updmap.cfg";
- if (-s $cnfFile) {
- print "Config file: \"$cnfFile\"\n" if !$quiet;
- } else {
- die "$0: Config file updmap.cfg not found.\n";
- }
- }
-}
-
-###############################################################################
-# catMaps(regex)
-# filter config file by regex for map lines and extract the map filenames.
-# These are then looked up (by kpsewhich in locateMap) and the content of
-# all map files is send to stdout.
-#
-sub catMaps {
- my ($map) = @_;
- my %count = ( );
- my @maps = grep { $_ =~ m/$map/ } @cfg;
- map{
- $_ =~ s/\#.*//;
- # $_ =~ s/\@kanjiEmbed@/$kanjiEmbed/;
- # $_ =~ s/\@kanjiVariant@/$kanjiVariant/;
- $_ =~ s/\s*([^\s]*)\s*([^\s]*)/$2/;
- } @maps;
-
- my @newmaps;
- for my $m (@maps) {
- if ($m =~ m/\@kanjiEmbed@/ || $m =~ m/\@kanjiVariant@/) {
- my $newm = $m;
- $newm =~ s/\@kanjiEmbed@/$kanjiEmbed/;
- $newm =~ s/\@kanjiVariant@/$kanjiVariant/;
- my $mf = `kpsewhich --format=map $newm`;
- chomp($mf);
- if (!$mf) {
- print LOG "\n$short_progname: generated map $newm\n\tfrom $m\n\tdoes not exists, not activating it!\n";
- } else {
- push @newmaps, $newm;
- }
- } else {
- push @newmaps, $m;
- }
- }
- @maps = sort(@newmaps);
- @maps = grep { ++$count{$_} < 2; } @maps;
-
- @maps = &locateMap(@maps);
- return @maps;
-}
-
-###############################################################################
-# listMaps()
-# list all maps mentioned in the config file
-#
-sub listMaps {
- my $what=shift;
- my @mapfiles;
- my @paths;
- $kanjiEmbed = &cfgval("kanjiEmbed");
- $kanjiEmbed = "noEmbed" unless (defined $kanjiEmbed);
- $kanjiVariant = &cfgval("kanjiVariant");
- $kanjiVariant = "" unless (defined $kanjiVariant);
-
- my @lines = grep {
- if ($what eq 'sync') {
- $_ =~ m/^(Mixed|Kanji)?Map/
- } else {
- $_ =~ m/^(\#! *)?(Mixed|Kanji)?Map/
- }
- } &getLines($cnfFile);
-
- if ($what eq 'list') {
- # --listmaps
- map { print "$_\n"; } @lines;
- } else {
- map { $_ =~ s/\@kanjiEmbed@/$kanjiEmbed/ } @lines;
- map { $_ =~ s/\@kanjiVariant@/$kanjiVariant/ } @lines;
- @mapfiles=grep { $_ =~ s/^(\#! *)?(Mixed|Kanji)?Map\s+// } @lines;
- @paths=&locateMap(@mapfiles);
-
- if ($what eq 'avail') {
- # --listavailablemaps
- map {
- my $entry="$_";
- # that was disabled, but I don't understand why (NP)
- print "$entry\n" if (grep { $_ =~ m/\/$entry/ } @paths);
- } @lines;
- } elsif ($what eq 'sync') {
- # --syncwithtrees
- map {
- my $entry="$_";
- unless (grep { $_ =~ m/\/$entry/ } @paths) {
- &disableMap($entry);
- print " $entry disabled\n" if !$quiet;
- }
- } @lines;
- }
- }
-}
-
-###############################################################################
-# normalizeLines()
-# remove comments, whitespace is exactly one space, no empty lines,
-# no whitespace at end of line, one space before and after "
-#
-sub normalizeLines {
- my @lines = @_;
- my %count = ();
-
- @lines = grep { $_ !~ m/^[*#;%]/ } @lines;
- map {$_ =~ s/\s+/ /gx } @lines;
- @lines = grep { $_ !~ m/^\s*$/x } @lines;
- map { $_ =~ s/\s$//x ;
- $_ =~ s/\s*\"\s*/ \" /gx;
- $_ =~ s/\" ([^\"]*) \"/\"$1\"/gx;
- } @lines;
-
- @lines = grep {++$count{$_} < 2 } (sort @lines);
-
- return @lines;
-}
-
-###############################################################################
-# to_pdftex()
-# if $pdftexStripEnc is set, strip "PS_Encoding_Name ReEncodeFont"
-# from map entries; they are ignored by pdftex. But since the sh
-# incarnation of updmap included them, and we want to minimize
-# differences, this is not done by default.
-#
-sub to_pdftex {
- return @_ unless $pdftexStripEnc;
- my @in = @_;
- my @out;
- foreach my $line (@in) {
- if ($line =~ /^(.*\s+)(\S+\s+ReEncodeFont\s)(.*)/) {
- $line = "$1$3";
- $line =~ s/\s+\"\s+\"\s+/ /;
- }
- push @out, $line;
- }
- return @out;
-}
-
-###############################################################################
-# cidx2dvips()
-# reads from stdin, writes to stdout. It transforms "cid-x"-like syntax into
-# "dvips"-like syntax.
-###############################################################################
-sub cidx2dvips {
- my ($s) = @_;
- my @d;
- foreach (@$s) {
- s/,BoldItalic/ -s .3/;
- s/,Bold//;
- s/,Italic/ -s .3/;
- s/\s\s*/ /g;
- if ($_ =~ /.*[@\:\/,]/) {next;}
- elsif ($_ =~ /^[^ ][^ ]* unicode /) {next;}
- s/^([^ ][^ ]* [^ ][^ ]* [^ ][^ ]*)\.[Oo][Tt][Ff]/$1/;
- s/^([^ ][^ ]* [^ ][^ ]* [^ ][^ ]*)\.[Tt][Tt][FfCc]/$1/;
- s/$/ %/;
- s/^(([^ ]*).*)/$1$2/;
- s/^([^ ][^ ]* ([^ ][^ ]*) !*([^ ][^ ]*).*)/$1 $3-$2/;
- s/^(.* -e ([.0-9-][.0-9-]*).*)/$1 "$2 ExtendFont"/;
- s/^(.* -s ([.0-9-][.0-9-]*).*)/$1 "$2 SlantFont"/;
- s/.*%//;
- push(@d, $_);
- }
- return @d
-}
-
-
-###############################################################################
-# mkMaps()
-# the main task of this script: create the output files
-#
-sub mkMaps {
- my @lines;
- my $logfile;
-
- $cache=1;
-
- if (! $dry_run) {
- my $TEXMFVAR = `kpsewhich --var-value=TEXMFVAR`;
- chomp($TEXMFVAR);
- $logfile = "$TEXMFVAR/web2c/updmap.log";
- mkdirhier "$TEXMFVAR/web2c";
- open LOG, ">$logfile"
- or die "$0: Can't open log file \"$logfile\": $!";
- $writelog=1;
- print LOG &version();
- printf LOG "%s\n\n", scalar localtime();
- print LOG "Using config file \"$cnfFile\".\n";
- }
- sub wlog () {
- my $str=shift;
- if ($dry_run) {
- print $str;
- } else {
- print $str if !$quiet;
- print LOG $str;
- }
- }
- sub newline() {
- if ($dry_run) {
- print "\n";
- } else {
- print LOG "\n";
- }
- }
-
- $mode = &cfgval("LW35");
- $mode = "URWkb" unless (defined $mode);
-
- $dvipsPreferOutline = &cfgval("dvipsPreferOutline");
- $dvipsPreferOutline = 1 unless (defined $dvipsPreferOutline);
-
- $dvipsDownloadBase35 = &cfgval("dvipsDownloadBase35");
- $dvipsDownloadBase35 = 1 unless (defined $dvipsDownloadBase35);
-
- $pdftexDownloadBase14 = &cfgval("pdftexDownloadBase14");
- $pdftexDownloadBase14 = 1 unless (defined $pdftexDownloadBase14);
-
- $kanjiEmbed = &cfgval("kanjiEmbed");
- $kanjiEmbed = "noEmbed" unless (defined $kanjiEmbed);
-
- $kanjiVariant = &cfgval("kanjiVariant");
- $kanjiVariant = "" unless (defined $kanjiVariant);
-
- $pxdviUse = &cfgval("pxdviUse");
- $pxdviUse = 0 unless (defined $pxdviUse);
-
- &wlog ("\n$0 "
- . ($dry_run ? "would create" : "is creating") . " new map files"
- . "\nusing the following configuration:"
- . "\n LW35 font names : "
- . $mode
- . "\n prefer outlines : "
- . ($dvipsPreferOutline ? "true" : "false")
- . "\n texhash enabled : "
- . ($nohash ? "false" : "true")
- . "\n download standard fonts (dvips) : "
- . ($dvipsDownloadBase35 ? "true" : "false")
- . "\n download standard fonts (pdftex) : "
- . ($pdftexDownloadBase14 ? "true" : "false")
- . "\n kanjiEmbed/variant replacement : "
- . "$kanjiEmbed/$kanjiVariant"
- . "\n create a mapfile for pxdvi : "
- . ($pxdviUse ? "true" : "false")
- . "\n\n");
-
- &wlog ("Scanning for LW35 support files");
- $dvips35 = &locateMap("dvips35.map");
- $pdftex35 = &locateMap("pdftex35.map");
- $ps2pk35 = &locateMap("ps2pk35.map");
- my $LW35 = "\n$dvips35\n$pdftex35\n$ps2pk35\n\n";
- if ($dry_run) {
- print $LW35;
- } else {
- print LOG $LW35;
- }
- printf " [%3d files]\n", 3 unless ($quiet || $dry_run);
-
- &wlog ("Scanning for MixedMap entries");
- &newline;
- my @tmp1 = &catMaps('^MixedMap');
- foreach my $line (@tmp1) {
- if ($dry_run) {
- print "$line\n";
- } else {
- print LOG "$line\n";
- }
- }
- &newline;
- printf " [%3d files]\n", scalar @tmp1
- unless ($quiet || $dry_run);
-
- &wlog ("Scanning for KanjiMap entries");
- &newline;
- my @tmpkanji0 = &catMaps('^KanjiMap');
- foreach my $line (@tmpkanji0) {
- if ($dry_run) {
- print "$line\n";
- } else {
- print LOG "$line\n";
- }
- }
- &newline;
- printf " [%3d files]\n", scalar @tmpkanji0
- unless ($quiet || $dry_run);
-
- &wlog ("Scanning for Map entries");
- &newline();
- my @tmp2 = &catMaps('^Map');
- foreach my $line (@tmp2) {
- if ($dry_run) {
- print "$line\n";
- } else {
- print LOG "$line\n";
- }
- }
- &newline;
- printf " [%3d files]\n\n", scalar @tmp2
- unless ($quiet || $dry_run);
-
- if (@missing > 0) {
- print STDERR "\nERROR: The following map file(s) couldn't be found:\n\t";
- print STDERR join(' ', @missing);
- print STDERR "\n\n\tDid you run mktexlsr?\n\n" .
- "\tYou can delete non-existent map entries using the option\n".
- "\t --syncwithtrees.\n\n";
- exit (1);
- }
- exit(0) if $dry_run;
-
- # Create psfonts_t1.map, psfonts_pk.map, ps2pk.map and pdftex.map:
- my @managed_files = ("$dvipsoutputdir/download35.map",
- "$dvipsoutputdir/builtin35.map",
- "$dvipsoutputdir/psfonts_t1.map",
- "$dvipsoutputdir/psfonts_pk.map",
- "$pdftexoutputdir/pdftex_dl14.map",
- "$pdftexoutputdir/pdftex_ndl14.map",
- "$dvipdfmoutputdir/kanjix.map",
- "$dvipsoutputdir/ps2pk.map");
- if ($pxdviUse) {
- push @managed_files, "$pxdvioutputdir/xdvi-ptex.map";
- }
- for my $file (@managed_files) {
- open FILE, ">$file";
- print FILE "% $file:\
-% maintained by updmap[-sys].\
-% Don't change this file directly. Use updmap[-sys] instead.\
-% See texmf/web2c/$cnfFileShort and the updmap documentation.\
-% A log of the run that created this file is available here:\
-% $logfile\
-";
- close FILE;
- }
-
- print "Generating output for dvipdfm...\n" if !$quiet;
- my @tmpkanji1;
- push @tmpkanji1, &getLines(@tmpkanji0);
- @tmpkanji1 = &normalizeLines(@tmpkanji1);
- &writeLines(">$dvipdfmoutputdir/kanjix.map",
- @tmpkanji1);
-
- if ($pxdviUse) {
- # we use the very same data as for kanjix.map, but generate
- # a different file, so that in case a user wants to hand-craft it
- print "Generating output for pxdvi...\n" if !$quiet;
- &writeLines(">$pxdvioutputdir/xdvi-ptex.map",
- @tmpkanji1);
- }
-
- print "Generating output for ps2pk...\n" if !$quiet;
- my @ps2pk_map = &transLW35($ps2pk35);
- push @ps2pk_map, &getLines(@tmp1);
- push @ps2pk_map, &getLines(@tmp2);
- &writeLines(">$dvipsoutputdir/ps2pk.map",
- &normalizeLines(@ps2pk_map));
-
- print "Generating output for dvips...\n" if !$quiet;
- my @download35_map = &transLW35($ps2pk35);
- &writeLines(">$dvipsoutputdir/download35.map",
- &normalizeLines(@download35_map));
-
- my @builtin35_map = &transLW35($dvips35);
- &writeLines(">$dvipsoutputdir/builtin35.map",
- &normalizeLines(@builtin35_map));
-
- my $dftdvips = ($dvipsDownloadBase35 ? $ps2pk35 : $dvips35);
-
- my @psfonts_t1_map = &transLW35($dftdvips);
- my @tmpkanji2 = &cidx2dvips(\@tmpkanji1);
- push @psfonts_t1_map, &getLines(@tmp1);
- push @psfonts_t1_map, &getLines(@tmp2);
- push @psfonts_t1_map, @tmpkanji2;
- &writeLines(">$dvipsoutputdir/psfonts_t1.map",
- &normalizeLines(@psfonts_t1_map));
-
- my @psfonts_pk_map = &transLW35($dftdvips);
- push @psfonts_pk_map, &getLines(@tmp2);
- push @psfonts_pk_map, @tmpkanji2;
- &writeLines(">$dvipsoutputdir/psfonts_pk.map",
- &normalizeLines(@psfonts_pk_map));
-
- print "Generating output for pdftex...\n" if !$quiet;
- # remove PaintType due to Sebastian's request
- my @tmp3 = &transLW35($pdftex35);
- push @tmp3, &getLines(@tmp1);
- push @tmp3, &getLines(@tmp2);
- @tmp3 = grep { $_ !~ m/(^%|PaintType)/ } @tmp3;
-
- my @tmp7 = &transLW35($ps2pk35);
- push @tmp7, &getLines(@tmp1);
- push @tmp7, &getLines(@tmp2);
- @tmp7 = grep { $_ !~ m/(^%|PaintType)/ } @tmp7;
-
- my @pdftex_ndl14_map = @tmp3;
- @pdftex_ndl14_map = &normalizeLines(@pdftex_ndl14_map);
- @pdftex_ndl14_map = &to_pdftex(@pdftex_ndl14_map);
- &writeLines(">$pdftexoutputdir/pdftex_ndl14.map", @pdftex_ndl14_map);
-
- my @pdftex_dl14_map = @tmp7;
- @pdftex_dl14_map = &normalizeLines(@pdftex_dl14_map);
- @pdftex_dl14_map = &to_pdftex(@pdftex_dl14_map);
- &writeLines(">$pdftexoutputdir/pdftex_dl14.map", @pdftex_dl14_map);
-
- &setupSymlinks;
-
- &wlog ("\nFiles generated:\n");
- sub dir {
- my ($d, $f, $target)=@_;
- if (-e "$d/$f") {
- my @stat=lstat("$d/$f");
- my ($s,$m,$h,$D,$M,$Y)=localtime($stat[9]);
- my $timestamp=sprintf ("%04d-%02d-%02d %02d:%02d:%02d",
- $Y+1900, $M+1, $D, $h, $m, $s);
- my $date=sprintf "%12d %s %s", $stat[7], $timestamp, $f;
- &wlog ($date);
-
- if (-l "$d/$f") {
- my $lnk=sprintf " -> %s\n", readlink ("$d/$f");
- &wlog ($lnk);
- } elsif ($f eq $target) {
- if (&files_are_identical("$d/$f", "$d/$link{$target}")) {
- &wlog (" = $link{$target}\n");
- } else {
- &wlog (" = ?????\n"); # This shouldn't happen.
- }
- } else {
- &wlog ("\n");
- }
- } else {
- print STDERR "Warning: File $d/$f doesn't exist.\n";
- print LOG "Warning: File $d/$f doesn't exist.\n";
- }
- }
- my $d;
- $d="$dvipsoutputdir"; &wlog (" $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");
- }
- $d="$pdftexoutputdir"; &wlog (" $d:\n");
- foreach my $f ('pdftex_dl14.map', 'pdftex_ndl14.map', 'pdftex.map') {
- dir ($d, $f, 'pdftex.map');
- $updLSR->{add}("$d/$f");
- }
- $d="$dvipdfmoutputdir"; &wlog (" $d:\n");
- foreach my $f ('kanjix.map') {
- dir ($d, $f, '');
- $updLSR->{add}("$d/$f");
- }
- if ($pxdviUse) {
- $d="$pxdvioutputdir"; &wlog (" $d:\n");
- foreach my $f ('xdvi-ptex.map') {
- dir ($d, $f, '');
- $updLSR->{add}("$d/$f");
- }
- }
- close LOG;
- print "\nTranscript written on \"$logfile\".\n" if !$quiet;
-}
-
-
-###############################################################################
-# initVars()
-# initialize global variables
-#
-sub initVars {
- $quiet = 0;
- $nohash = 0;
- $nomkmap = 0;
- $cnfFile = "";
- $cnfFileShort = "updmap.cfg";
- $outputdir = "";
- chomp($TEXMFMAIN =`kpsewhich --var-value=TEXMFMAIN`);
-
- @psADOBE = (
- 's/ URWGothicL-Demi / AvantGarde-Demi /',
- 's/ URWGothicL-DemiObli / AvantGarde-DemiOblique /',
- 's/ URWGothicL-Book / AvantGarde-Book /',
- 's/ URWGothicL-BookObli / AvantGarde-BookOblique /',
- 's/ URWBookmanL-DemiBold / Bookman-Demi /',
- 's/ URWBookmanL-DemiBoldItal / Bookman-DemiItalic /',
- 's/ URWBookmanL-Ligh / Bookman-Light /',
- 's/ URWBookmanL-LighItal / Bookman-LightItalic /',
- 's/ NimbusMonL-Bold / Courier-Bold /',
- 's/ NimbusMonL-BoldObli / Courier-BoldOblique /',
- 's/ NimbusMonL-Regu / Courier /',
- 's/ NimbusMonL-ReguObli / Courier-Oblique /',
- 's/ NimbusSanL-Bold / Helvetica-Bold /',
- 's/ NimbusSanL-BoldCond / Helvetica-Narrow-Bold /',
- 's/ NimbusSanL-BoldItal / Helvetica-BoldOblique /',
- 's/ NimbusSanL-BoldCondItal / Helvetica-Narrow-BoldOblique /',
- 's/ NimbusSanL-Regu / Helvetica /',
- 's/ NimbusSanL-ReguCond / Helvetica-Narrow /',
- 's/ NimbusSanL-ReguItal / Helvetica-Oblique /',
- 's/ NimbusSanL-ReguCondItal / Helvetica-Narrow-Oblique /',
- 's/ CenturySchL-Bold / NewCenturySchlbk-Bold /',
- 's/ CenturySchL-BoldItal / NewCenturySchlbk-BoldItalic /',
- 's/ CenturySchL-Roma / NewCenturySchlbk-Roman /',
- 's/ CenturySchL-Ital / NewCenturySchlbk-Italic /',
- 's/ URWPalladioL-Bold / Palatino-Bold /',
- 's/ URWPalladioL-BoldItal / Palatino-BoldItalic /',
- 's/ URWPalladioL-Roma / Palatino-Roman /',
- 's/ URWPalladioL-Ital / Palatino-Italic /',
- 's/ StandardSymL / Symbol /',
- 's/ NimbusRomNo9L-Medi / Times-Bold /',
- 's/ NimbusRomNo9L-MediItal / Times-BoldItalic /',
- 's/ NimbusRomNo9L-Regu / Times-Roman /',
- 's/ NimbusRomNo9L-ReguItal / Times-Italic /',
- 's/ URWChanceryL-MediItal / ZapfChancery-MediumItalic /',
- 's/ Dingbats / ZapfDingbats /',
- );
-
- @fileADOBEkb = (
- 's/\buagd8a.pfb\b/pagd8a.pfb/',
- 's/\buagdo8a.pfb\b/pagdo8a.pfb/',
- 's/\buagk8a.pfb\b/pagk8a.pfb/',
- 's/\buagko8a.pfb\b/pagko8a.pfb/',
- 's/\bubkd8a.pfb\b/pbkd8a.pfb/',
- 's/\bubkdi8a.pfb\b/pbkdi8a.pfb/',
- 's/\bubkl8a.pfb\b/pbkl8a.pfb/',
- 's/\bubkli8a.pfb\b/pbkli8a.pfb/',
- 's/\bucrb8a.pfb\b/pcrb8a.pfb/',
- 's/\bucrbo8a.pfb\b/pcrbo8a.pfb/',
- 's/\bucrr8a.pfb\b/pcrr8a.pfb/',
- 's/\bucrro8a.pfb\b/pcrro8a.pfb/',
- 's/\buhvb8a.pfb\b/phvb8a.pfb/',
- 's/\buhvb8ac.pfb\b/phvb8an.pfb/',
- 's/\buhvbo8a.pfb\b/phvbo8a.pfb/',
- 's/\buhvbo8ac.pfb\b/phvbo8an.pfb/',
- 's/\buhvr8a.pfb\b/phvr8a.pfb/',
- 's/\buhvr8ac.pfb\b/phvr8an.pfb/',
- 's/\buhvro8a.pfb\b/phvro8a.pfb/',
- 's/\buhvro8ac.pfb\b/phvro8an.pfb/',
- 's/\buncb8a.pfb\b/pncb8a.pfb/',
- 's/\buncbi8a.pfb\b/pncbi8a.pfb/',
- 's/\buncr8a.pfb\b/pncr8a.pfb/',
- 's/\buncri8a.pfb\b/pncri8a.pfb/',
- 's/\buplb8a.pfb\b/pplb8a.pfb/',
- 's/\buplbi8a.pfb\b/pplbi8a.pfb/',
- 's/\buplr8a.pfb\b/pplr8a.pfb/',
- 's/\buplri8a.pfb\b/pplri8a.pfb/',
- 's/\busyr.pfb\b/psyr.pfb/',
- 's/\butmb8a.pfb\b/ptmb8a.pfb/',
- 's/\butmbi8a.pfb\b/ptmbi8a.pfb/',
- 's/\butmr8a.pfb\b/ptmr8a.pfb/',
- 's/\butmri8a.pfb\b/ptmri8a.pfb/',
- 's/\buzcmi8a.pfb\b/pzcmi8a.pfb/',
- 's/\buzdr.pfb\b/pzdr.pfb/',
- );
-
- @fileURW = (
- 's/\buagd8a.pfb\b/a010015l.pfb/',
- 's/\buagdo8a.pfb\b/a010035l.pfb/',
- 's/\buagk8a.pfb\b/a010013l.pfb/',
- 's/\buagko8a.pfb\b/a010033l.pfb/',
- 's/\bubkd8a.pfb\b/b018015l.pfb/',
- 's/\bubkdi8a.pfb\b/b018035l.pfb/',
- 's/\bubkl8a.pfb\b/b018012l.pfb/',
- 's/\bubkli8a.pfb\b/b018032l.pfb/',
- 's/\bucrb8a.pfb\b/n022004l.pfb/',
- 's/\bucrbo8a.pfb\b/n022024l.pfb/',
- 's/\bucrr8a.pfb\b/n022003l.pfb/',
- 's/\bucrro8a.pfb\b/n022023l.pfb/',
- 's/\buhvb8a.pfb\b/n019004l.pfb/',
- 's/\buhvb8ac.pfb\b/n019044l.pfb/',
- 's/\buhvbo8a.pfb\b/n019024l.pfb/',
- 's/\buhvbo8ac.pfb\b/n019064l.pfb/',
- 's/\buhvr8a.pfb\b/n019003l.pfb/',
- 's/\buhvr8ac.pfb\b/n019043l.pfb/',
- 's/\buhvro8a.pfb\b/n019023l.pfb/',
- 's/\buhvro8ac.pfb\b/n019063l.pfb/',
- 's/\buncb8a.pfb\b/c059016l.pfb/',
- 's/\buncbi8a.pfb\b/c059036l.pfb/',
- 's/\buncr8a.pfb\b/c059013l.pfb/',
- 's/\buncri8a.pfb\b/c059033l.pfb/',
- 's/\buplb8a.pfb\b/p052004l.pfb/',
- 's/\buplbi8a.pfb\b/p052024l.pfb/',
- 's/\buplr8a.pfb\b/p052003l.pfb/',
- 's/\buplri8a.pfb\b/p052023l.pfb/',
- 's/\busyr.pfb\b/s050000l.pfb/',
- 's/\butmb8a.pfb\b/n021004l.pfb/',
- 's/\butmbi8a.pfb\b/n021024l.pfb/',
- 's/\butmr8a.pfb\b/n021003l.pfb/',
- 's/\butmri8a.pfb\b/n021023l.pfb/',
- 's/\buzcmi8a.pfb\b/z003034l.pfb/',
- 's/\buzdr.pfb\b/d050000l.pfb/',
- );
-
- @fileADOBE = (
- 's/\buagd8a.pfb\b/agd_____.pfb/',
- 's/\buagdo8a.pfb\b/agdo____.pfb/',
- 's/\buagk8a.pfb\b/agw_____.pfb/',
- 's/\buagko8a.pfb\b/agwo____.pfb/',
- 's/\bubkd8a.pfb\b/bkd_____.pfb/',
- 's/\bubkdi8a.pfb\b/bkdi____.pfb/',
- 's/\bubkl8a.pfb\b/bkl_____.pfb/',
- 's/\bubkli8a.pfb\b/bkli____.pfb/',
- 's/\bucrb8a.pfb\b/cob_____.pfb/',
- 's/\bucrbo8a.pfb\b/cobo____.pfb/',
- 's/\bucrr8a.pfb\b/com_____.pfb/',
- 's/\bucrro8a.pfb\b/coo_____.pfb/',
- 's/\buhvb8a.pfb\b/hvb_____.pfb/',
- 's/\buhvb8ac.pfb\b/hvnb____.pfb/',
- 's/\buhvbo8a.pfb\b/hvbo____.pfb/',
- 's/\buhvbo8ac.pfb\b/hvnbo___.pfb/',
- 's/\buhvr8a.pfb\b/hv______.pfb/',
- 's/\buhvr8ac.pfb\b/hvn_____.pfb/',
- 's/\buhvro8a.pfb\b/hvo_____.pfb/',
- 's/\buhvro8ac.pfb\b/hvno____.pfb/',
- 's/\buncb8a.pfb\b/ncb_____.pfb/',
- 's/\buncbi8a.pfb\b/ncbi____.pfb/',
- 's/\buncr8a.pfb\b/ncr_____.pfb/',
- 's/\buncri8a.pfb\b/nci_____.pfb/',
- 's/\buplb8a.pfb\b/pob_____.pfb/',
- 's/\buplbi8a.pfb\b/pobi____.pfb/',
- 's/\buplr8a.pfb\b/por_____.pfb/',
- 's/\buplri8a.pfb\b/poi_____.pfb/',
- 's/\busyr.pfb\b/sy______.pfb/',
- 's/\butmb8a.pfb\b/tib_____.pfb/',
- 's/\butmbi8a.pfb\b/tibi____.pfb/',
- 's/\butmr8a.pfb\b/tir_____.pfb/',
- 's/\butmri8a.pfb\b/tii_____.pfb/',
- 's/\buzcmi8a.pfb\b/zcmi____.pfb/',
- 's/\buzdr.pfb\b/zd______.pfb/',
- );
-}
-
-
-###############################################################################
-# main()
-#
-sub main {
- &initVars;
- &processOptions;
-
- &help if ($opt_help);
-
- if (@showoptions) {
- &showOptions(@showoptions);
- exit 0;
- }
-
- &setupCfgFile;
-
- if (@showoption) {
- &showOption(@showoption);
- exit 0;
- }
- if ($listmaps) {
- &listMaps ('list');
- exit 0;
- }
- if ($listavailablemaps) {
- &listMaps ('avail');
- exit 0;
- }
- if ($syncwithtrees) {
- &listMaps ('sync');
- exit 0;
- }
-
- my $bakFile = $cnfFile;
- $bakFile =~ s/\.cfg$/.bak/;
- &copyFile($cnfFile, $bakFile);
-
- my $cmd = '';
-
- if ($opt_edit) {
- # it's not a good idea to edit updmap.cfg manually these days,
- # but for compatibility we'll silently keep the option.
- $cmd = 'edit';
- my $editor = $ENV{'VISUAL'} || $ENV{'EDITOR'};
- $editor ||= (&win32 ? "notepad" : "vi");
- system($editor, $cnfFile);
-
- } elsif (@setoptions) {
- $cmd = 'setOption';
- &setOptions (@setoptions);
-
- } elsif ($enableItem) {
- $cmd = 'enableMap';
- if ($enableItem =~ /=/) {
- &enableMap(split('=', $enableItem));
- } else {
- &enableMap($enableItem, shift @ARGV);
- }
-
- } elsif (@disableItem) {
- $cmd = 'disableMap';
- foreach my $m (@disableItem) {
- &disableMap($m);
- }
- }
-
- if ($cmd && !$opt_force && &files_are_equal($bakFile, $cnfFile)) {
- print "$cnfFile unchanged. Map files not recreated.\n" if !$quiet;
- } else {
- if (! $nomkmap) {
- &setupDestDir;
- &mkMaps;
- }
- unlink ($bakFile);
- }
-
- unless ($nohash) {
- print "$0: Updating ls-R files.\n" if !$quiet;
- $updLSR->{exec}()
- }
-}
-__END__
-
-### Local Variables:
-### perl-indent-level: 2
-### tab-width: 2
-### indent-tabs-mode: nil
-### End:
-# vim:set tabstop=2 expandtab: #
diff --git a/Build/source/texk/texlive/context/Makefile.am b/Build/source/texk/texlive/context/Makefile.am
index 3554daae853..22c4b1a4b20 100644
--- a/Build/source/texk/texlive/context/Makefile.am
+++ b/Build/source/texk/texlive/context/Makefile.am
@@ -12,19 +12,15 @@
if !WIN32
dist_bin_SCRIPTS = \
- context \
ctxtools \
luatools \
- mtxrun \
pstopdf \
texexec \
texmfstart
endif !WIN32
dist_man1_MANS = \
- context.man \
ctxtools.man \
- mptopdf.man \
pstopdf.man \
texexec.man \
texmfstart.man
diff --git a/Build/source/texk/texlive/context/Makefile.in b/Build/source/texk/texlive/context/Makefile.in
index 54e771c18c9..7388bf1c7a6 100644
--- a/Build/source/texk/texlive/context/Makefile.in
+++ b/Build/source/texk/texlive/context/Makefile.in
@@ -59,8 +59,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
-am__dist_bin_SCRIPTS_DIST = context ctxtools luatools mtxrun pstopdf \
- texexec texmfstart
+am__dist_bin_SCRIPTS_DIST = ctxtools luatools pstopdf texexec \
+ texmfstart
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -187,18 +187,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
@WIN32_FALSE@dist_bin_SCRIPTS = \
-@WIN32_FALSE@ context \
@WIN32_FALSE@ ctxtools \
@WIN32_FALSE@ luatools \
-@WIN32_FALSE@ mtxrun \
@WIN32_FALSE@ pstopdf \
@WIN32_FALSE@ texexec \
@WIN32_FALSE@ texmfstart
dist_man1_MANS = \
- context.man \
ctxtools.man \
- mptopdf.man \
pstopdf.man \
texexec.man \
texmfstart.man
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am
index 2c6964f1786..9f4354ef8dc 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.am
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.am
@@ -36,10 +36,17 @@ installdirs-local:
# dangling symlinks produced by `make install'.
# The instances in texmf* are the masters (except when it is CTAN).
#
+## We distinguish several classes of scripts according to their
+## destination in texmf/scripts/ or texmf-dist/scripts/ and their
+## type: `shell', `context', or `other'. On Unix systems a symlink
+## from $(bindir) to the script is installed for all of them;
+## on Windows nothing is installed in $(bindir) for `shell' scripts
+## whereas for `other' (usually perl, lua, ...) scripts the standard
+## wrapper ../w32_wrapper/runscript.exe is installed or the ConTeXt
+## wrapper ../w32_wrapper/context/mtxrun.exe for `context' scripts.
+## Note that some /bin/sh scripts are listed as `other' or `context'
+## scripts because they are correctly handled by the wrapper binaries.
texmf_scriptsdir = $(datarootdir)/texmf/scripts
-## We distinguish shell and other (perl, lua, python, ruby, ...) scripts.
-## Some shell scripts are, however, listed under *_other_scripts because
-## they are correctly handled by ../w32_wrapper/runscript.exe.
texmf_shell_scripts = \
tetex/fmtutil.sh \
tetex/texconfig.sh \
@@ -50,9 +57,11 @@ texmf_other_scripts = \
tetex/fmtutil-sys.sh \
texlive/rungs.tlu \
texlive/tlmgr.pl
+texmf_context_scripts =
nobase_dist_texmf_scripts_SCRIPTS = \
$(texmf_shell_scripts) \
- $(texmf_other_scripts)
+ $(texmf_other_scripts) \
+ $(texmf_context_scripts)
texmf_dist_scriptsdir = $(datarootdir)/texmf-dist/scripts
texmf_dist_shell_scripts = \
@@ -159,9 +168,13 @@ texmf_dist_other_scripts = \
uptex/convbkmk.rb \
urlbst/urlbst \
vpe/vpe.pl
+texmf_dist_context_scripts = \
+ context/lua/mtxrun.lua \
+ context/shell/context.sh
nobase_dist_texmf_dist_scripts_SCRIPTS = \
$(texmf_dist_shell_scripts) \
- $(texmf_dist_other_scripts)
+ $(texmf_dist_other_scripts) \
+ $(texmf_dist_context_scripts)
## Symlinks within $(bindir): FILE:LINK indicates LINK->FILE
bin_links = \
@@ -178,6 +191,8 @@ endif !WIN32
## Manpages
dist_man_MANS = \
+ context/context.1 \
+ context/mptopdf.1 \
tetex/allcm.1 \
tetex/allec.1 \
tetex/allneeded.1 \
@@ -210,6 +225,9 @@ man1_links = \
include $(top_srcdir)/../am/man1_links.am
+## Old ../../tetex/ChangeLog
+EXTRA_DIST += tetex/ChangeLog
+
## Support files
texconfigdir = $(datarootdir)/texmf/texconfig
dist_texconfig_SCRIPTS = tetex/tcfmgr
@@ -241,6 +259,7 @@ dist_web2c_DATA = tetex/fmtutil.cnf
EXTRA_DIST += ../../../build-aux/relpath
relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath
runscript = $(top_srcdir)/w32_wrapper/runscript.exe
+ctxscript = $(top_srcdir)/w32_wrapper/context/mtxrun.exe
install-data-hook: installdirs-local install-man1-links
if WIN32
@for s in $(texmf_other_scripts) $(texmf_dist_other_scripts); do \
@@ -248,6 +267,11 @@ if WIN32
echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \
$(INSTALL_SCRIPT) $(runscript) $(DESTDIR)$(bindir)/$$t.exe; \
done
+ @for s in $(texmf_context_scripts) $(texmf_dist_context_scripts); do \
+ t=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
+ echo "$(INSTALL_SCRIPT) '$(ctxscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \
+ $(INSTALL_SCRIPT) $(ctxscript) $(DESTDIR)$(bindir)/$$t.exe; \
+ done
@for s in $(bin_links); do \
link=`echo $$s | sed 's,.*:,,'`; \
echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$link.exe'"; \
@@ -332,8 +356,6 @@ xupdmap.1: tetex/updmap.help2man tetex/updmap.pl
EXTRA_DIST += tetex/updmap.help2man
##
-web2cdir = $(datarootdir)/texmf/web2c
-
.PHONY: run-texlinks
## This target is invoked by the top-level make,
## to create the per-format engine symlinks in $(bindir),
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in
index e69c8546cc5..45ff89688b0 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.in
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.in
@@ -226,7 +226,7 @@ DISTCLEANFILES = scripts-list
#
# We support native builds, multiplatform or not, as well as distro builds.
#
-EXTRA_DIST = scripts.lst ../../../build-aux/relpath \
+EXTRA_DIST = scripts.lst tetex/ChangeLog ../../../build-aux/relpath \
tetex/updmap.help2man
# Copies of these scripts exist here for the sake of avoiding
@@ -246,9 +246,11 @@ texmf_other_scripts = \
texlive/rungs.tlu \
texlive/tlmgr.pl
+texmf_context_scripts =
nobase_dist_texmf_scripts_SCRIPTS = \
$(texmf_shell_scripts) \
- $(texmf_other_scripts)
+ $(texmf_other_scripts) \
+ $(texmf_context_scripts)
texmf_dist_scriptsdir = $(datarootdir)/texmf-dist/scripts
texmf_dist_shell_scripts = \
@@ -357,12 +359,19 @@ texmf_dist_other_scripts = \
urlbst/urlbst \
vpe/vpe.pl
+texmf_dist_context_scripts = \
+ context/lua/mtxrun.lua \
+ context/shell/context.sh
+
nobase_dist_texmf_dist_scripts_SCRIPTS = \
$(texmf_dist_shell_scripts) \
- $(texmf_dist_other_scripts)
+ $(texmf_dist_other_scripts) \
+ $(texmf_dist_context_scripts)
bin_links = epstopdf:repstopdf pdfcrop:rpdfcrop $(am__append_1)
dist_man_MANS = \
+ context/context.1 \
+ context/mptopdf.1 \
tetex/allcm.1 \
tetex/allec.1 \
tetex/allneeded.1 \
@@ -400,6 +409,7 @@ web2cdir = $(datarootdir)/texmf/web2c
dist_web2c_DATA = tetex/fmtutil.cnf
relpath = $(SHELL) $(top_srcdir)/../../build-aux/relpath
runscript = $(top_srcdir)/w32_wrapper/runscript.exe
+ctxscript = $(top_srcdir)/w32_wrapper/context/mtxrun.exe
@WIN32_TRUE@WINEXT = $(EXEEXT)
run_texlinks = $(DESTDIR)$(bindir)/texlinks -v \
-f $(DESTDIR)$(web2cdir)/fmtutil.cnf \
@@ -913,6 +923,11 @@ install-data-hook: installdirs-local install-man1-links
@WIN32_TRUE@ echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \
@WIN32_TRUE@ $(INSTALL_SCRIPT) $(runscript) $(DESTDIR)$(bindir)/$$t.exe; \
@WIN32_TRUE@ done
+@WIN32_TRUE@ @for s in $(texmf_context_scripts) $(texmf_dist_context_scripts); do \
+@WIN32_TRUE@ t=`basename $$s | sed 's,\.[^/]*$$,,' | tr '[A-Z]' '[a-z]'`; \
+@WIN32_TRUE@ echo "$(INSTALL_SCRIPT) '$(ctxscript)' '$(DESTDIR)$(bindir)/$$t.exe'"; \
+@WIN32_TRUE@ $(INSTALL_SCRIPT) $(ctxscript) $(DESTDIR)$(bindir)/$$t.exe; \
+@WIN32_TRUE@ done
@WIN32_TRUE@ @for s in $(bin_links); do \
@WIN32_TRUE@ link=`echo $$s | sed 's,.*:,,'`; \
@WIN32_TRUE@ echo "$(INSTALL_SCRIPT) '$(runscript)' '$(DESTDIR)$(bindir)/$$link.exe'"; \
diff --git a/Build/source/texk/texlive/context/context.man b/Build/source/texk/texlive/linked_scripts/context/context.1
index 254d9b87468..254d9b87468 100644
--- a/Build/source/texk/texlive/context/context.man
+++ b/Build/source/texk/texlive/linked_scripts/context/context.1
diff --git a/Build/source/texk/texlive/context/mtxrun b/Build/source/texk/texlive/linked_scripts/context/lua/mtxrun.lua
index 108f2a8a112..108f2a8a112 100755
--- a/Build/source/texk/texlive/context/mtxrun
+++ b/Build/source/texk/texlive/linked_scripts/context/lua/mtxrun.lua
diff --git a/Build/source/texk/texlive/context/mptopdf.man b/Build/source/texk/texlive/linked_scripts/context/mptopdf.1
index 3c547f06aa8..3c547f06aa8 100644
--- a/Build/source/texk/texlive/context/mptopdf.man
+++ b/Build/source/texk/texlive/linked_scripts/context/mptopdf.1
diff --git a/Build/source/texk/texlive/context/context b/Build/source/texk/texlive/linked_scripts/context/shell/context.sh
index fa62ba8d109..fa62ba8d109 100755
--- a/Build/source/texk/texlive/context/context
+++ b/Build/source/texk/texlive/linked_scripts/context/shell/context.sh
diff --git a/Build/source/texk/texlive/linked_scripts/scripts.lst b/Build/source/texk/texlive/linked_scripts/scripts.lst
index ec6dca1810f..72f6aded605 100644
--- a/Build/source/texk/texlive/linked_scripts/scripts.lst
+++ b/Build/source/texk/texlive/linked_scripts/scripts.lst
@@ -111,4 +111,6 @@ ulqda/ulqda.pl
uptex/convbkmk.rb
urlbst/urlbst
vpe/vpe.pl
+context/lua/mtxrun.lua
+context/shell/context.sh
'
diff --git a/Build/source/texk/tetex/ChangeLog b/Build/source/texk/texlive/linked_scripts/tetex/ChangeLog
index 459ffe2f408..459ffe2f408 100644
--- a/Build/source/texk/tetex/ChangeLog
+++ b/Build/source/texk/texlive/linked_scripts/tetex/ChangeLog