tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Package-specific debug options



I needed a version of CUPS with more debugging enabled.
Is there a standard policy on how to call such debug options?
I did the following:

Index: options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/print/cups/options.mk,v
retrieving revision 1.13
diff -u -r1.13 options.mk
--- options.mk  13 Nov 2011 21:49:17 -0000      1.13
+++ options.mk  27 Apr 2012 10:04:14 -0000
@@ -4,6 +4,7 @@
 PKG_OPTIONS_REQUIRED_GROUPS=   pdftops
 PKG_OPTIONS_GROUP.pdftops=     ghostscript poppler
 PKG_SUPPORTED_OPTIONS= acl dbus dnssd kerberos libusb pam slp tcpwrappers
+PKG_SUPPORTED_OPTIONS+=        cups-debug cups-debug-printfs
 PKG_SUGGESTED_OPTIONS= dbus dnssd kerberos libusb poppler slp
 PKG_OPTIONS_LEGACY_OPTS+=      xpdf:poppler gs:ghostscript
 
@@ -89,3 +90,15 @@
 .else
 CONFIGURE_ARGS+=       --disable-tcp-wrappers
 .endif
+
+.if !empty(PKG_OPTIONS:Mcups-debug)
+CONFIGURE_ARGS+=       --enable-debug
+.else
+CONFIGURE_ARGS+=       --disable-debug
+.endif
+
+.if !empty(PKG_OPTIONS:Mcups-debug-printfs)
+CONFIGURE_ARGS+=       --enable-debug-printfs
+.else
+CONFIGURE_ARGS+=       --disable-debug-printfs
+.endif

First question: should the first option be called "debug" or "cups-debug".
The second option is probably CUPS-specific enough to be called 
"cups-debug-printf"

Second question: Is that trivial patch of mine useful enough for other people 
so that someone could commit it?


Home | Main Index | Thread Index | Old Index