summaryrefslogtreecommitdiff
path: root/print/a2ps
diff options
context:
space:
mode:
authorfrueauf <frueauf@pkgsrc.org>1998-02-22 17:11:53 +0000
committerfrueauf <frueauf@pkgsrc.org>1998-02-22 17:11:53 +0000
commit4290979081b7d90632e317675e1ce46d21fafc36 (patch)
tree0ec1bcd5cf4da8ad7c157ca675f95f841fede3a6 /print/a2ps
parent3551c91f17f1a2f5a1d5c37b9fadd5c5505708a3 (diff)
downloadpkgsrc-4290979081b7d90632e317675e1ce46d21fafc36.tar.gz
- include mk.conf/make.conf to get user defined PAPERSIZE
- s/PAPER_SIZE/PAPERSIZE to keep FreeBSD compatibility - addjust pre-configure rule - add rules for each papersize
Diffstat (limited to 'print/a2ps')
-rw-r--r--print/a2ps/Makefile89
1 files changed, 60 insertions, 29 deletions
diff --git a/print/a2ps/Makefile b/print/a2ps/Makefile
index 8a1a307fbfd..384170d7012 100644
--- a/print/a2ps/Makefile
+++ b/print/a2ps/Makefile
@@ -3,12 +3,12 @@
# Date created: 18 August 1997
# Whom: Chuck Robey (chuckr@freebsd.org)
#
-# $NetBSD: Makefile,v 1.4 1998/02/18 11:39:10 frueauf Exp $
+# $NetBSD: Makefile,v 1.5 1998/02/22 17:11:53 frueauf Exp $
# FreeBSD Id: Makefile,v 1.12 1998/02/15 21:24:42 steve Exp
#
DISTNAME= a2ps-4.9.9
-PKGNAME= a2ps-${PAPER_SIZE}-4.9.9
+PKGNAME= a2ps-${PAPERSIZE}-4.9.9
CATEGORIES= print
MASTER_SITES= http://www-inf.enst.fr/~demaille/ftp/a2ps/
@@ -17,40 +17,71 @@ MAINTAINER= chuckr@FreeBSD.org
GNU_CONFIGURE= yes
MAN1= a2ps.1 ogonkify.1
-PAPER_SIZE?=
+# Include local make config file here. It is essential to have this
+# precede any override targets (those that override defaults in
+# <bsd.port.mk> that test variables that may be set here. Note that
+# this inclusion is otherwise redundant, since <bsd.port.mk> includes
+# <bsd.own.mk>, which includes it.
+
+OPSYS!= uname -s
+.if (${OPSYS} == "FreeBSD")
+.if exists(/etc/make.conf)
+.include "/etc/make.conf"
+.endif
+.else
+.if exists(/etc/mk.conf)
+.include "/etc/mk.conf"
+.endif
+.endif
+
+PAPERSIZE?=
STRIP=
-CONFIGURE_ARGS+= --with-medium=${PAPER_SIZE}
+CONFIGURE_ARGS+= --with-medium=${PAPERSIZE}
CONFIGURE_ENV+= LPR=lpr
-ALL_TARGET= all PAPERSIZE=${PAPER_SIZE}
+ALL_TARGET= all PAPERSIZE=${PAPERSIZE}
+
+Letter::
+ $(MAKE) PAPERSIZE=Letter
+
+letter::
+ $(MAKE) PAPERSIZE=Letter
+
+Letterdj::
+ $(MAKE) PAPERSIZE=Letterdj
+
+letterdj::
+ $(MAKE) PAPERSIZE=Letterdj
+
+A4::
+ $(MAKE) PAPERSIZE=A4
+
+a4::
+ $(MAKE) PAPERSIZE=A4
pre-build:
${TOUCH} ${WRKSRC}/doc/*.info
${TOUCH} ${WRKSRC}/doc/*.dvi
-pre-configure:
- @(case "X${PAPER_SIZE}" in \
- XA4|XLetter|XLetterdj) \
- goodsize=yes; \
- ;; \
- X"") \
- goodsize=no; \
- ${ECHO} "PAPER_SIZE not specified."; \
- ;; \
- *) \
- goodsize=no; \
- ${ECHO} "PAPER_SIZE incorrect value: ${PAPER_SIZE}."; \
- ;; \
- esac; \
- if [ $goodsize = "no" ]; then \
- ${ECHO} ""; \
- ${ECHO} "Must specify PAPER_SIZE as one of A4, Letter,"; \
- ${ECHO} " or Letterdj, either in the environment, or "; \
- ${ECHO} "via Makefile definitions of the same name. "; \
- ${ECHO} " Note that each PAPER_SIZE has a leading "; \
- ${ECHO} "capital letter, and Letterdj allows a "; \
- ${ECHO} "slightly larger margins for DeskJets."; \
- ${FALSE}; \
- fi)
+pre-extract:
+.if empty(PAPERSIZE)
+ @${ECHO}
+ @${ECHO} "PAPERSIZE not specified."
+ @${ECHO}
+ @${ECHO} "Must specify PAPERSIZE as one of A4, Letter, or Letterdj,"
+ @${ECHO} "either using setenv, or via Makefile targets of the same"
+ @${ECHO} "name. Note that each PAPERSIZE has a leading capital letter,"
+ @${ECHO} "and Letterdj allows a slightly larger margins for DeskJets."
+ @${FALSE}
+.elif $(PAPERSIZE)!=A4 && $(PAPERSIZE)!=Letter && $(PAPERSIZE)!=Letterdj
+ @${ECHO}
+ @${ECHO} "PAPERSIZE incorrect value: $(PAPERSIZE)."
+ @${ECHO}
+ @${ECHO} "Must specify PAPERSIZE as one of A4, Letter, or Letterdj,"
+ @${ECHO} "either using setenv, or via Makefile targets of the same"
+ @${ECHO} "name. Note that each PAPERSIZE has a leading capital letter,"
+ @${ECHO} "and Letterdj allows a slightly larger margins for DeskJets."
+ @${FALSE}
+.endif
.include <bsd.port.mk>