ports/184836: games/gillo: Fix build with clang

KATO Tsuguru tkato432 at yahoo.com
Mon Dec 16 18:10:09 UTC 2013


>Number:         184836
>Category:       ports
>Synopsis:       games/gillo: 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:   Mon Dec 16 18:10:09 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     KATO Tsuguru
>Release:        FreeBSD 8.4-RELEASE-p4 i386
>Organization:
>Environment:
>Description:
- Fix build with clang
- Add LICENSE

New file:
files/patch-src__goal.cpp
files/patch-src__goal.h
files/patch-src__simpleball.cpp
files/patch-src__simpleball.h

>How-To-Repeat:
>Fix:

diff -urN /usr/ports/games/gillo/Makefile games/gillo/Makefile
--- /usr/ports/games/gillo/Makefile	2013-11-06 22:00:55.000000000 +0900
+++ games/gillo/Makefile	2013-12-17 00:00:00.000000000 +0900
@@ -11,18 +11,20 @@
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Players are cars throwing a magnetic fuzzy ball into a goal
 
+LICENSE=	GPLv2
+
 BUILD_DEPENDS=	${JAM}:${PORTSDIR}/devel/jam \
 		${LOCALBASE}/lib/libode.a:${PORTSDIR}/devel/ode \
 		${LOCALBASE}/lib/libplibsg.a:${PORTSDIR}/x11-toolkits/plib
 
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
 USE_BZIP2=	yes
 USE_GL=		gl
 USE_SDL=	yes
-WRKSRC=		${WRKDIR}/${PORTNAME}
 
 JAM?=		${LOCALBASE}/bin/jam
 
-NO_STAGE=	yes
 post-patch:
 	@${REINPLACE_CMD} -i '' -e 's|SDL/||g' ${WRKSRC}/src/*
 	@${REINPLACE_CMD} -e 's|%%SDL_CFLAGS%%|`${SDL_CONFIG} --cflags`|' \
@@ -33,11 +35,11 @@
 do-build:
 	cd ${WRKSRC} && ${SETENV} "C++=${CC}" "LOCALBASE=${LOCALBASE}" \
 		"CFLAGS=${CFLAGS} -DDATADIR=\\\"${PREFIX}/share\\\"" \
-	${JAM} -dx -sPREFIX=${PREFIX}
+		${JAM} -dx -sPREFIX=${PREFIX}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/gillo3 ${PREFIX}/bin
-	@${MKDIR} ${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/data/*.* ${DATADIR}
+	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} gillo3 ${STAGEDIR}${PREFIX}/bin)
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC}/data && ${INSTALL_DATA} *.* ${STAGEDIR}${DATADIR})
 
 .include <bsd.port.mk>
diff -urN /usr/ports/games/gillo/files/patch-src__goal.cpp games/gillo/files/patch-src__goal.cpp
--- /usr/ports/games/gillo/files/patch-src__goal.cpp	1970-01-01 09:00:00.000000000 +0900
+++ games/gillo/files/patch-src__goal.cpp	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- src/goal.cpp.orig
++++ src/goal.cpp
+@@ -22,6 +22,8 @@
+ 
+ namespace gillo {
+ 
++const float Goal::areaRadius = ODE_GOAL_DISTANCE;
++
+ Goal::Goal(Context& c)
+  : Entity(c)
+ {
diff -urN /usr/ports/games/gillo/files/patch-src__goal.h games/gillo/files/patch-src__goal.h
--- /usr/ports/games/gillo/files/patch-src__goal.h	1970-01-01 09:00:00.000000000 +0900
+++ games/gillo/files/patch-src__goal.h	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- src/goal.h.orig
++++ src/goal.h
+@@ -32,7 +32,7 @@
+ */
+ class Goal : public Entity
+ {
+-	static const float areaRadius = ODE_GOAL_DISTANCE;
++	static const float areaRadius;
+ 	dGeomID		gids[6];
+ public:
+     Goal(Context& c);
diff -urN /usr/ports/games/gillo/files/patch-src__simpleball.cpp games/gillo/files/patch-src__simpleball.cpp
--- /usr/ports/games/gillo/files/patch-src__simpleball.cpp	1970-01-01 09:00:00.000000000 +0900
+++ games/gillo/files/patch-src__simpleball.cpp	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,11 @@
+--- src/simpleball.cpp.orig
++++ src/simpleball.cpp
+@@ -26,6 +26,8 @@
+ const sgVec4 SimpleBall::p1[3] = { {0.3, 0.0, 0.0, 1.0}, {1.0, 0.0, 0.0, 1.0}, {1.0, 0.4, 0.4, 1.0} };
+ const sgVec4 SimpleBall::ne[3] = { {0.0, 0.0, 0.0, 1}, {0.6, 0.6, 0.6, 1}, {1.0, 1.0, 1.0, 1} };
+ const sgVec4 SimpleBall::p2[3] = { {0.0, 0.0, 0.3, 1}, {0.0, 0.0, 1.0, 1}, {0.4, 0.4, 1.0, 1} };
++const double SimpleBall::weight = ODE_BALL_MASS;
++const double SimpleBall::radius = ODE_BALL_RADIUS;
+ 
+ SimpleBall::SimpleBall(Context& c)
+ : Entity(c), ballEffectPtr(NULL), possessionIncrement(0), targetSize(2*radius), currentSize(2*radius)
diff -urN /usr/ports/games/gillo/files/patch-src__simpleball.h games/gillo/files/patch-src__simpleball.h
--- /usr/ports/games/gillo/files/patch-src__simpleball.h	1970-01-01 09:00:00.000000000 +0900
+++ games/gillo/files/patch-src__simpleball.h	2013-12-17 00:00:00.000000000 +0900
@@ -0,0 +1,13 @@
+--- src/simpleball.h.orig
++++ src/simpleball.h
+@@ -37,8 +37,8 @@
+ 	static const sgVec4 p1[3];
+ 	static const sgVec4 ne[3];
+ 	static const sgVec4 p2[3];
+-	static const double weight = ODE_BALL_MASS;
+-	static const double radius = ODE_BALL_RADIUS;
++	static const double weight;
++	static const double radius;
+     
+ 	SimpleBall(Context& c);
+ 	SimpleBall(Context& c, float size, ssgSimpleState* state);
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list