diff options
author | jkh <jkh@FreeBSD.org> | 1994-09-30 00:54:06 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1994-09-30 00:54:06 +0000 |
commit | 8d9f9dda1f3b377a074cd3a5438944099b168166 (patch) | |
tree | 715d47ceed9a2b737ff2bbef5fa5de37e3a84e53 /print/dvips/scripts | |
parent | 8fa47fb8a512517752ed194c55e49305170c1d3f (diff) | |
download | FreeBSD-ports-8d9f9dda1f3b377a074cd3a5438944099b168166.zip FreeBSD-ports-8d9f9dda1f3b377a074cd3a5438944099b168166.tar.gz |
Jean-Marc Zucconi's dvips port.
Submitted by: jmz
Diffstat (limited to 'print/dvips/scripts')
-rw-r--r-- | print/dvips/scripts/configure | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/print/dvips/scripts/configure b/print/dvips/scripts/configure new file mode 100644 index 0000000..7f0bbfc --- /dev/null +++ b/print/dvips/scripts/configure @@ -0,0 +1,68 @@ +#!/bin/sh + + +if [ $# != 3 ]; then exit 1; fi + +SRCDIR=$3 + +# paper size, default is no nor A4 +A4=n +#default font cache directory: must be world writable +CACHE=/tmp + + +if [ ! -f $SRCDIR/MakeTeXPK.orig ]; then + mv $SRCDIR/MakeTeXPK $SRCDIR/MakeTeXPK.orig || exit 1 +fi +#find the resolutions +RES=`awk '{if(/test $BDPI/) printf "%s ",$5}' < $SRCDIR/MakeTeXPK.orig` +# and the corresponding modes +MODES=`awk -F= '{if(/MODE=[a-zA-Z]/) print $2}' < $SRCDIR/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 <$SRCDIR/MakeTeXPK.orig >$SRCDIR/MakeTeXPK + +#configure config.ps +if [ ! -f $SRCDIR/config.ps.orig ]; then + mv $SRCDIR/config.ps $SRCDIR/config.ps.orig || exit 1 +fi +RES=`awk '{if (/^D /) print $2}' <$SRCDIR/config.ps.orig` +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/' \ + -e "s/^D $RES/D $res/" <$SRCDIR/config.ps.orig > $SRCDIR/config.ps +else + sed -e "s/^D $RES/D $res/" <$SRCDIR/config.ps.orig > $SRCDIR/config.ps +fi + +#makefile +echo "TEXDIR=/usr/local/lib/texmf" >> $SRCDIR/Makefile || exit 1; +echo "LOCALDIR=$CACHE" >> $SRCDIR/Makefile +echo "TEXMACRODIR=\$(TEXDIR)/tex" >> $SRCDIR/Makefile +echo "FIGPATH = .:..:\$(TEXDIR)/tex" >> $SRCDIR/Makefile +echo "MANDIR=/usr/local/man/man1" >> $SRCDIR/Makefile +echo "DEFS= -DTPIC -DDEBUG -DDEFRES=$res" >> $SRCDIR/Makefile +echo "OPT = -O2 -funsigned-char" >> $SRCDIR/Makefile +echo "BINDIR=/usr/local/bin" >> $SRCDIR/Makefile +echo "FLIBS=-lm" >> $SRCDIR/Makefile + +exit 0; |