Bug 169179 - [maintainer-update] Patch to fix games/netrek-client-cow build using CLANG
Summary: [maintainer-update] Patch to fix games/netrek-client-cow build using 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: Alex Kozlov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-17 17:30 UTC by Kevin Zheng
Modified: 2012-08-05 23:20 UTC (History)
0 users

See Also:


Attachments
file.diff (1.39 KB, patch)
2012-06-17 17:30 UTC, Kevin Zheng
no flags Details | Diff
patch.txt (377 bytes, text/plain; charset=us-ascii)
2012-08-05 22:50 UTC, Alex Kozlov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2012-06-17 17:30:13 UTC
FreeBSD is now moving to the CLANG/LLVM compiler architecture. Ports should be built with CLANG without errors, and ports that fail are buggy.

A source file contained in games/netrek-client-cow makes incorrect use of inline functions. This wasn't a problem for GCC, but turned out to be a problem for CLANG.

Fix: Apply the attached patch to games/netrek-client-cow.

Patch attached with submission follows:
How-To-Repeat: Append the following to /etc/make.conf:
CC=clang
CXX=clang++
CPP=clang-cpp

Try to build games/netrek-client-cow (it won't work).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-06-17 17:30:26 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2012-08-05 06:46:52 UTC
Responsible Changed
From-To: miwi->freebsd-ports-bugs

Over to maintainer.
Comment 3 Alex Kozlov freebsd_committer freebsd_triage 2012-08-05 21:41:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

I'll take it.
Comment 4 Alex Kozlov 2012-08-05 22:50:23 UTC
Hi

Unfortunately, your patch doesn't work with base gcc:
http://redports.org/buildarchive/20120805195954-63377/

What do you think about attached patch?


-- 
Alex
Comment 5 dfilter service freebsd_committer freebsd_triage 2012-08-05 23:14:48 UTC
Author: ak
Date: Sun Aug  5 22:14:38 2012
New Revision: 302137
URL: http://svn.freebsd.org/changeset/ports/302137

Log:
  - Fix build with clang
  
  PR:	ports/169179
  Submitted by:	Kevin Zheng <kevinz5000@gmail.com> (maintainer)

Modified:
  head/games/netrek-client-cow/Makefile   (contents, props changed)

Modified: head/games/netrek-client-cow/Makefile
==============================================================================
--- head/games/netrek-client-cow/Makefile	Sun Aug  5 21:10:33 2012	(r302136)
+++ head/games/netrek-client-cow/Makefile	Sun Aug  5 22:14:38 2012	(r302137)
@@ -25,6 +25,8 @@ CONFIGURE_ARGS+=	NORSA='\#'
 post-patch:
 	${REINPLACE_CMD} -e 's|ushort  damage|unsigned short damage|' \
 		${WRKSRC}/short.c
+	${REINPLACE_CMD} -e 's|inline void|void|' \
+		${WRKSRC}/local.[ch]
 	${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
 		${WRKSRC}/x11sprite.c ${WRKSRC}/netrek-client-cow.desktop
 	${REINPLACE_CMD} -e 's|games|bin|' \
_______________________________________________
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"
Comment 6 Alex Kozlov freebsd_committer freebsd_triage 2012-08-05 23:15:49 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!