summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron>1998-10-12 22:21:49 +0000
committertron <tron>1998-10-12 22:21:49 +0000
commitc85513ee7d0aa5143442eff174e9b55058c2431c (patch)
tree4e41c10683ff0e6f2922b6ddf61d8deeb26e6013
parent63f04bce398fa8fd8eac6d4e5ae357390bdb150d (diff)
downloadpkgsrc-c85513ee7d0aa5143442eff174e9b55058c2431c.tar.gz
Patch filter files to call "gs" with "-PAPERSIZE=...", create seperate
A4 and letter version of this package.
-rw-r--r--print/magicfilter/Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/print/magicfilter/Makefile b/print/magicfilter/Makefile
index a9dab8ec6db..385b9f39169 100644
--- a/print/magicfilter/Makefile
+++ b/print/magicfilter/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 1998/08/27 22:18:31 frueauf Exp $
+# $NetBSD: Makefile,v 1.6 1998/10/12 22:21:49 tron Exp $
DISTNAME= magicfilter-1.2
+PKGNAME= magicfilter-${PAPERSIZE}-1.2
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/printing
@@ -12,6 +13,8 @@ DEPENDS+= a2ps-${PAPERSIZE}-4.10.3:../../print/a2ps \
netpbm-19940301:../../graphics/netpbm \
teTeX-0.4p8:../../print/teTeX
+CONFLICTS= magicfilter-1.2
+
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -25,10 +28,20 @@ post-install:
@${MKDIR} ${PREFIX}/${FILTER_DIR}
@(cd ${WRKSRC}/filters; \
for FILTER in *-filter; do \
- ${ECHO} ${INSTALL_SCRIPT} $$FILTER ${PREFIX}/${FILTER_DIR}; \
- ${INSTALL_SCRIPT} $$FILTER ${PREFIX}/${FILTER_DIR}; \
+ TARGET=${PREFIX}/${FILTER_DIR}/$$FILTER; \
+ ${ECHO} "Installing $$FILTER as $$TARGET"; \
+ ${SED} 's/-sOutputFile=-/-sOutputFile=- ${GS_OPTS}/' \
+ <$$FILTER >${PREFIX}/${FILTER_DIR}/$$FILTER; \
+ chown ${BINOWN}:${BINGRP} $$TARGET; \
+ chmod ${BINMODE} $$TARGET; \
${ECHO} ${FILTER_DIR}/$$FILTER >>${PLIST_SRC}; \
done)
@${ECHO} "@dirrm ${FILTER_DIR}" >>${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"
+
+.if ${PAPERSIZE} == A4
+GS_OPTS= -sPAPERSIZE=a4
+.else
+GS_OPTS= -sPAPERSIZE=letter
+.endif