1994-09-30 00:54:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
|
|
# paper size, default is no nor A4
|
|
|
|
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
|
|
|
|
|
|
|
if [ -f $prefix/bin/MakeTeXPK ]; then
|
1995-04-22 16:52:18 +00:00
|
|
|
echo
|
1995-04-20 02:04:02 +00:00
|
|
|
echo "**WARNING** MakeTeXPK already exists in $PREFIX/bin"
|
1995-04-22 16:52:18 +00:00
|
|
|
echo "**WARNING** This file will be replaced during install."
|
|
|
|
echo
|
1995-04-20 02:04:02 +00:00
|
|
|
fi
|
1994-09-30 00:54:06 +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-09-30 00:54:06 +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-09-30 00:54:06 +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-09-30 00:54:06 +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
|
|
|
|
|
2000-03-03 22:07:51 +00:00
|
|
|
rm -f $WRKDIR/post-install
|
1995-04-22 16:52:18 +00:00
|
|
|
echo
|
1995-04-20 02:04:02 +00:00
|
|
|
echo "Choose a font directory for automatic font generation."
|
1995-04-22 16:52:18 +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]: "
|
|
|
|
read answ; if [ "$answ" != "" ]; then
|
|
|
|
CACHE=$answ;
|
|
|
|
else
|
2000-03-03 22:07:51 +00:00
|
|
|
echo "mkdir -p $CACHE/pk; chmod 1777 $CACHE/pk" > $WRKDIR/post-install
|
1995-04-20 02:04:02 +00:00
|
|
|
fi
|
1994-09-30 00:54:06 +00:00
|
|
|
|
1997-02-10 02:08:55 +00:00
|
|
|
sed -e s:/usr/lib/tex:$PREFIX/share/texmf: \
|
1996-12-27 16:28:06 +00:00
|
|
|
-e s:/common/rokicki/cmps/dvips:$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-09-30 00:54:06 +00:00
|
|
|
|
|
|
|
#configure config.ps
|
1994-10-04 15:12:57 +00:00
|
|
|
if [ ! -f ${WRKSRC}/config.ps.orig ]; then
|
|
|
|
mv ${WRKSRC}/config.ps ${WRKSRC}/config.ps.orig || exit 1
|
1994-09-30 00:54:06 +00:00
|
|
|
fi
|
1994-10-04 15:12:57 +00:00
|
|
|
RES=`awk '{if (/^D /) print $2}' <${WRKSRC}/config.ps.orig`
|
1994-09-30 00:54:06 +00:00
|
|
|
echo -n "what is the resolution of your printer (in dpi) [$RES]: ";
|
|
|
|
read res; if [ "$res" = "" ]; then res=$RES; fi
|
|
|
|
echo -n "do you want to use A4 paper? [$A4]: "
|
|
|
|
read answ; if [ "$answ" = "" ]; then answ=$A4; fi
|
|
|
|
|
|
|
|
if [ $answ = y ]; then
|
|
|
|
sed -e 's/\(^\*\)\(.*A4\)/\2/' -e 's/^@ letterSize/*@ letterSize/' \
|
1994-10-04 15:12:57 +00:00
|
|
|
-e "s/^D $RES/D $res/" <${WRKSRC}/config.ps.orig > ${WRKSRC}/config.ps
|
1994-09-30 00:54:06 +00:00
|
|
|
else
|
1994-10-04 15:12:57 +00:00
|
|
|
sed -e "s/^D $RES/D $res/" <${WRKSRC}/config.ps.orig > ${WRKSRC}/config.ps
|
1994-09-30 00:54:06 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
#makefile
|
1997-02-10 02:08:55 +00:00
|
|
|
echo "TEXDIR=$PREFIX/share/texmf" >> ${WRKSRC}/Makefile || exit 1;
|
1994-10-04 15:12:57 +00:00
|
|
|
echo "LOCALDIR=$CACHE" >> ${WRKSRC}/Makefile
|
|
|
|
echo "TEXMACRODIR=\$(TEXDIR)/tex" >> ${WRKSRC}/Makefile
|
|
|
|
echo "FIGPATH = .:..:\$(TEXDIR)/tex" >> ${WRKSRC}/Makefile
|
1995-02-15 02:22:35 +00:00
|
|
|
echo "MANDIR=$PREFIX/man/man1" >> ${WRKSRC}/Makefile
|
1996-12-25 18:01:33 +00:00
|
|
|
echo "DEFS= -DTPIC -DDEBUG -DDEFRES=$res -DCREATIONDATE -DHAVE_GETCWD -DHPS" >> ${WRKSRC}/Makefile
|
1994-10-04 15:12:57 +00:00
|
|
|
echo "OPT = -O2 -funsigned-char" >> ${WRKSRC}/Makefile
|
1995-02-15 02:22:35 +00:00
|
|
|
echo "BINDIR=$PREFIX/bin" >> ${WRKSRC}/Makefile
|
1994-10-04 15:12:57 +00:00
|
|
|
echo "FLIBS=-lm" >> ${WRKSRC}/Makefile
|
1994-09-30 00:54:06 +00:00
|
|
|
|
1999-07-15 22:41:30 +00:00
|
|
|
# already part of LaTeX
|
|
|
|
for i in bookman.sty chancery.sty palatino.sty times.sty; do
|
|
|
|
rm -f ${WRKSRC}/PSlatex/$i
|
|
|
|
done
|
|
|
|
|
1994-09-30 00:54:06 +00:00
|
|
|
exit 0;
|