summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authordsainty <dsainty>2007-10-22 12:15:03 +0000
committerdsainty <dsainty>2007-10-22 12:15:03 +0000
commitac879581053128080c951e43e30d27eb7ff26add (patch)
treef2adfab66c816e221a9266c71a94b0841d1fec43 /print
parent8cbda0c2758c82e489af99a9e336b2b4cdef1f63 (diff)
downloadpkgsrc-ac879581053128080c951e43e30d27eb7ff26add.tar.gz
Pull over the "cups" option, based largely on the implementation of the "cups"
option in ghostscript-esp, although there it was on by default. Here it is off by default, which is more in keeping with how the "cups" option is generally used - it is usually off by default, and a CUPS user would usually add "cups" to the global options.
Diffstat (limited to 'print')
-rw-r--r--print/ghostscript/Makefile4
-rw-r--r--print/ghostscript/PLIST7
-rw-r--r--print/ghostscript/options.mk26
3 files changed, 30 insertions, 7 deletions
diff --git a/print/ghostscript/Makefile b/print/ghostscript/Makefile
index 25217cf2e63..229341ed350 100644
--- a/print/ghostscript/Makefile
+++ b/print/ghostscript/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.36 2007/10/11 11:45:06 dsainty Exp $
+# $NetBSD: Makefile,v 1.37 2007/10/22 12:15:03 dsainty Exp $
DISTNAME= ghostscript-8.60
PKGREVISION= 1
@@ -21,8 +21,6 @@ DEPENDS+= ghostscript-fonts>=6.0:../../fonts/ghostscript-fonts
USE_TOOLS+= gmake perl:run
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --disable-cups
-
REPLACE_PERL+= lib/fixmswrd.pl
GS_RESOURCEDIR= ${PREFIX}/share/ghostscript/Resource
diff --git a/print/ghostscript/PLIST b/print/ghostscript/PLIST
index c2c9d03ba05..3d721f2ba7f 100644
--- a/print/ghostscript/PLIST
+++ b/print/ghostscript/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2007/08/08 20:09:05 joerg Exp $
+@comment $NetBSD: PLIST,v 1.5 2007/10/22 12:15:03 dsainty Exp $
bin/bdftops
bin/dumphint
bin/dvipdf
@@ -31,6 +31,8 @@ bin/ps2ps2
bin/pv.sh
bin/unix-lpr.sh
bin/wftopfa
+${CUPS}libexec/cups/filter/pstopxl
+${CUPS}libexec/cups/filter/pstoraster
man/de/man1/dvipdf.1
man/de/man1/eps2eps.1
man/de/man1/font2c.1
@@ -69,6 +71,8 @@ man/man1/ps2pdf13.1
man/man1/ps2pdfwr.1
man/man1/ps2ps.1
man/man1/wftopfa.1
+${CUPS}share/cups/model/pxlcolor.ppd
+${CUPS}share/cups/model/pxlmono.ppd
share/doc/ghostscript/API.htm
share/doc/ghostscript/C-style.htm
share/doc/ghostscript/Changes.htm
@@ -114,6 +118,7 @@ share/doc/ghostscript/Use.htm
share/doc/ghostscript/Xfonts.htm
share/doc/ghostscript/gs.css
share/doc/ghostscript/index.html
+${CUPS}share/examples/cups/pstoraster.convs
share/examples/ghostscript/alphabet.ps
share/examples/ghostscript/annots.pdf
share/examples/ghostscript/chess.ps
diff --git a/print/ghostscript/options.mk b/print/ghostscript/options.mk
index dc23e8c21f9..3ceda3e7091 100644
--- a/print/ghostscript/options.mk
+++ b/print/ghostscript/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.2 2006/12/27 18:18:22 joerg Exp $
+# $NetBSD: options.mk,v 1.3 2007/10/22 12:15:04 dsainty Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ghostscript
-PKG_SUPPORTED_OPTIONS= x11
+PKG_SUPPORTED_OPTIONS= x11 cups
PKG_SUGGESTED_OPTIONS= x11
.include "../../mk/bsd.options.mk"
@@ -12,5 +12,25 @@ CONFIGURE_ARGS+= --with-x
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.else
-CONFIGURE_ARGS+= --without-x
+CONFIGURE_ARGS+= --without-x
+.endif
+
+.if !empty(PKG_OPTIONS:Mcups)
+CONFIGURE_ARGS+= --enable-cups
+PLIST_SUBST+= CUPS=
+
+CUPS_CONFDIR?= ${PKG_SYSCONFBASEDIR}/cups
+CUPS_EGDIR= ${PREFIX}/share/examples/cups
+CONF_FILES= ${CUPS_EGDIR}/pstoraster.convs ${CUPS_CONFDIR}/pstoraster.convs
+
+SUBST_CLASSES+= cupsetc
+SUBST_STAGE.cupsetc= post-extract
+SUBST_MESSAGE.cupsetc= Fixing CUPS etc directory path to install as example
+SUBST_FILES.cupsetc= cups/cups.mak
+SUBST_SED.cupsetc= -e "s|^CUPSCONFIG=.*|CUPSCONFIG=${CUPS_EGDIR}|g"
+
+.include "../../print/cups/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-cups
+PLIST_SUBST+= CUPS="@comment "
.endif