2001-09-28 01:17:41 +02:00
|
|
|
# $NetBSD: Makefile,v 1.20 2001/09/27 23:18:36 jlam Exp $
|
1998-02-22 21:32:08 +01:00
|
|
|
# FreeBSD Id: Makefile,v 1.15 1998/01/08 18:52:13 fenner Exp
|
|
|
|
#
|
|
|
|
|
|
|
|
DISTNAME= psutils-p17
|
1998-11-09 19:01:48 +01:00
|
|
|
PKGNAME= psutils-1.17
|
1998-02-22 21:32:08 +01:00
|
|
|
CATEGORIES= print
|
|
|
|
MASTER_SITES= ftp://ftp.dcs.ed.ac.uk/pub/ajcd/
|
|
|
|
|
1998-04-20 13:56:17 +02:00
|
|
|
MAINTAINER= packages@netbsd.org
|
2001-02-17 18:42:09 +01:00
|
|
|
COMMENT= Utilities for manipulating PostScript documents
|
1998-02-22 21:32:08 +01:00
|
|
|
|
2001-09-28 01:17:41 +02:00
|
|
|
DEPENDS+= papersize-[0-9]*:../../print/papersize
|
1998-11-10 15:08:16 +01:00
|
|
|
|
1998-02-22 21:32:08 +01:00
|
|
|
WRKSRC= ${WRKDIR}/psutils
|
1998-11-10 15:08:16 +01:00
|
|
|
USE_PERL5= yes
|
1998-08-17 01:49:08 +02:00
|
|
|
|
1998-11-09 19:01:48 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
PAPERSIZE?= A4
|
1998-02-23 15:02:29 +01:00
|
|
|
|
2001-07-10 19:27:18 +02:00
|
|
|
MAKE_ENV+= CC="${CC}" PERL5="${PERL5}"
|
|
|
|
MAKE_FLAGS+= PAPER=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`
|
|
|
|
MAKEFILE= Makefile.unix
|
1999-10-05 15:59:57 +02:00
|
|
|
|
1998-02-23 15:02:29 +01:00
|
|
|
pre-configure:
|
|
|
|
@case "X${PAPERSIZE}" in \
|
1998-08-17 01:49:08 +02:00
|
|
|
XA4|XLetter) \
|
1998-02-23 15:02:29 +01:00
|
|
|
;; \
|
|
|
|
XA3|XA5|XB5|Xledger|Xstatement|Xexecutive|Xfolio|Xquarto|X10x14)\
|
|
|
|
${ECHO} "Other packages do not recognise ${PAPERSIZE}"; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
${ECHO} "Error: PAPERSIZE invalid: \"${PAPERSIZE}\""; \
|
|
|
|
${ECHO} "Possible values are:"; \
|
1998-08-17 01:49:08 +02:00
|
|
|
${ECHO} " A3, A4 (default), A5, B5, Letter, Legal,"; \
|
|
|
|
${ECHO} " Ledger, Tabloid, Statement, Executive,"; \
|
|
|
|
${ECHO} " Folio, Quarto, and 10x14."; \
|
1998-02-23 15:02:29 +01:00
|
|
|
${FALSE}; \
|
|
|
|
;; \
|
|
|
|
esac
|
1998-02-22 21:32:08 +01:00
|
|
|
|
1998-11-09 19:01:48 +01:00
|
|
|
post-patch:
|
|
|
|
${MV} ${WRKSRC}/psutil.c ${WRKSRC}/psutil.c.in
|
|
|
|
${SED} -e 's|@prefix@|${PREFIX}|g' ${WRKSRC}/psutil.c.in > ${WRKSRC}/psutil.c
|
|
|
|
|
1998-02-22 21:37:58 +01:00
|
|
|
post-install:
|
2001-01-11 02:53:28 +01:00
|
|
|
for f in epsffit psbook psnup psresize psselect pstops; do \
|
|
|
|
strip ${PREFIX}/bin/$$f; \
|
1998-11-09 19:01:48 +01:00
|
|
|
done
|
1998-11-10 15:08:16 +01:00
|
|
|
low=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`; \
|
1999-10-05 15:59:57 +02:00
|
|
|
if [ ! -f ${PREFIX}/etc/psutils.cfg ]; then \
|
1998-11-10 15:08:16 +01:00
|
|
|
${ECHO} "PAPERSIZE=$$low" > ${PREFIX}/etc/psutils.cfg; \
|
1998-11-09 19:01:48 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|