From nobody@FreeBSD.org  Wed May 21 12:50:03 2008
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 7A2E3106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 May 2008 12:50:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 423708FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 May 2008 12:50:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m4LCmdHK091362
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 21 May 2008 12:48:39 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m4LCmd8M091361;
	Wed, 21 May 2008 12:48:39 GMT
	(envelope-from nobody)
Message-Id: <200805211248.m4LCmd8M091361@www.freebsd.org>
Date: Wed, 21 May 2008 12:48:39 GMT
From: Scot Hetzel <swhetzel@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: print/ghostscript-gpl-nox11: PKGNAMESUFFIX not being defined
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         123859
>Category:       ports
>Synopsis:       print/ghostscript-gpl-nox11: PKGNAMESUFFIX not being defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    doceng
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 21 13:00:07 UTC 2008
>Closed-Date:    Sun Oct 05 03:17:38 UTC 2008
>Last-Modified:  Sun Oct 05 03:17:38 UTC 2008
>Originator:     Scot Hetzel
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #4: Sat May 17 20:53:07 CDT 2008     root@hp010:/usr/obj/usr/src/8x/sys/DV8135NR  amd64

>Description:
When rebuilding the INDEX with either make index or portsdb -Uu the following warning is generated:

Warning: Duplicate INDEX entry:  ghostscript-gpl-8.62_2

The cause of the warning is due to the OPTIONSFILE defines at least one of these:

 WITH_GS_x11
 WITH_GS_x11alpha
 WITH_GS_x11cmyk
 WITH_GS_x11cmyk2
 WITH_GS_x11cmyk4
 WITH_GS_x11cmyk8
 WITH_GS_x11gray2
 WITH_GS_x11gray4
 WITH_GS_x11mono
 WITH_GS_x11rg16x
 WITH_GS_x11rg32x

when WITHOUT_X11 is defined.  Which prevents -nox11 being added to PKGNAMESUFFIX.
>How-To-Repeat:
$ cd /usr/ports/print/ghoscript-gpl
$ make config

enable one or more of the GS_x11* option

$ make -V PKGNAME
ghostscript-gpl-8.62_2

$ cd ../ghostscript-gpl-nox11
$ make -V PKGNAME
"/usr/ports/print/ghostscript-gpl-nox11/../ghostscript-gpl/Makefile", line 132: warning: drivers incompatible with WITHOUT_X11 will be removed automatically
ghostscript-gpl-8.62_2


>Fix:
apply the attached patch.

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/print/ghostscript-gpl/Makefile,v
retrieving revision 1.167
diff -u -r1.167 Makefile
--- Makefile	8 May 2008 18:54:22 -0000	1.167
+++ Makefile	21 May 2008 12:32:07 -0000
@@ -117,7 +117,8 @@
 . endif
 .endif
 
-.if defined(WITH_GS_x11) \
+.if defined(WITHOUT_X11)
+. if defined(WITH_GS_x11) \
 	|| defined(WITH_GS_x11alpha) \
 	|| defined(WITH_GS_x11cmyk) \
 	|| defined(WITH_GS_x11cmyk2) \
@@ -128,7 +129,6 @@
 	|| defined(WITH_GS_x11mono) \
 	|| defined(WITH_GS_x11rg16x) \
 	|| defined(WITH_GS_x11rg32x)
-. if defined(WITHOUT_X11)
 . warning drivers incompatible with WITHOUT_X11 will be removed automatically
 . undef WITH_GS_x11
 . undef WITH_GS_x11alpha
@@ -142,13 +142,27 @@
 . undef WITH_GS_x11rg16x
 . undef WITH_GS_x11rg32x
 . endif
+PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-nox11
+CONFIGURE_ARGS+=--without-x
+.else
+. if defined(WITH_GS_x11) \
+	|| defined(WITH_GS_x11alpha) \
+	|| defined(WITH_GS_x11cmyk) \
+	|| defined(WITH_GS_x11cmyk2) \
+	|| defined(WITH_GS_x11cmyk4) \
+	|| defined(WITH_GS_x11cmyk8) \
+	|| defined(WITH_GS_x11gray2) \
+	|| defined(WITH_GS_x11gray4) \
+	|| defined(WITH_GS_x11mono) \
+	|| defined(WITH_GS_x11rg16x) \
+	|| defined(WITH_GS_x11rg32x)
 USE_XORG=	xt xext
 CONFIGURE_ARGS+=--with-x \
 		--x-includes=${X11BASE}/include \
 		--x-libraries=${X11BASE}/lib
-.else
-PKGNAMESUFFIX:=	${PKGNAMESUFFIX}-nox11
+. else
 CONFIGURE_ARGS+=--without-x
+. endif
 .endif
 
 .if defined(WITH_GS_oprp) \


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->doceng 
Responsible-Changed-By: rafan 
Responsible-Changed-When: Sun Jun 1 13:40:24 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/123859: commit references a PR
Date: Sun,  5 Oct 2008 02:43:43 +0000 (UTC)

 hrs         2008-10-05 02:43:30 UTC
 
   FreeBSD ports repository
 
   Modified files:
     print/ghostscript8   Makefile 
   Log:
   Fix an issue that print/ghostscript8 does not set
   PKGNAMESUFFIX (-nox11) correctly when WITHOUT_X11=yes and one of
   the X11 drivers are specified at a time.
   
   PR:     ports/123859
   
   Revision  Changes    Path
   1.175     +25 -26    ports/print/ghostscript8/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"
 
State-Changed-From-To: open->closed 
State-Changed-By: hrs 
State-Changed-When: Sun Oct 5 03:17:12 UTC 2008 
State-Changed-Why:  
Committed with some minor modification.  Thanks for your report! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=123859 
>Unformatted:
