1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

- Fix longstanding bugs in updmap(1) which prevent it from

working with map files for dvipdfm.

- updmap(1) now supports --progname option.

- Bump PORTREVISION.
This commit is contained in:
Hiroki Sato 2006-06-29 18:46:38 +00:00
parent 109c00ec04
commit d5f333d66d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166616
5 changed files with 293 additions and 8 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= teTeX-base
PORTVERSION= 3.0
PORTREVISION= 8
PORTREVISION= 9
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_TEX_CTAN} \
ftp://ftp.ascii.co.jp/pub/TeX/ascii-ptex/dvips/:1
@ -130,6 +130,7 @@ TEXMFVARDIR= share/texmf-var
MKTEXLSR= ${PREFIX}/bin/mktexlsr
FMTUTIL_SYS= ${PREFIX}/bin/fmtutil-sys
UPDMAP_SYS= ${PREFIX}/bin/updmap-sys
UPDMAPDIR= ${TEXMFDIR}/updmap
PLIST_SUB+= TEXMFDIR=${TEXMFDIR} \
TEXMFCONFIGDIR=${TEXMFCONFIGDIR} \
@ -138,10 +139,12 @@ PLIST_SUB+= TEXMFDIR=${TEXMFDIR} \
MKTEXLSR=${MKTEXLSR} \
FMTUTIL_SYS=${FMTUTIL_SYS} \
UPDMAP_SYS=${UPDMAP_SYS} \
UPDMAPDIR=${UPDMAPDIR} \
SETENV=${SETENV}
SUB_FILES= pkg-message texdoctk.wrapper
SUB_FILES= pkg-message texdoctk.wrapper updmap.wrapper
SUB_LIST= TEXMFDIR=${TEXMFDIR} \
TEXMFDISTDIR=${TEXMFDISTDIR} \
UPDMAPDIR=${UPDMAPDIR} \
PREFIX=${PREFIX}
OLDCONFIG= web2c/texmf.cnf web2c/mktex.cnf web2c/fmtutil.cnf \
web2c/updmap.cfg \
@ -169,10 +172,18 @@ pre-su-install:
${PREFIX}/${TEXMFCONFIGDIR}/web2c/updmap.cfg
post-install:
${MKDIR} ${PREFIX}/${TEXMFCONFIGDIR}/texconfig
${INSTALL_DATA} ${PREFIX}/${TEXMFDIR}/texconfig/tcfmgr.map \
${PREFIX}/${TEXMFCONFIGDIR}/texconfig/tcfmgr.map
${INSTALL_SCRIPT} ${WRKSRC}/utils/texinfo/util/texi2dvi ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/utils/texinfo/util/texi2pdf ${PREFIX}/bin
${MV} -f ${PREFIX}/bin/texdoctk ${PREFIX}/bin/texdoctk.real
${INSTALL_SCRIPT} ${WRKDIR}/texdoctk.wrapper ${PREFIX}/bin/texdoctk
${MKDIR} ${PREFIX}/${UPDMAPDIR}
${MV} -f ${PREFIX}/bin/updmap-sys ${PREFIX}/${UPDMAPDIR}/updmap-sys.dist
${MV} -f ${PREFIX}/bin/updmap ${PREFIX}/${UPDMAPDIR}/updmap.dist
${INSTALL_SCRIPT} ${WRKDIR}/updmap.wrapper ${PREFIX}/bin/updmap-sys
${INSTALL_SCRIPT} ${WRKDIR}/updmap.wrapper ${PREFIX}/bin/updmap
${MKTEXLSR}
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}

View File

@ -0,0 +1,228 @@
--- texk/tetex/updmap.orig Thu Jun 29 14:46:31 2006
+++ texk/tetex/updmap Fri Jun 30 02:40:50 2006
@@ -266,6 +266,7 @@
###############################################################################
catMaps()
{
+ type=$1; shift
rm -f $catMapsFailed
egrep "$1" "$cnfFile" \
| sed 's@#.*@@' \
@@ -275,14 +276,18 @@
| grep . > $tmp4
while read map; do
- file=`locateMap "$map"` || { touch $catMapsFailed; break; }
-
+ file=`locateMap ${type}_catmap "$map"` || \
+ { echo "NG" >> $catMapsFailed; break; }
+ set -- ${file}
+ posttype=$1
+ file=$2
+
# 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; }
+ test -n "$file" && { cat "$file" | $posttype; echo; }
done < $tmp4
- if test -f $catMapsFailed; then
+ if test -s $catMapsFailed; then
false; return 1
else
true; return 0
@@ -579,11 +584,15 @@
###############################################################################
locateMap()
{
+ case $# in
+ 2) type=$1; shift ;;
+ *) type=map; ;;
+ esac
# Always use the "migration checking version". This might become
# consigurable, but for now, we always want to check.
if :; then
- locateMapMigrate "$@"
+ locateMapMigrate $type "$@"
return $?
fi
@@ -607,10 +616,38 @@
###############################################################################
locateMapMigrate()
{
+ type=$1; shift
+
for map
do
- # look up using the new search path
- file=`kpsewhich --format=map "$map"`
+ posttype=cat
+ case $type in
+ dvipdfm)
+ prog=dvipdfm
+ file=`kpsewhich --progname=tmpdvipdfm --format="other text files" "$map"`
+ if ! [ -f "${file}" ]; then
+ file=`kpsewhich --progname=tmpdvips --format="other text files" "$map"`
+ fi
+ ;;
+ dvipdfm_catmap)
+ prog=dvipdfm
+ file=`kpsewhich --progname=tmpdvipdfm --format="other text files" "$map"`
+ if ! [ -f "${file}" ]; then
+ posttype=dvips2dvipdfm
+ file=`kpsewhich --progname=tmpdvips --format="other text files" "$map"`
+ fi
+ ;;
+ dvips*)
+ prog=dvips
+ file=`kpsewhich --progname=tmpdvips --format="other text files" "$map"`
+ if ! [ -f "${file}" ]; then
+ file=`kpsewhich --format=map "$map"`
+ fi
+ ;;
+ *)
+ prog=map
+ file=`kpsewhich --format=map "$map"` ;;
+ esac
# look up using the old search path
file2=`kpsewhich --format='dvips config' "$map"`
@@ -621,8 +658,11 @@
if test -f "$file"; then
- verboseMsg "$progname: using map file \`$file'"
- echo "$file"
+ verboseMsg "$progname: using map file \`$file' (for $prog)"
+ case ${type} in
+ *_catmap) echo "$posttype $file" ;;
+ *) echo "$file" ;;
+ esac
# we have found the file where we should. If we have additional
# ones: complain!
@@ -679,7 +719,7 @@
$3
Please, consider removing this file.
"
- touch $mapWarnCalled
+ echo "NG" >> $mapWarnCalled
;;
manualResolve)
warn "
@@ -694,7 +734,7 @@
content of the used map file. Additionally, consider removing the
obsolete file.
"
- touch $mapWarnCalled
+ echo "NG" >> $mapWarnCalled
;;
badLocation)
map=$2
@@ -761,7 +801,6 @@
trap 'cleanup' 1 2 3 7 13 15
needsCleanup=true
- mkdir "$tmpdir" || abort "could not create directory \`$tmpdir'"
}
###############################################################################
@@ -1064,6 +1103,7 @@
###############################################################################
dvips2dvipdfm()
{
+ normalizeLines | \
sed -e 's@$@ %@' \
-e 's@^\(\([^ ]*\).*\)@\1\2@' \
-e 's@\(.*<\[* *\([^ ]*\)\.enc\(.*\)\)@\1 \2@' \
@@ -1150,13 +1190,14 @@
dvipdfm35=`locateMap dvipdfm35.map` || cleanup
ps2pk35=`locateMap ps2pk35.map` || cleanup
+ # for dvips maps
verboseMsg
verboseMsg "$progname: Scanning for MixedMap entries:"
- catMaps '^MixedMap' > $tmp1 || cleanup
+ catMaps dvips '^MixedMap' > $tmp1 || cleanup
verboseMsg
verboseMsg "$progname: Scanning for Map entries:"
- catMaps '^Map' > $tmp2 || cleanup
+ catMaps dvips '^Map' > $tmp2 || cleanup
verboseMsg
# files should be world-readable
@@ -1205,9 +1246,26 @@
<$tmp3 normalizeLines >> "$pdftexoutputdir/pdftex_ndl14.map"
<$tmp7 normalizeLines >> "$pdftexoutputdir/pdftex_dl14.map"
+ # for dvipdfm maps
+ verboseMsg
+ verboseMsg "$progname: Scanning for dvipdfm MixedMap entries:"
+ catMaps dvipdfm '^MixedMap' > $tmp1 || cleanup
+
+ verboseMsg
+ verboseMsg "$progname: Scanning for dvipdfm Map entries:"
+ catMaps dvipdfm '^Map' > $tmp2 || cleanup
+ verboseMsg
+
+ { transLW35 "$dvipdfm35" | normalizeLines | \
+ dvips2dvipdfm; cat $tmp1 $tmp2; } \
+ | grep -v PaintType | grep . > $tmp6
+ { transLW35 "$ps2pk35" | normalizeLines | \
+ dvips2dvipdfm; cat $tmp1 $tmp2; } \
+ | grep -v PaintType | grep . > $tmp7
+
verboseMsg "$progname: Generating output for dvipdfm..."
- <$tmp7 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_dl14.map"
- <$tmp6 normalizeLines | dvips2dvipdfm | normalizeLines >> "$dvipdfmoutputdir/dvipdfm_ndl14.map"
+ <$tmp7 normalizeLines >> "$dvipdfmoutputdir/dvipdfm_dl14.map"
+ <$tmp6 normalizeLines >> "$dvipdfmoutputdir/dvipdfm_ndl14.map"
verboseMsg "$progname: All output generated!"
verboseMsg
@@ -1228,7 +1286,7 @@
| awk '{print $(NF-2), $(NF-1), $NF}' | verboseCat
verboseMsg
- if test -f $mapWarnCalled; then
+ if test -s $mapWarnCalled; then
m="
!!! NOTICE:
@@ -1281,18 +1339,22 @@
cnfFile=
dvipsoutputdir=; pdftexoutputdir=; dvipdfmoutputdir=
: ${TEXMFMAIN=`kpsewhich -var-value=TEXMFMAIN`}
+ TMPDVIPDFMINPUTS=`kpsewhich -var-value TEXFONTMAPS`"//dvipdfm//"
+ TMPDVIPSINPUTS=`kpsewhich -var-value TEXFONTMAPS`"//dvips//"
+ export TMPDVIPDFMINPUTS
+ export TMPDVIPSINPUTS
- tmpdir=${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
+ tmpdir=`mktemp -d ${TMP-/tmp}/$progname.XXXXXXX`
+ tmp1=`mktemp $tmpdir/a.XXXXXX`
+ tmp2=`mktemp $tmpdir/b.XXXXXX`
+ tmp3=`mktemp $tmpdir/c.XXXXXX`
+ tmp4=`mktemp $tmpdir/d.XXXXXX`
+ tmp5=`mktemp $tmpdir/e.XXXXXX`
+ tmp6=`mktemp $tmpdir/f.XXXXXX`
+ tmp7=`mktemp $tmpdir/g.XXXXXX`
+ tmp8=`mktemp $tmpdir/h.XXXXXX`
+ mapWarnCalled=`mktemp $tmpdir/mapWarnCalled.XXXXXX`
+ catMapsFailed=`mktemp $tmpdir/catMapsFailed.XXXXXX`
processOptions ${1+"$@"}

View File

@ -1,7 +1,9 @@
You may want to run texconfig to configure teTeX for your
local environment. You will find teTeX's local documentation
in %%PREFIX%%/%%TEXMFDISTDIR%%/doc/.
=== IMPORTANT NOTICE ===
Note that if you have environment variables for teTeX in a wrong
way (such as TEXINPUTS, TEXMF, TEXMFCNF, and so on),
they may prevent teTeX from working.
- You may want to run texconfig(1) to configure teTeX for your
local environment. You will find teTeX's local documentation
in %%PREFIX%%/%%TEXMFDISTDIR%%/doc/.
- Note that if you have environment variables for teTeX in a wrong
way (such as TEXINPUTS, TEXMF, TEXMFCNF, and so on),
they may prevent teTeX from working.

View File

@ -0,0 +1,39 @@
#!/bin/sh
# $FreeBSD$
EXECBASE=${0##*/}
EXECPREFIX=%%PREFIX%%/%%UPDMAPDIR%%/updmap
EXECSUFFIX=dist
OPTS=""
case ${EXECBASE} in
*-sys) v=`%%PREFIX%%/bin/kpsewhich -var-value TEXMFSYSVAR`
c=`%%PREFIX%%/bin/kpsewhich -var-value TEXMFSYSCONFIG`
TEXMFVAR="$v"; export TEXMFVAR
TEXMFCONFIG="$c"; export TEXMFCONFIG
;;
esac
for F in "$@"; do
case $F in
--help) exec ${EXECPREFIX}.${EXECSUFFIX} --help ;;
--progname=*) EXECSUFFIX=${F#--progname=} ;;
--*) OPTS="${OPTS} ${F}" ;;
*) OPTS="${OPTS} \"${F}\"" ;;
esac
done
WEB2C='$TEXMF/web2c'; export WEB2C
UPDMAP_DIST=${EXECPREFIX}.dist; export UPDMAP_DIST
case ${EXECSUFFIX} in
all)
for E in ${EXECPREFIX}.*
do
if [ -f "${E}" ]; then eval "${E} ${OPTS}"; fi
done
;;
*)
E=${EXECPREFIX}.${EXECSUFFIX}
if [ -f "${E}" ]; then eval "exec ${E} ${OPTS}"; fi
;;
esac

View File

@ -203,7 +203,12 @@ lib/libkpathsea.a
%%TEXMFDIR%%/texconfig/generic
%%TEXMFDIR%%/texconfig/tcfmgr
%%TEXMFDIR%%/texconfig/tcfmgr.map
%%TEXMFCONFIGDIR%%/texconfig/tcfmgr.map
@dirrm %%TEXMFCONFIGDIR%%/texconfig
%%TEXMFDIR%%/release-tetex-src.txt
%%UPDMAPDIR%%/updmap-sys.dist
%%UPDMAPDIR%%/updmap.dist
@dirrm %%UPDMAPDIR%%
@exec %%MKTEXLSR%%
@exec %%SETENV%% PATH=${PATH}:%D/bin TEXMFMAIN=%D/%%TEXMFDIR%% %%UPDMAP_SYS%%
@unexec rm -f %D/%%TEXMFVARDIR%%/fonts/map/dvips/updmap/download35.map