Date: Wed, 28 Aug 2013 14:48:54 +0200 (CEST) From: Guido Falsi <madpilot@FreeBSD.org> To: FreeBSD-gnats-submit@freebsd.org Cc: execve@gmail.com Subject: ports/181616: [PATCH] games/stockfish: Fix build with clang Message-ID: <3cQ6Fy70nbz2pt@micro.madpilot.net> Resent-Message-ID: <201308281250.r7SCo2De097546@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 181616 >Category: ports >Synopsis: [PATCH] games/stockfish: Fix build with clang >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 28 12:50:02 UTC 2013 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3cQ6Fy70nbz2pt>