This diff allows generating flavors of gs with and without cups.

Index: ports/print/ghostscript/Makefile
===================================================================
RCS file: /cvs/ports/print/ghostscript/Makefile,v
retrieving revision 1.14
diff -u -p -u -r1.14 Makefile
--- ports/print/ghostscript/Makefile    1 Feb 2010 17:00:14 -0000       1.14
+++ ports/print/ghostscript/Makefile    19 Feb 2016 04:29:07 -0000
@@ -7,6 +7,14 @@
     SUBDIR += gnu,gtk,a4
     SUBDIR += gnu,no_x11
     SUBDIR += gnu,no_x11,a4
+.if defined(WITH_CUPS)
+    SUBDIR += gnu,cups
+    SUBDIR += gnu,a4,cups
+    SUBDIR += gnu,gtk,cups
+    SUBDIR += gnu,gtk,a4,cups
+    SUBDIR += gnu,no_x11,cups
+    SUBDIR += gnu,no_x11,a4,cups
+.endif
     SUBDIR += gnu-fonts
 
 .include <bsd.port.subdir.mk>
Index: ports/print/ghostscript/gnu/Makefile
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/Makefile,v
retrieving revision 1.106
diff -u -p -u -r1.106 Makefile
--- ports/print/ghostscript/gnu/Makefile        24 Jul 2015 12:46:23 -0000      
1.106
+++ ports/print/ghostscript/gnu/Makefile        19 Feb 2016 04:29:07 -0000
@@ -296,6 +296,7 @@ DEVICES+=   bit bitcmyk bitrgb bitrgbtags 
 # Aditional devices not mentioned in configure.ac:
 DEVICES+=      ijs
 
+.if ${FLAVOR:Mcups}
 # Cups
 LIB_DEPENDS+=  print/cups,-libs
 WANTLIB += cups cupsimage
@@ -312,6 +313,9 @@ MAKE_FLAGS+=        CUPSCFLAGS="$$(cups-config 
                CUPS_FONTPATH="${LOCALBASE}/share/cups/fonts" \
                CUPS_DATA="${LOCALBASE}/share/cups"
 
+.else
+CONFIGURE_ARGS +=      --disable_cups
+.endif
 .include <bsd.port.mk>
 
 ALL_TARGET =           ${ALL_TARGET_NON_SHARED-${NO_SHARED_LIBS}}

Is there a way to test generating the with-cups flavors without
fully installing cups, avahi, dbus, etc.? I.e. install them in
some non-system directory(ies) and prevent them from touching
passwd, /etc/rc.d, and prevent them from starting daemons.

I've made the flavors without cups and trivial tests work.
I'll try better tests soon.

I set the default to without cups because that is the
version of least surprise. It seems to me that installing a graphics
package shouldn't install a print package, a network package,
etc. etc. so that's how it's set. I can easily reverse that.

Geoff Steckel

Reply via email to