From nobody@FreeBSD.org  Wed Jan  4 02:37:51 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5DBC71065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Jan 2012 02:37:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2E5858FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  4 Jan 2012 02:37:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q042boHv032079
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 4 Jan 2012 02:37:50 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q042bolM032078;
	Wed, 4 Jan 2012 02:37:50 GMT
	(envelope-from nobody)
Message-Id: <201201040237.q042bolM032078@red.freebsd.org>
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: print/libgnomeprint CUPS Option Patch
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163807
>Category:       ports
>Synopsis:       print/libgnomeprint CUPS Option Patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnome
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 04 02:40:09 UTC 2012
>Closed-Date:    Sun May 20 16:48:55 UTC 2012
>Last-Modified:  Sun May 20 16:50:11 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->gnome 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Jan 4 02:40:19 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163807 

From: "A.J. Kehoe IV (Nanoman)" <aE7qL1CN@nanoman.ca>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163807: print/libgnomeprint CUPS Option Patch
Date: Sat, 7 Jan 2012 02:16:18 -0500 (EST)

 Please cancel this PR.  I wasn't aware of this type of dependency
 detection, and thought it was a bug.  Indexing is still an issue, but that
 falls outside the scope of this PR.
 
 Sorry for the noise!
 
State-Changed-From-To: open->closed 
State-Changed-By: rm 
State-Changed-When: Sun Jan 8 18:21:41 UTC 2012 
State-Changed-Why:  
Closed by submitter's request 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163807 

From: "A.J. Kehoe IV (Nanoman)" <aE7qL1CN@nanoman.ca>
To: rm@FreeBSD.org
Cc: gnome@freebsd.org,
 bug-followup@FreeBSD.org
Subject: Re: ports/163807: print/libgnomeprint CUPS Option Patch
Date: Mon, 16 Apr 2012 11:33:01 -0400 (EDT)

 > Synopsis: print/libgnomeprint CUPS Option Patch
 >
 > State-Changed-From-To: open->closed
 > State-Changed-By: rm
 > State-Changed-When: Sun Jan 8 18:21:41 UTC 2012
 > State-Changed-Why:
 > Closed by submitter's request
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=163807
 
 Please resurrect this PR.  It seems that, despite what I was led to
 believe, FreeBSD doesn't actually have a system for handling automatic
 dependencies.  This topic is now covered in the FreeBSD Porter's Handbook
 under "Problems Caused by Automatic Dependencies":
 
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html#AEN2421
 
 The print/libgnomeprint Makefile hasn't changed since before this PR was
 opened, so the patch I submitted can be committed without modification.
 
 My thanks to everybody who gave me feedback regarding this issue,
 especially the FreeBSD Ports Management Team and Warren Block.
 
State-Changed-From-To: closed->open 
State-Changed-By: eadler 
State-Changed-When: Mon Apr 16 16:29:02 UTC 2012 
State-Changed-Why:  
per submitter request 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163807 
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Sun May 20 16:48:44 UTC 2012 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163807 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/163807: commit references a PR
Date: Sun, 20 May 2012 16:48:44 +0000 (UTC)

 mezz        2012-05-20 16:48:35 UTC
 
   FreeBSD ports repository
 
   Modified files:
     print/libgnomeprint  Makefile 
   Log:
   Remove the auto-check dependency and able to use OPTIONS now.
   
   PR:             ports/163807
   Submitted by:   A.J. Kehoe IV (Nanoman) <aE7qL1CN@nanoman.ca>
   
   Revision  Changes    Path
   1.124     +3 -8      ports/print/libgnomeprint/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
