summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorAndreas Klemm <andreas@FreeBSD.org>2004-02-28 15:59:39 +0000
committerAndreas Klemm <andreas@FreeBSD.org>2004-02-28 15:59:39 +0000
commite5b4d0c08fa08113833ea1f60d02ec668dac362e (patch)
tree0a31b30f21d496227dc5ae7855fe944098f8c284 /print
parentUSE_MYSQL (diff)
- honour PAPERSIZE variable like in a2ps and psutils ports
- default to letter - inspired by PR but using a more suitable solution to use the environment variable already used by other ports instead by using new one (PAPER_SIZE and A4_PAPER) PR: 48140
Notes
Notes: svn path=/head/; revision=102421
Diffstat (limited to 'print')
-rw-r--r--print/apsfilter/Makefile27
1 files changed, 18 insertions, 9 deletions
diff --git a/print/apsfilter/Makefile b/print/apsfilter/Makefile
index 42ed6f95f37d..c8c3f71a41a6 100644
--- a/print/apsfilter/Makefile
+++ b/print/apsfilter/Makefile
@@ -44,7 +44,19 @@ USE_GHOSTSCRIPT_RUN= yes
# - APSFILTER_ALL build and install all supported filter utilities
# - WITHOUT_X11 toggles not to build tools that need X11, even if
# APSFILTER_ALL is set
-#
+# - PAPERSIZE Use PAPERSIZE as in a2ps port, default to letter.
+PAPERSIZE?= letter
+
+.if ${PAPERSIZE} != a4 && ${PAPERSIZE} != letter && ${PAPERSIZE} != letterdj
+.BEGIN:
+ @${ECHO_CMD}
+ @${ECHO_CMD} "PAPERSIZE incorrect value: ${PAPERSIZE}."
+ @${ECHO_CMD}
+ @${ECHO_CMD} "Must specify PAPERSIZE as one of a4, letter, or letterdj."
+ @${ECHO_CMD} "letterdj allows a slightly larger margins for DeskJets."
+ @${FALSE}
+.endif
+
.if defined(BATCH) && defined(APSFILTER_ALL)
#
# Build and install all filter apsfilter knows about (rather expensive)
@@ -56,8 +68,8 @@ RUN_DEPENDS+= bunzip2:${PORTSDIR}/archivers/bzip2
RUN_DEPENDS+= melt:${PORTSDIR}/archivers/freeze
RUN_DEPENDS+= lzop:${PORTSDIR}/archivers/lzop
# all needed "ASCII to ps" filter utilities
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter
-RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-letter
+RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-${PAPERSIZE}
+RUN_DEPENDS+= enscript:${PORTSDIR}/print/enscript-${PAPERSIZE}
RUN_DEPENDS+= mpage:${PORTSDIR}/print/mpage
RUN_DEPENDS+= recode:${PORTSDIR}/converters/recode
# all needed "ARCHIVE" extraction utilities
@@ -72,7 +84,7 @@ RUN_DEPENDS+= zoo:${PORTSDIR}/archivers/zoo
# all needed "xxx to ps" filter utilities
RUN_DEPENDS+= fitstopnm:${PORTSDIR}/graphics/netpbm
RUN_DEPENDS+= htmldoc:${PORTSDIR}/textproc/htmldoc
-RUN_DEPENDS+= psnup:${PORTSDIR}/print/psutils-letter
+RUN_DEPENDS+= psnup:${PORTSDIR}/print/psutils-${PAPERSIZE}
.if !defined(WITHOUT_X11)
# "xxx to ps" filter utilities that require X
RUN_DEPENDS+= acroread5:${PORTSDIR}/print/acroread5
@@ -96,8 +108,8 @@ RUN_DEPENDS+= smbclient:${PORTSDIR}/net/samba
# since apsfilter should fit easily on installation CD 1...
#
# most important "xxx to ps" filter utilities
-RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-letter
-RUN_DEPENDS+= psnup:${PORTSDIR}/print/psutils-letter
+RUN_DEPENDS+= a2ps:${PORTSDIR}/print/a2ps-${PAPERSIZE}
+RUN_DEPENDS+= psnup:${PORTSDIR}/print/psutils-${PAPERSIZE}
.endif
# needed for aps2file :-/
@@ -114,9 +126,6 @@ USE_BZIP2= yes
WRKSRC= ${WRKDIR}/apsfilter
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" GHOSTSCRIPT_PORT="${GHOSTSCRIPT_PORT}"
-# make a2ps port happy in this early stage
-PAPERSIZE?=letter
-
pre-everything::
.if !defined(WITH_GHOSTSCRIPT_AFPL) || ${WITH_GHOSTSCRIPT_AFPL} != yes
@${ECHO} ""