Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2012 02:37:50 GMT
From:      "A.J. Kehoe IV (Nanoman)" <aE7qL1CN@nanoman.ca>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163807: print/libgnomeprint CUPS Option Patch
Message-ID:  <201201040237.q042bolM032078@red.freebsd.org>
Resent-Message-ID: <201201040240.q042e9GY031171@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201040237.q042bolM032078>