From nobody@FreeBSD.org  Wed Dec 18 00:13:52 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id BC117C9F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Dec 2013 00:13:52 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A82B61B1A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Dec 2013 00:13:52 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBI0DqLY035361
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 18 Dec 2013 00:13:52 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBI0Dq3R035356;
	Wed, 18 Dec 2013 00:13:52 GMT
	(envelope-from nobody)
Message-Id: <201312180013.rBI0Dq3R035356@oldred.freebsd.org>
Date: Wed, 18 Dec 2013 00:13:52 GMT
From: John Marino <freebsd@marino.st>
To: freebsd-gnats-submit@FreeBSD.org
Subject: x11-servers/xorg-server: Slave port makefiles all have same error
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184952
>Category:       ports
>Synopsis:       x11-servers/xorg-server: Slave port makefiles all have same error
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-x11
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 18 00:20:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue May  6 08:10:00 UTC 2014
>Originator:     John Marino
>Release:        
>Organization:
>Environment:
>Description:
I reported this issue over IRC but apparently it has been forgotten.  I am writing this down via PR officially now.

x11-servers/xorg-nestserver
x11-servers/xorg-vfbserver
x11-servers/xephyr

are all slave ports of x11-servers, and all have the same issue:

They each have this line:
.include <bsd.port.options.mk>

As these are slave ports, there are no options defined.  So at the very best, it's a useless line that needs cleaning up.  However, it actually causes duplicate loading of Makefile.* which breaks dports (it causes patches to be applied twice).

Please remove these extraneous includes
>How-To-Repeat:

>Fix:
remove ".include <bsd.port.options.mk>" line from each of these three ports.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-x11 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Dec 18 00:20:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184952 
State-Changed-From-To: open->closed 
State-Changed-By: kwm 
State-Changed-When: Tue Dec 31 13:22:27 UTC 2013 
State-Changed-Why:  
Committed thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184952: commit references a PR
Date: Tue, 31 Dec 2013 13:22:24 +0000 (UTC)

 Author: kwm
 Date: Tue Dec 31 13:22:14 2013
 New Revision: 338299
 URL: http://svnweb.freebsd.org/changeset/ports/338299
 
 Log:
   Remove extra bsd.port.options.mk, it already defined in the master port.
   
   PR:		ports/184952
   Submitted by:	marino@
 
 Modified:
   head/x11-servers/xephyr/Makefile
 
 Modified: head/x11-servers/xephyr/Makefile
 ==============================================================================
 --- head/x11-servers/xephyr/Makefile	Tue Dec 31 13:17:05 2013	(r338298)
 +++ head/x11-servers/xephyr/Makefile	Tue Dec 31 13:22:14 2013	(r338299)
 @@ -21,8 +21,6 @@ CONFIGURE_ARGS=	--enable-kdrive --enable
  SLAVE_PORT=	yes
  PLIST_FILES=	bin/Xephyr man/man1/Xephyr.1.gz
  
 -.include <bsd.port.options.mk>
 -
  do-install:
  	${INSTALL_PROGRAM} ${WRKSRC}/hw/kdrive/ephyr/Xephyr ${STAGEDIR}${PREFIX}/bin/
  .if defined(WITH_NEW_XORG)
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: Niclas Zeising <zeising@freebsd.org>
To: bug-followup@FreeBSD.org, freebsd@marino.st, kwm@freebsd.org
Cc:  
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Tue, 31 Dec 2013 19:23:59 +0100

 This breaks detection of WITH_NEW_XORG= and needs to be reverted.
 Regards!
 -- 
 Niclas Zeising

From: John Marino <freebsd.contact@marino.st>
To: Niclas Zeising <zeising@freebsd.org>
Cc: bug-followup@FreeBSD.org, freebsd@marino.st, kwm@freebsd.org, 
 Baptiste Daroussin <bapt@freebsd.org>
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Tue, 31 Dec 2013 20:43:00 +0100

 On 12/31/2013 19:23, Niclas Zeising wrote:
 > This breaks detection of WITH_NEW_XORG= and needs to be reverted.
 > Regards!
 
 Then your WITH_NEW_XORG detection is wrong.
 Having bsd.ports.options.mk loaded multiple times causes problems, such
 as applying the same patches multiple times (if patches are present).
 It was detected independently by myself and kwm.
 
 By the way, the "detection" broke DragonFly too because of the use of
 OSVERSION without OPSYS.
 
 I'd say the detection is what needs to be reverted.
 
 (DragonFly has /etc/defaults/make.conf so we put WITH_NEW_XORG defaults
 there)
 
 John

From: Niclas Zeising <zeising@freebsd.org>
To: marino@freebsd.org
Cc: John Marino <freebsd.contact@marino.st>, bug-followup@FreeBSD.org, 
 freebsd@marino.st, kwm@freebsd.org, 
 Baptiste Daroussin <bapt@freebsd.org>
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Tue, 31 Dec 2013 21:17:23 +0100

 On 12/31/13 20:43, John Marino wrote:
 > On 12/31/2013 19:23, Niclas Zeising wrote:
 >> This breaks detection of WITH_NEW_XORG= and needs to be reverted.
 >> Regards!
 > 
 > Then your WITH_NEW_XORG detection is wrong.
 > Having bsd.ports.options.mk loaded multiple times causes problems, such
 > as applying the same patches multiple times (if patches are present).
 > It was detected independently by myself and kwm.
 > 
 > By the way, the "detection" broke DragonFly too because of the use of
 > OSVERSION without OPSYS.
 > 
 > I'd say the detection is what needs to be reverted.
 > 
 > (DragonFly has /etc/defaults/make.conf so we put WITH_NEW_XORG defaults
 > there)
 
 
 FreeBSD has no such thing, so that is not an option.  Currently
 WITH_NEW_XORG is defined in bsd.port.mk, which is included from
 bsd.port.options.mk.  This needs to be included WITH_NEW_XORG is
 checked.  Bapt said that the best way was to include bsd.port.options.mk
 before checking for WITH_NEW_XORG.  I will leave this as-is for now,
 since I'm not in a position to develop a better solution currently,
 however, this has to be revisisted asap.
 Regards!
 -- 
 Niclas Zeising

From: John Marino <freebsd.contact@marino.st>
To: Niclas Zeising <zeising@freebsd.org>
Cc: marino@freebsd.org, bug-followup@FreeBSD.org, freebsd@marino.st, 
 kwm@freebsd.org, Baptiste Daroussin <bapt@freebsd.org>
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Tue, 31 Dec 2013 22:33:03 +0100

 On 12/31/2013 21:17, Niclas Zeising wrote:
 > On 12/31/13 20:43, John Marino wrote:
 >> On 12/31/2013 19:23, Niclas Zeising wrote:
 >>> This breaks detection of WITH_NEW_XORG= and needs to be reverted.
 >>> Regards!
 >>
 >> Then your WITH_NEW_XORG detection is wrong.
 >> Having bsd.ports.options.mk loaded multiple times causes problems, such
 >> as applying the same patches multiple times (if patches are present).
 >> It was detected independently by myself and kwm.
 >>
 >> By the way, the "detection" broke DragonFly too because of the use of
 >> OSVERSION without OPSYS.
 >>
 >> I'd say the detection is what needs to be reverted.
 >>
 >> (DragonFly has /etc/defaults/make.conf so we put WITH_NEW_XORG defaults
 >> there)
 > 
 > 
 > FreeBSD has no such thing, so that is not an option. 
 
 Yes, I was surprised to discover this when I investigated earlier.
 
 > Currently WITH_NEW_XORG is defined in bsd.port.mk, which is included from
 > bsd.port.options.mk.  This needs to be included WITH_NEW_XORG is
 > checked.  Bapt said that the best way was to include bsd.port.options.mk
 > before checking for WITH_NEW_XORG.  I will leave this as-is for now,
 > since I'm not in a position to develop a better solution currently,
 > however, this has to be revisisted asap.
 
 If bsd.ports.options.mk is loaded at least once, why does removing it
 from xephry/nested/vbf slave ports break the detection?  Should not it
 still work since xorg-server loads it?
 
 John
 
 

From: Mark Linimon <linimon@lonesome.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: [zeising@freebsd.org: Re: ports/184952: x11-servers/xorg-server:
 Slave port makefiles all have same error]
Date: Tue, 31 Dec 2013 19:00:01 -0600

 ----- Forwarded message from Niclas Zeising <zeising@freebsd.org> -----
 
 Date: Wed, 01 Jan 2014 01:55:44 +0100
 From: Niclas Zeising <zeising@freebsd.org>
 To: Thomas Mueller <mueller6724@bellsouth.net>
 Cc: freebsd-x11@freebsd.org
 Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all have same error
 User-Agent: Mutt/1.5.21
 
 On 01/01/14 01:12, Thomas Mueller wrote:
 > 
 > I hope you or somebody in charge of the new Xorg will say when we can build X on FreeBSD 10-stable and 11-head.
 > 
 
 It is ready and working, just go to x11/xorg to build the xorg meta
 port.  You might want to set WITH_NEW_XORG= in /etc/make.conf to get the
 new xorg stack, especially if you have hardware that needs KMS, such as
 intel and ATI/AMD graphics cards.
 Regards!
 -- 
 Niclas Zeising
 _______________________________________________
 freebsd-x11@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-x11
 To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org"
 
 
 ----- End forwarded message -----

From: Koop Mast <kwm@rainbow-runner.nl>
To: bug-followup@FreeBSD.org, freebsd@marino.st, zeising@FreeBSD.org
Cc:  
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Wed, 01 Jan 2014 10:19:40 +0100

 I have trouble seeing what is exactly broken with the WITH_NEW_XORG 
 detection. On the survace it seems to work. Can you explain where it 
 doesn't work?
 
 root@crashalot:/usr/ports/x11-servers/xephyr # ident Makefile
 Makefile:
       $FreeBSD: head/x11-servers/xephyr/Makefile 338299 2013-12-31 
 13:22:14Z kwm $
 root@crashalot:/usr/ports/x11-servers/xephyr # make -V PORTVERSION
 1.12.4

From: John Marino <freebsd.contact@marino.st>
To: Koop Mast <kwm@rainbow-runner.nl>
Cc: bug-followup@FreeBSD.org, zeising@FreeBSD.org
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Wed, 01 Jan 2014 18:56:05 +0100

 On 1/1/2014 10:19, Koop Mast wrote:
 > I have trouble seeing what is exactly broken with the WITH_NEW_XORG
 > detection. On the survace it seems to work. Can you explain where it
 > doesn't work?
 > 
 > root@crashalot:/usr/ports/x11-servers/xephyr # ident Makefile
 > Makefile:
 >      $FreeBSD: head/x11-servers/xephyr/Makefile 338299 2013-12-31
 > 13:22:14Z kwm $
 > root@crashalot:/usr/ports/x11-servers/xephyr # make -V PORTVERSION
 > 1.12.4
 
 Koop,
 Were you addressing Niclas?
 
 He claimed your commit broke it.  At first I said, "well detection must
 be broken in that case", but after thinking about it, I questioned
 Niclas if it was actually broken.  Since xorg-server still pulls in
 bsd.port.options.mk, the detection should still work (as you note).
 
 So right now, I'm working under the assumption there is actually no
 breakage at all, and Niclas just said the ports were broken without
 verifying first.  If that assumption is wrong, he should correct it.
 
 Regards,
 John
State-Changed-From-To: closed->open 
State-Changed-By: marino 
State-Changed-When: Tue May 6 08:06:03 UTC 2014 
State-Changed-Why:  
Commit reversion broke at least one xorg-serve slave on DF 

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

From: John Marino <freebsd.contact@marino.st>
To: bug-followup@FreeBSD.org, freebsd@marino.st
Cc:  
Subject: Re: ports/184952: x11-servers/xorg-server: Slave port makefiles all
 have same error
Date: Tue, 06 May 2014 10:02:36 +0200

 zeising@ reverted the commit, and thus broke the port on DragonFly again:
 
 http://svnweb.freebsd.org/ports/head/x11-servers/xephyr/Makefile?r1=351411&r2=351410&pathrev=351411
 
 Here's the error that it caused mixing bsd.port.options.mk followed by
 bsd.port.pre.mk.
 
 > =======================<phase: patch          >============================
 > ===>  Patching for xephyr-1.12.4_7,1
 > ===>  Applying extra patch /usr/ports/x11-servers/xephyr/../xorg-server/dragonfly/extra-new-hw_xfree86_os-support_xf86__OSlib.h
 > ===>  Applying extra patch /usr/ports/x11-servers/xephyr/../xorg-server/dragonfly/extra-new-hw_xfree86_os-support_xf86__OSlib.h
 > Ignoring previously applied (or reversed) patch.
 > 1 out of 1 hunks ignored--saving rejects to hw/xfree86/os-support/xf86_OSlib.h.rej
 > *** Error code 1
 
 Here is the inclusion order on DragonFly:
 
 x11-servers/xephyr> make -V .MAKE.MAKEFILES | tr " " "\n"
 /usr/share/mk/sys.mk
 /etc/defaults/make.conf
 /etc/make.conf
 /usr/share/mk/bsd.cpu.mk
 /usr/share/mk/bsd.cpu.gcc47.mk
 Makefile
 /usr/share/mk/bsd.port.options.mk
 /usr/share/mk/bsd.port.mk
 /usr/share/mk/bsd.own.mk
 /usr/dports/Mk/bsd.port.mk
 /usr/dports/Mk/bsd.commands.mk
 /home/automaton/merged-ports/x11-servers/xephyr/../xorg-server/Makefile.DragonFly
 /usr/dports/Mk/bsd.options.mk
 /home/automaton/merged-ports/x11-servers/xephyr/../xorg-server/Makefile
 /usr/share/mk/bsd.port.pre.mk
 /usr/dports/Mk/bsd.sanity.mk
 /usr/dports/Mk/bsd.xorg.mk
 /usr/dports/Mk/bsd.openssl.mk
 /usr/dports/Mk/bsd.pbi.mk
 /usr/dports/Mk/Uses/gmake.mk
 /usr/dports/Mk/Uses/libtool.mk
 /usr/dports/Mk/Uses/perl5.mk
 /usr/dports/Mk/Uses/tar.mk
 /usr/dports/Mk/Uses/pkgconfig.mk
 /usr/dports/Mk/Uses/pathfix.mk
 /usr/share/mk/bsd.port.post.mk
 /usr/dports/Mk/bsd.stage.mk
 /usr/dports/Mk/bsd.pkgng.mk
 /usr/dports/Mk/bsd.licenses.mk
 /usr/dports/Mk/bsd.sites.mk
 /usr/dports/Mk/bsd.options.desc.mk
 
 One doesn't normally needed both options and pre, it's usually one or
 the other.  What exactly is broken when ".include <bsd.port.options.mk>"
 is removed?  Because it builds fine without it.
 
 Reopening - and hopefully this will be resolved quickly.
 John
>Unformatted:
