ports/163807: print/libgnomeprint CUPS Option Patch

A.J. Kehoe IV (Nanoman) aE7qL1CN at nanoman.ca
Wed Jan 4 02:40:10 UTC 2012


>Number:         163807
>Category:       ports
>Synopsis:       print/libgnomeprint CUPS Option Patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 04 02:40:09 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     A.J. Kehoe IV (Nanoman)
>Release:        8.2
>Organization:
Nanoman's Company
>Environment:
FreeBSD localhost 8.2-RELEASE-p3 FreeBSD 8.2-RELEASE-p3 #0: Tue Sep 27 18:07:27 UTC 2011     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
After running "make config" recursively for a port that depends on print/libgnomeprint, creating an index of the ports tree will produce varying results depending on whether or not CUPS is installed at the time the index is created.  This conflicts with the conventional behaviour of the FreeBSD Ports Collection, and causes problems for ports management scripts.
>How-To-Repeat:
1. Run "make config" recursively for a port that depends on print/libgnomeprint, and use the default options for each port.

2. Create an index of the ports tree.

3. Run "make install" for the port from step #1.

4. Create another index of the ports tree.

You'll notice that the index created in step #2 differs from the index created in step #4.
>Fix:
In ports/print/libgnomeprint/Makefile, replace the current CUPS detection method with the "OPTIONS" variable.  This also eliminates the need for the notice in "pre-everything".

I've attached a patch with the fix I'm using.

Patch attached with submission follows:

--- ports/print/libgnomeprint/Makefile.old	2011-09-23 18:25:01.000000000 -0400
+++ ports/print/libgnomeprint/Makefile	2012-01-03 21:21:21.967862000 -0500
@@ -36,9 +36,11 @@
 PLIST_SUB=	VERSION=${PORTVERSION} \
 		LIBVERSION=2.2
 
+OPTIONS=	CUPS "Enable CUPS support" on
+
 .include <bsd.port.pre.mk>
 
-.if (defined(WITH_CUPS) || exists(${LOCALBASE}/lib/libcups.so)) && !defined(WITHOUT_CUPS)
+.if defined(WITH_CUPS) && !defined(WITHOUT_CUPS)
 CONFIGURE_ARGS+=	--with-cups
 LIB_DEPENDS+=		gnomecups-1.0:${PORTSDIR}/print/libgnomecups
 PLIST_SUB+=		CUPS:=""
@@ -47,13 +49,6 @@
 PLIST_SUB+=		CUPS:="@comment "
 .endif
 
-pre-everything::
-.if !defined(WITH_CUPS)
-	@${ECHO_MSG} " Enable cups support by defining"
-	@${ECHO_MSG} " WITH_CUPS"
-	@${ECHO_MSG} ""
-.endif
-
 post-patch:
 	@${FIND} ${WRKSRC} -name '*.[ch]' | ${XARGS} ${REINPLACE_CMD} -e \
 		's|<malloc[.]h>|<stdlib.h>|'


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list