Bug 181616 - [PATCH] games/stockfish: Fix build with clang
Summary: [PATCH] games/stockfish: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 13:50 UTC by Guido Falsi
Modified: 2013-09-16 18:40 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (629 bytes, patch)
2013-08-28 13:50 UTC, Guido Falsi
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2013-08-28 13:50:02 UTC
- 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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-28 13:50:14 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-28 13:50:15 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2013-08-28 13:50:15 UTC
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
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2013-09-02 22:32:13 UTC
Responsible Changed
From-To: miwi->madpilot

I'll take it.
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2013-09-16 18:37:21 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 6 dfilter service freebsd_committer freebsd_triage 2013-09-16 18:37:26 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"