1994-10-01 00:00:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
1997-03-09 22:52:25 +00:00
|
|
|
if [ X$PACKAGE_BUILDING = X ]; then
|
|
|
|
READ=read
|
|
|
|
else
|
|
|
|
READ=_read
|
|
|
|
fi
|
|
|
|
_read () {
|
|
|
|
echo
|
|
|
|
answ=""
|
|
|
|
}
|
|
|
|
|
1994-11-17 01:04:17 +00:00
|
|
|
# paper size, default is not A4
|
1994-10-01 00:00:16 +00:00
|
|
|
A4=n
|
1995-04-20 02:04:02 +00:00
|
|
|
|
|
|
|
prefix=$PREFIX;
|
|
|
|
if `echo $PREFIX |grep -q X11` ; then
|
|
|
|
prefix=/usr/local
|
|
|
|
fi
|
1997-02-10 02:08:55 +00:00
|
|
|
CACHE=$prefix/share/texmf/fonts
|
1995-04-20 02:04:02 +00:00
|
|
|
|
1995-06-13 20:59:35 +00:00
|
|
|
if [ -f $PREFIX/bin/MakeTeXPK ]; then
|
1995-04-20 02:04:02 +00:00
|
|
|
echo "**WARNING** MakeTeXPK already exists in $PREFIX/bin"
|
1995-04-22 00:16:06 +00:00
|
|
|
echo "**WARNING** This file will be replaced during install."
|
|
|
|
echo
|
1995-04-20 02:04:02 +00:00
|
|
|
fi
|
1994-10-01 00:00:16 +00:00
|
|
|
|
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]: ";
|
1997-03-09 22:52:25 +00:00
|
|
|
$READ answ; if [ "$answ" = "" ]; then answ=$1; fi
|
1994-10-01 00:00:16 +00:00
|
|
|
SUBST="$SUBST -e s/MODE=$1/MODE=$answ/"
|
1994-11-17 01:04:17 +00:00
|
|
|
if [ $i = 600 -a $answ != imagen ]; then
|
|
|
|
SUBST="$SUBST -e s/MAG=\"/_MAG=\"/"
|
|
|
|
fi
|
1994-10-01 00:00:16 +00:00
|
|
|
shift
|
|
|
|
done
|
1998-12-01 21:14:08 +00:00
|
|
|
|
1995-04-22 00:16:06 +00:00
|
|
|
echo
|
1995-04-20 02:04:02 +00:00
|
|
|
echo "Choose a font directory for automatic font generation."
|
1995-04-22 00:16:06 +00:00
|
|
|
echo "------------------------------------------------------"
|
1995-04-20 02:04:02 +00:00
|
|
|
echo "The default directory is $CACHE. If you"
|
|
|
|
echo "don't want to make this directory world writable, then you"
|
|
|
|
echo "can choose eg. /tmp. Then you will have to periodically move "
|
|
|
|
echo "the files to $CACHE/pk."
|
|
|
|
echo -n "font directory [$CACHE]: "
|
1997-03-09 22:52:25 +00:00
|
|
|
$READ answ; if [ "$answ" != "" ]; then
|
1995-04-20 02:04:02 +00:00
|
|
|
CACHE=$answ;
|
|
|
|
else
|
1998-12-01 21:14:08 +00:00
|
|
|
echo "mkdir -p $CACHE/pk; chmod 1777 $CACHE/pk" > $WRKDIR/post-install
|
1995-04-20 02:04:02 +00:00
|
|
|
fi
|
1994-10-01 00:00:16 +00:00
|
|
|
|
1997-02-10 02:08:55 +00:00
|
|
|
sed -e s:/usr/lib/tex:$prefix/share/texmf: \
|
1994-10-01 00:00:16 +00:00
|
|
|
-e s:/LocalLibrary/Fonts/TeXFonts:$CACHE: \
|
1997-02-10 02:08:55 +00:00
|
|
|
-e s:-v:-verbose: \
|
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
|
1997-02-10 02:08:55 +00:00
|
|
|
echo "DEFAULT_FONT_PATH=$prefix/share/texmf/fonts/pk:$CACHE/pk:/tmp/pk" >> ${WRKSRC}/Imakefile
|
|
|
|
echo "DEFAULT_VF_PATH=$prefix/share/texmf/fonts/vf" >> ${WRKSRC}/Imakefile
|
1994-10-01 00:00:16 +00:00
|
|
|
exit 0;
|