From mad@micro.madpilot.net  Wed Aug 28 12:48:58 2013
Return-Path: <mad@micro.madpilot.net>
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 ESMTP id BB0A87EF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Aug 2013 12:48:58 +0000 (UTC)
	(envelope-from mad@micro.madpilot.net)
Received: from micro.madpilot.net (micro.madpilot.net [88.149.173.206])
	by mx1.freebsd.org (Postfix) with ESMTP id 6CB1524D1
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 28 Aug 2013 12:48:58 +0000 (UTC)
Received: from micro.madpilot.net (localhost [127.0.0.1])
	by micro.madpilot.net (Postfix) with ESMTP id 3cQ6G13N0cz2pv;
	Wed, 28 Aug 2013 14:48:57 +0200 (CEST)
Received: from micro.madpilot.net ([127.0.0.1])
	by micro.madpilot.net (micro.madpilot.net [127.0.0.1]) (amavisd-new, port 10026)
	with ESMTP id gxN0iDrchkHD; Wed, 28 Aug 2013 14:48:55 +0200 (CEST)
Received: by micro.madpilot.net (Postfix, from userid 1000)
	id 3cQ6Fy70nbz2pt; Wed, 28 Aug 2013 14:48:54 +0200 (CEST)
Message-Id: <3cQ6Fy70nbz2pt@micro.madpilot.net>
Date: Wed, 28 Aug 2013 14:48:54 +0200 (CEST)
From: Guido Falsi <madpilot@FreeBSD.org>
Reply-To: Guido Falsi <madpilot@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: execve@gmail.com
Subject: [PATCH] games/stockfish: Fix build with clang
X-Send-Pr-Version: 3.114
X-GNATS-Notify: execve@gmail.com

>Number:         181616
>Category:       ports
>Synopsis:       [PATCH] games/stockfish: Fix build with clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    madpilot
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 28 12:50:02 UTC 2013
>Closed-Date:    Mon Sep 16 17:37:22 UTC 2013
>Last-Modified:  Mon Sep 16 17:40:02 UTC 2013
>Originator:     Guido Falsi
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
none
>Environment:
System: FreeBSD micro.madpilot.net 9.1-STABLE FreeBSD 9.1-STABLE #21 r252026: Thu Jun 20 16:27:06 CEST 2013 root@micro.madpilot.net:/usr/obj/usr/src/sys/MICRO amd64

>Description:

- Fix build with clang
- Make it respect PREFIX
- USES=gmake

The patch forces the port to use clang on FreeBSD versions where
clang is the default compiler (10-CURRENT after November 5, 2012).

This looks to me as the cleanest fix.

>How-To-Repeat:
>Fix:

Index: Makefile
===================================================================
--- Makefile	(revision 325518)
+++ Makefile	(working copy)
@@ -19,7 +19,7 @@
 
 USE_ZIP=	yes
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
-USE_GMAKE=	yes
+USES=		gmake
 MYARCH=		${ARCH}
 BOOKDIR=	.
 PORTDOCS=	Readme.txt polyglot.ini
@@ -69,6 +69,13 @@
 BROKEN=		Does not compile on ia64, powerpc, or sparc64
 .endif
 
+.if exists(/usr/bin/clang) && ${OSVERSION} > 1000024
+MYCC=	clang
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e "s/^PREFIX =/PREFIX ?=/" ${WRKSRC}/Makefile
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/stockfish ${PREFIX}/bin/stockfish
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Aug 28 12:50:14 UTC 2013 
Responsible-Changed-Why:  
miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181616 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Aug 28 12:50:15 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: execve@gmail.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/181616: [PATCH] games/stockfish: Fix build with clang
Date: Wed, 28 Aug 2013 12:50:15 UT

 Maintainer of games/stockfish,
 
 Please note that PR ports/181616 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/181616
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: miwi->madpilot 
Responsible-Changed-By: madpilot 
Responsible-Changed-When: Mon Sep 2 21:32:13 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=181616 
State-Changed-From-To: feedback->closed 
State-Changed-By: madpilot 
State-Changed-When: Mon Sep 16 17:37:21 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/181616: commit references a PR
Date: Mon, 16 Sep 2013 17:37:26 +0000 (UTC)

 Author: madpilot
 Date: Mon Sep 16 17:37:14 2013
 New Revision: 327425
 URL: http://svnweb.freebsd.org/changeset/ports/327425
 
 Log:
   - Fix build with clang
   - Make it respect PREFIX
   - While here, USES=gmake
   
   PR:		ports/181616
   Submitted by:	Me
   Approved by:	Maintainer timeout
 
 Modified:
   head/games/stockfish/Makefile
 
 Modified: head/games/stockfish/Makefile
 ==============================================================================
 --- head/games/stockfish/Makefile	Mon Sep 16 17:29:09 2013	(r327424)
 +++ head/games/stockfish/Makefile	Mon Sep 16 17:37:14 2013	(r327425)
 @@ -19,7 +19,7 @@ LICENSE=	GPLv3
  
  USE_ZIP=	yes
  WRKSRC=		${WRKDIR}/${DISTNAME}/src
 -USE_GMAKE=	yes
 +USES=		gmake
  MYARCH=		${ARCH}
  BOOKDIR=	.
  PORTDOCS=	Readme.txt polyglot.ini
 @@ -69,6 +69,13 @@ ALL_TARGET=	${TGTBLD} ARCH=${MYARCH} COM
  BROKEN=		Does not compile on ia64, powerpc, or sparc64
  .endif
  
 +.if exists(/usr/bin/clang) && ${OSVERSION} > 1000024
 +MYCC=	clang
 +.endif
 +
 +post-patch:
 +	@${REINPLACE_CMD} -e "s/^PREFIX =/PREFIX ?=/" ${WRKSRC}/Makefile
 +
  do-install:
  	${INSTALL_PROGRAM} ${WRKSRC}/stockfish ${PREFIX}/bin/stockfish
  
 _______________________________________________
 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"
 
>Unformatted:
