blob: 9b968ac242103a6b463dd55bf20aa2ad99ca9c0b (
plain) (
tree)
|
|
#! /bin/sh
# $FreeBSD$
if [ "$BATCH" != "yes" ]; then
#
# configure - apsfilter package dependency configuration
#
/usr/bin/dialog --title "supported file types" --clear \
--checklist "\n\
Select file types you want to print:" -1 -1 14 \
A4 "A4 papersize" ON \
LETTER "letter papersize" OFF \
LETTERDJ "letter + special DeskJet adjustements" OFF \
GS "Postscript for non-PS printer, needs X11" ON \
GS_NO_X11 "Postscript for non-PS printer, no X11" OFF \
GS_PDF_CRYPT "print encrypted PDF files using gs" ON \
PSUTILS "for pseudo duplex printing + paper handling" ON \
A2PS "ASCII files in different styles/orientation" ON \
ACROREAD7 "PDF files, needs Linux emulation" ON \
CONVERT "support for lots of graphic file formats" ON \
DVIPS "TeX DVI files" OFF \
FIG2DEV "XFIG drawings" OFF \
HTML2PS "HTML documents" OFF \
TROFF "Troff documents" OFF \
ATALK "remote printing on AppleTalk remote printer" OFF \
SAMBA "remote printing on Windows remote printer" OFF \
BZIP2 "print bunzip2 compressed documents" OFF \
FREEZE "print freeze compressed documents" OFF \
MP3 "play MP3 audio files on local or remote queue" OFF \
OGG "play Ogg audio files on local or remote queue" OFF \
WAV "play wav audio files on local or remote queue" OFF \
2> /tmp/apsfilter-checklist.$$
retval=$?
if [ -s /tmp/apsfilter-checklist.$$ ]; then
set `cat /tmp/apsfilter-checklist.$$`
fi
rm -f /tmp/apsfilter-checklist.$$
case $retval in
0) if [ -z "$*" ]; then
echo "Nothing selected"
fi
;;
1) echo "Cancel pressed."
exit 1
;;
esac
/bin/mkdir -p ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
while [ "$1" ]; do
case $1 in
\"A4\")
PAPERSIZE=a4
echo "PAPERSIZE=a4"
;;
\"LETTER\")
PAPERSIZE=letter
echo "PAPERSIZE=letter"
;;
\"LETTERDJ\")
PAPERSIZE=letterdj
echo "PAPERSIZE=letterdj"
;;
\"GS\")
echo RUN_DEPENDS+=gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}
;;
\"GS_NO_X11\")
echo WITHOUT_X11=yes
case ${GHOSTSCRIPT_PORT} in
*-nox11)
_GSSUF=""
;;
*)
_GSSUF=-nox11
;;
esac
echo RUN_DEPENDS+=gs:${PORTSDIR}/${GHOSTSCRIPT_PORT}${_GSSUF}
;;
\"GS_PDF_CRYPT\")
echo PDFENCRYPT=YES
;;
\"PSUTILS\")
case $PAPERSIZE in
letter)
echo RUN_DEPENDS+=psnup:${PORTSDIR}/print/psutils-letter
;;
letterdj)
echo RUN_DEPENDS+=psnup:${PORTSDIR}/print/psutils-letter
;;
a4)
echo RUN_DEPENDS+=psnup:${PORTSDIR}/print/psutils-a4
;;
esac
;;
\"A2PS\")
case $PAPERSIZE in
letter)
echo RUN_DEPENDS+=a2ps:${PORTSDIR}/print/a2ps-letter
;;
letterdj)
echo RUN_DEPENDS+=a2ps:${PORTSDIR}/print/a2ps-letterdj
;;
a4)
echo RUN_DEPENDS+=a2ps:${PORTSDIR}/print/a2ps-a4
;;
esac
;;
\"ACROREAD7\")
echo RUN_DEPENDS+=${X11BASE}/Adobe/Acrobat7.0/ENU/bin/acroread:${PORTSDIR}/print/acroread7
;;
\"CONVERT\")
echo RUN_DEPENDS+=convert:${PORTSDIR}/graphics/ImageMagick
;;
\"DVIPS\")
echo RUN_DEPENDS+=dvips:${PORTSDIR}/print/teTeX
;;
\"FIG2DEV\")
echo RUN_DEPENDS+=fig2dev:${PORTSDIR}/print/transfig
;;
\"HTML2PS\")
case $PAPERSIZE in
letter)
echo RUN_DEPENDS+=html2ps:${PORTSDIR}/print/html2ps-letter
;;
letterdj)
echo RUN_DEPENDS+=html2ps:${PORTSDIR}/print/html2ps-letter
;;
a4)
echo RUN_DEPENDS+=html2ps:${PORTSDIR}/print/html2ps-a4
;;
esac
;;
\"TROFF\")
TROFF=YES
;;
\"ATALK\")
echo RUN_DEPENDS+=pap:${PORTSDIR}/net/netatalk
;;
\"SAMBA\")
echo RUN_DEPENDS+=smbclient:${PORTSDIR}/net/samba3
;;
\"BZIP2\")
;;
\"FREEZE\")
echo RUN_DEPENDS+=melt:${PORTSDIR}/archivers/freeze
;;
\"MP3\")
echo RUN_DEPENDS+=mpg321:${PORTSDIR}/audio/mpg321
;;
\"OGG\")
echo RUN_DEPENDS+=ogg123:${PORTSDIR}/audio/vorbis-tools
;;
\"WAV\")
echo RUN_DEPENDS+=wavplay:${PORTSDIR}/audio/wavplay
;;
esac
shift
done
fi # if $BATCH
# if batch, then start creating Makefile.inc here
if [ "$BATCH" = "yes" ]; then
/bin/mkdir -p ${WRKDIRPREFIX}${CURDIR}
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
fi
|