1994-10-01 00:00:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# paper size, default is no nor A4
|
|
|
|
A4=n
|
|
|
|
#default font cache directory: must be world writable
|
|
|
|
CACHE=/tmp
|
|
|
|
|
1994-10-04 15:12:57 +00:00
|
|
|
if [ ! -f ${WRKSRC}/MakeTeXPK.orig ]; then
|
|
|
|
mv ${WRKSRC}/MakeTeXPK ${WRKSRC}/MakeTeXPK.orig || exit 1
|
1994-10-01 00:00:16 +00:00
|
|
|
fi
|
|
|
|
#find the resolutions
|
1994-10-04 15:12:57 +00:00
|
|
|
RES=`awk '{if(/test $BDPI/) printf "%s ",$5}' < ${WRKSRC}/MakeTeXPK.orig`
|
1994-10-01 00:00:16 +00:00
|
|
|
# and the corresponding modes
|
1994-10-04 15:12:57 +00:00
|
|
|
MODES=`awk -F= '{if(/MODE=[a-zA-Z]/) print $2}' < ${WRKSRC}/MakeTeXPK.orig`
|
1994-10-01 00:00:16 +00:00
|
|
|
set $MODES
|
|
|
|
echo "I need to set the mode of our printing/output device for the resolutions"
|
|
|
|
echo "$RES dpi. (the mode must be in your modes.mf file)"
|
|
|
|
SUBST=
|
|
|
|
for i in $RES; do
|
|
|
|
echo -n "mode for $i dpi [$1]: ";
|
|
|
|
read answ; if [ "$answ" = "" ]; then answ=$1; fi
|
|
|
|
SUBST="$SUBST -e s/MODE=$1/MODE=$answ/"
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Choose a font cache directory for automatic font generation"
|
|
|
|
echo -n "(this directory must be world writable) [$CACHE]: "
|
|
|
|
read answ; if [ "$answ" != "" ]; then CACHE=$answ; fi
|
|
|
|
|
|
|
|
sed -e s:/usr/lib/tex:/usr/local/lib/texmf: \
|
|
|
|
-e s:/LocalLibrary/Fonts/TeXFonts:$CACHE: \
|
1994-10-04 15:12:57 +00:00
|
|
|
$SUBST <${WRKSRC}/MakeTeXPK.orig >${WRKSRC}/MakeTeXPK
|
1994-10-01 00:00:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Imakefile
|
1994-10-04 15:12:57 +00:00
|
|
|
chmod +w ${WRKSRC}/Imakefile
|
|
|
|
echo "OSDEFS=" >> ${WRKSRC}/Imakefile || exit 1;
|
|
|
|
echo "OPTIONDEFS=-DUSE_PK -DGREY -DPS_GS -DMAKEPK -DBUTTONS" >> ${WRKSRC}/Imakefile
|
|
|
|
echo "DEFAULT_FONT_PATH=/usr/local/lib/texmf/fonts/pk:$CACHE/pk" >> ${WRKSRC}/Imakefile
|
|
|
|
echo "DEFAULT_VF_PATH=/usr/local/lib/texmf/fonts/vf" >> ${WRKSRC}/Imakefile
|
1994-10-01 00:00:16 +00:00
|
|
|
exit 0;
|