mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-05 22:43:24 +00:00
42 lines
1.4 KiB
Bash
42 lines
1.4 KiB
Bash
#!/bin/sh
|
|
|
|
# paper size, default is no nor A4
|
|
A4=n
|
|
#default font cache directory: must be world writable
|
|
CACHE=/tmp
|
|
|
|
if [ ! -f ${WRKSRC}/MakeTeXPK.orig ]; then
|
|
mv ${WRKSRC}/MakeTeXPK ${WRKSRC}/MakeTeXPK.orig || exit 1
|
|
fi
|
|
#find the resolutions
|
|
RES=`awk '{if(/test $BDPI/) printf "%s ",$5}' < ${WRKSRC}/MakeTeXPK.orig`
|
|
# and the corresponding modes
|
|
MODES=`awk -F= '{if(/MODE=[a-zA-Z]/) print $2}' < ${WRKSRC}/MakeTeXPK.orig`
|
|
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: \
|
|
$SUBST <${WRKSRC}/MakeTeXPK.orig >${WRKSRC}/MakeTeXPK
|
|
|
|
|
|
# Imakefile
|
|
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
|
|
exit 0;
|