From nobody@FreeBSD.org  Tue Oct  1 04:59:22 2013
Return-Path: <nobody@FreeBSD.org>
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 7183A6CC
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Oct 2013 04:59:22 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id EB9552B84
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  1 Oct 2013 04:59:21 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r914xLnS031172
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 1 Oct 2013 04:59:21 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r914xLOx031163;
	Tue, 1 Oct 2013 04:59:21 GMT
	(envelope-from nobody)
Message-Id: <201310010459.r914xLOx031163@oldred.freebsd.org>
Date: Tue, 1 Oct 2013 04:59:21 GMT
From: Sender Ghost <lightside@gmx.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [MAINTAINER] games/assaultcube: Build with newer GCC and Clang compilers (for v1.1.0.4)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         182534
>Category:       ports
>Synopsis:       [MAINTAINER] games/assaultcube: Build with newer GCC and Clang compilers (for v1.1.0.4)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 01 05:00:00 UTC 2013
>Closed-Date:    Fri Oct 11 02:12:39 UTC 2013
>Last-Modified:  Fri Oct 11 02:12:39 UTC 2013
>Originator:     Sender Ghost
>Release:        FreeBSD 9.1-RELEASE
>Organization:
>Environment:
>Description:
Backported some changes from newer 1.2.0.0 beta version to be able compile with newer GCC and Clang compilers. Tested on GCC v4.2 and v4.8, Clang v3.3 (including with "-std=c++11" compiler option).

Also changed launcher scripts and removed the need to create symlinks for data files (as games/redeclipse port's maintainer did).

Notified by:
http://lists.freebsd.org/pipermail/freebsd-pkg-fallout/Week-of-Mon-20130923/023146.html
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN assaultcube.orig/Makefile assaultcube/Makefile
--- assaultcube.orig/Makefile	2013-09-20 21:36:33.000000000 +0400
+++ assaultcube/Makefile	2013-10-01 07:49:46.000000000 +0400
@@ -3,7 +3,7 @@
 
 PORTNAME=	assaultcube
 PORTVERSION=	1.1.0.4
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	games
 MASTER_SITES=	SF/actiongame/AssaultCube%20Version%20${PORTVERSION}
 DISTFILES=	AssaultCube_v${PORTVERSION}_source${EXTRACT_SUFX} \
diff -ruN assaultcube.orig/files/assaultcube_client.in assaultcube/files/assaultcube_client.in
--- assaultcube.orig/files/assaultcube_client.in	2012-07-14 17:54:48.000000000 +0400
+++ assaultcube/files/assaultcube_client.in	2013-10-01 06:50:01.000000000 +0400
@@ -1,25 +1,4 @@
 #!/bin/sh
 
-# The executable needs to be run from its data directory, and needs to store
-# configuration in it. We therefore mirror the data directory hierarchy in
-# ~/.XXX, and create symlinks to the data files, but the configuration files
-# are copied, and write permission for the user is added to them.
-
-APPNAME="assaultcube"
-CUBE_OPTIONS="--home=${HOME}/.${APPNAME} --init"
-
-if [ -d ~/.$APPNAME ]
-then
-	echo "Using existing ~/.$APPNAME directory."
-else
-	echo "Creating ~/.$APPNAME directory."
-	cd %%DATADIR%% || exit 1
-	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
-	find * -type f -name "*.cfg" \
-	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
-	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
-	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
-fi
-
-cd ~/.$APPNAME || exit 1
-exec %%PREFIX%%/libexec/${APPNAME}_client ${CUBE_OPTIONS} "$@"
+CUBE_OPTIONS="--home=${HOME}/.assaultcube --init"
+cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_client ${CUBE_OPTIONS} "$@"
diff -ruN assaultcube.orig/files/assaultcube_master.in assaultcube/files/assaultcube_master.in
--- assaultcube.orig/files/assaultcube_master.in	2012-07-14 17:54:48.000000000 +0400
+++ assaultcube/files/assaultcube_master.in	2013-10-01 06:40:30.000000000 +0400
@@ -1,25 +1,4 @@
 #!/bin/sh
 
-# The executable needs to be run from its data directory, and needs to store
-# configuration in it. We therefore mirror the data directory hierarchy in
-# ~/.XXX, and create symlinks to the data files, but the configuration files
-# are copied, and write permission for the user is added to them.
-
-APPNAME="assaultcube"
 CUBE_OPTIONS=
-
-if [ -d ~/.$APPNAME ]
-then
-	echo "Using existing ~/.$APPNAME directory."
-else
-	echo "Creating ~/.$APPNAME directory."
-	cd %%DATADIR%% || exit 1
-	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
-	find * -type f -name "*.cfg" \
-	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
-	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
-	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
-fi
-
-cd ~/.$APPNAME || exit 1
-exec %%PREFIX%%/libexec/${APPNAME}_master ${CUBE_OPTIONS} "$@"
+cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_master ${CUBE_OPTIONS} "$@"
diff -ruN assaultcube.orig/files/assaultcube_server.in assaultcube/files/assaultcube_server.in
--- assaultcube.orig/files/assaultcube_server.in	2012-07-14 17:54:48.000000000 +0400
+++ assaultcube/files/assaultcube_server.in	2013-10-01 06:40:29.000000000 +0400
@@ -1,25 +1,4 @@
 #!/bin/sh
 
-# The executable needs to be run from its data directory, and needs to store
-# configuration in it. We therefore mirror the data directory hierarchy in
-# ~/.XXX, and create symlinks to the data files, but the configuration files
-# are copied, and write permission for the user is added to them.
-
-APPNAME="assaultcube"
 CUBE_OPTIONS=
-
-if [ -d ~/.$APPNAME ]
-then
-	echo "Using existing ~/.$APPNAME directory."
-else
-	echo "Creating ~/.$APPNAME directory."
-	cd %%DATADIR%% || exit 1
-	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
-	find * -type f -name "*.cfg" \
-	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
-	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
-	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
-fi
-
-cd ~/.$APPNAME || exit 1
-exec %%PREFIX%%/libexec/${APPNAME}_server ${CUBE_OPTIONS} "$@"
+cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_server ${CUBE_OPTIONS} "$@"
diff -ruN assaultcube.orig/files/patch-source_src_Makefile assaultcube/files/patch-source_src_Makefile
--- assaultcube.orig/files/patch-source_src_Makefile	2012-07-14 17:54:48.000000000 +0400
+++ assaultcube/files/patch-source_src_Makefile	2013-10-01 06:15:34.000000000 +0400
@@ -16,10 +16,10 @@
  USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi)
  override CXXFLAGS+= -rdynamic
 -CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include
-+CLIENT_INCLUDES= $(INCLUDES) `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -idirafter ../include
++CLIENT_INCLUDES= $(INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags` -idirafter ../include
  # -lSDL_ttf 
 -CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile
-+CLIENT_LIBS= -L../enet/.libs -lenet `${SDL_CONFIG} --libs` -L${LOCALBASE}/lib -lSDL_image -lz -lGL -lopenal -lvorbisfile -lintl
++CLIENT_LIBS= -L../enet/.libs -lenet -L${LOCALBASE}/lib -lX11 `${SDL_CONFIG} --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lintl
  endif
  
  CLIENT_OBJS= \
diff -ruN assaultcube.orig/files/patch-source_src_console.h assaultcube/files/patch-source_src_console.h
--- assaultcube.orig/files/patch-source_src_console.h	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_console.h	2013-10-01 08:15:54.000000000 +0400
@@ -0,0 +1,17 @@
+--- source/src/console.h.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/console.h	2013-10-01 08:15:27.000000000 +0400
+@@ -127,7 +127,7 @@
+     }
+ };
+ 
+-/** WIP ALERT */
++/** WIP ALERT *//*
+ struct textinputbuffer_wip
+ {
+     string buf;
+@@ -257,4 +257,4 @@
+         return false;
+     }
+ };
+-
++*/
diff -ruN assaultcube.orig/files/patch-source_src_master.cpp assaultcube/files/patch-source_src_master.cpp
--- assaultcube.orig/files/patch-source_src_master.cpp	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_master.cpp	2013-10-01 08:05:05.000000000 +0400
@@ -0,0 +1,11 @@
+--- source/src/master.cpp.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/master.cpp	2013-10-01 08:04:23.000000000 +0400
+@@ -509,7 +509,7 @@
+     authreq &a = c.authreqs.add();
+     a.reqtime = servtime;
+     a.id = id;
+-    uint seed[3] = { starttime, servtime, randomMT() };
++    uint seed[3] = { (uint)starttime, servtime, randomMT() };
+     static vector<char> buf;
+     buf.setsize(0);
+     a.answer = genchallenge(u->pubkey, seed, sizeof(seed), buf);
diff -ruN assaultcube.orig/files/patch-source_src_modelcache.h assaultcube/files/patch-source_src_modelcache.h
--- assaultcube.orig/files/patch-source_src_modelcache.h	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_modelcache.h	2013-10-01 07:09:46.000000000 +0400
@@ -0,0 +1,13 @@
+--- source/src/modelcache.h.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/modelcache.h	2013-10-01 07:08:22.000000000 +0400
+@@ -31,8 +31,8 @@
+ 
+     void unlink()
+     {
+-        prev->entry::next = next;
+-        next->entry::prev = prev;
++        prev->modelcacheentry<T>::next = next;
++        next->modelcacheentry<T>::prev = prev;
+         prev = next = (T *)this;
+     }
+ 
diff -ruN assaultcube.orig/files/patch-source_src_server.cpp assaultcube/files/patch-source_src_server.cpp
--- assaultcube.orig/files/patch-source_src_server.cpp	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_server.cpp	2013-10-01 07:52:17.000000000 +0400
@@ -0,0 +1,11 @@
+--- source/src/server.cpp.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/server.cpp	2013-10-01 07:51:55.000000000 +0400
+@@ -3928,7 +3928,7 @@
+ 
+     if((isdedicated = dedicated))
+     {
+-        ENetAddress address = { ENET_HOST_ANY, scl.serverport };
++        ENetAddress address = { ENET_HOST_ANY, (enet_uint16)scl.serverport };
+         if(scl.ip[0] && enet_address_set_host(&address, scl.ip)<0) logline(ACLOG_WARNING, "server ip not resolved!");
+         serverhost = enet_host_create(&address, scl.maxclients+1, 3, 0, scl.uprate);
+         if(!serverhost) fatal("could not create server host");
diff -ruN assaultcube.orig/files/patch-source_src_serverms.cpp assaultcube/files/patch-source_src_serverms.cpp
--- assaultcube.orig/files/patch-source_src_serverms.cpp	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_serverms.cpp	2013-10-01 07:23:41.000000000 +0400
@@ -0,0 +1,11 @@
+--- source/src/serverms.cpp.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/serverms.cpp	2013-10-01 07:22:14.000000000 +0400
+@@ -334,7 +334,7 @@
+ 
+ 	if(listen)
+ 	{
+-        ENetAddress address = { ENET_HOST_ANY, infoport };
++        ENetAddress address = { ENET_HOST_ANY, (enet_uint16)infoport };
+         if(*ip)
+         {
+             if(enet_address_set_host(&address, ip)<0) logline(ACLOG_WARNING, "server ip not resolved");
diff -ruN assaultcube.orig/files/patch-source_src_stream.cpp assaultcube/files/patch-source_src_stream.cpp
--- assaultcube.orig/files/patch-source_src_stream.cpp	1970-01-01 03:00:00.000000000 +0300
+++ assaultcube/files/patch-source_src_stream.cpp	2013-10-01 07:56:40.000000000 +0400
@@ -0,0 +1,13 @@
+--- source/src/stream.cpp.orig	2010-11-14 21:46:24.000000000 +0300
++++ source/src/stream.cpp	2013-10-01 07:56:16.000000000 +0400
+@@ -593,8 +593,8 @@
+         }
+         uchar trailer[8] =
+         {
+-            crc&0xFF, (crc>>8)&0xFF, (crc>>16)&0xFF, (crc>>24)&0xFF,
+-            zfile.total_in&0xFF, (zfile.total_in>>8)&0xFF, (zfile.total_in>>16)&0xFF, (zfile.total_in>>24)&0xFF
++            uchar(crc&0xFF), uchar((crc>>8)&0xFF), uchar((crc>>16)&0xFF), uchar((crc>>24)&0xFF),
++            uchar(zfile.total_in&0xFF), uchar((zfile.total_in>>8)&0xFF), uchar((zfile.total_in>>16)&0xFF), uchar((zfile.total_in>>24)&0xFF)
+         };
+         file->write(trailer, sizeof(trailer));
+     }


>Release-Note:
>Audit-Trail:

From: Sender Ghost <lightside@gmx.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/182534: [MAINTAINER] games/assaultcube: Build with newer
 GCC and Clang compilers (for v1.1.0.4)
Date: Mon, 07 Oct 2013 01:33:48 +0400

 This is a multi-part message in MIME format.
 --------------060707050503010404060704
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Also added STAGEDIR support.
 
 --------------060707050503010404060704
 Content-Type: text/plain; charset=UTF-8;
  name="patch.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch.txt"
 
 diff -ruN assaultcube.orig/Makefile assaultcube/Makefile
 --- assaultcube.orig/Makefile	2013-09-20 21:36:33.000000000 +0400
 +++ assaultcube/Makefile	2013-10-07 01:08:53.000000000 +0400
 @@ -3,7 +3,7 @@
  
  PORTNAME=	assaultcube
  PORTVERSION=	1.1.0.4
 -PORTREVISION=	4
 +PORTREVISION=	5
  CATEGORIES=	games
  MASTER_SITES=	SF/actiongame/AssaultCube%20Version%20${PORTVERSION}
  DISTFILES=	AssaultCube_v${PORTVERSION}_source${EXTRACT_SUFX} \
 @@ -45,7 +45,6 @@
  DEDICATED_DESC=	Build dedicated server
  MASTER_DESC=	Build master server
  
 -NO_STAGE=	yes
  .include <bsd.port.options.mk>
  
  .if ${PORT_OPTIONS:MCLIENT}
 @@ -75,16 +74,16 @@
  
  do-install:
  .for f in ${ACUBE_BIN}
 -	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${PREFIX}/bin
 -	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} ${PREFIX}/libexec/${PORTNAME}_${f}
 +	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${STAGEDIR}${PREFIX}/bin
 +	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}_${f}
  .endfor
  .if !defined(NOPORTDATA)
 -	${MKDIR} ${DATADIR}
 -	cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${DATADIR}
 +	${MKDIR} ${STAGEDIR}${DATADIR}
 +	cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR}
  .endif
  .if ${PORT_OPTIONS:MDOCS}
 -	${MKDIR} ${DOCSDIR}
 -	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
 +	${MKDIR} ${STAGEDIR}${DOCSDIR}
 +	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
  .endif
  
  post-install:
 diff -ruN assaultcube.orig/files/assaultcube_client.in assaultcube/files/assaultcube_client.in
 --- assaultcube.orig/files/assaultcube_client.in	2012-07-14 17:54:48.000000000 +0400
 +++ assaultcube/files/assaultcube_client.in	2013-10-01 06:50:01.000000000 +0400
 @@ -1,25 +1,4 @@
  #!/bin/sh
  
 -# The executable needs to be run from its data directory, and needs to store
 -# configuration in it. We therefore mirror the data directory hierarchy in
 -# ~/.XXX, and create symlinks to the data files, but the configuration files
 -# are copied, and write permission for the user is added to them.
 -
 -APPNAME="assaultcube"
 -CUBE_OPTIONS="--home=${HOME}/.${APPNAME} --init"
 -
 -if [ -d ~/.$APPNAME ]
 -then
 -	echo "Using existing ~/.$APPNAME directory."
 -else
 -	echo "Creating ~/.$APPNAME directory."
 -	cd %%DATADIR%% || exit 1
 -	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
 -	find * -type f -name "*.cfg" \
 -	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
 -	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
 -	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
 -fi
 -
 -cd ~/.$APPNAME || exit 1
 -exec %%PREFIX%%/libexec/${APPNAME}_client ${CUBE_OPTIONS} "$@"
 +CUBE_OPTIONS="--home=${HOME}/.assaultcube --init"
 +cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_client ${CUBE_OPTIONS} "$@"
 diff -ruN assaultcube.orig/files/assaultcube_master.in assaultcube/files/assaultcube_master.in
 --- assaultcube.orig/files/assaultcube_master.in	2012-07-14 17:54:48.000000000 +0400
 +++ assaultcube/files/assaultcube_master.in	2013-10-01 06:40:30.000000000 +0400
 @@ -1,25 +1,4 @@
  #!/bin/sh
  
 -# The executable needs to be run from its data directory, and needs to store
 -# configuration in it. We therefore mirror the data directory hierarchy in
 -# ~/.XXX, and create symlinks to the data files, but the configuration files
 -# are copied, and write permission for the user is added to them.
 -
 -APPNAME="assaultcube"
  CUBE_OPTIONS=
 -
 -if [ -d ~/.$APPNAME ]
 -then
 -	echo "Using existing ~/.$APPNAME directory."
 -else
 -	echo "Creating ~/.$APPNAME directory."
 -	cd %%DATADIR%% || exit 1
 -	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
 -	find * -type f -name "*.cfg" \
 -	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
 -	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
 -	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
 -fi
 -
 -cd ~/.$APPNAME || exit 1
 -exec %%PREFIX%%/libexec/${APPNAME}_master ${CUBE_OPTIONS} "$@"
 +cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_master ${CUBE_OPTIONS} "$@"
 diff -ruN assaultcube.orig/files/assaultcube_server.in assaultcube/files/assaultcube_server.in
 --- assaultcube.orig/files/assaultcube_server.in	2012-07-14 17:54:48.000000000 +0400
 +++ assaultcube/files/assaultcube_server.in	2013-10-01 06:40:29.000000000 +0400
 @@ -1,25 +1,4 @@
  #!/bin/sh
  
 -# The executable needs to be run from its data directory, and needs to store
 -# configuration in it. We therefore mirror the data directory hierarchy in
 -# ~/.XXX, and create symlinks to the data files, but the configuration files
 -# are copied, and write permission for the user is added to them.
 -
 -APPNAME="assaultcube"
  CUBE_OPTIONS=
 -
 -if [ -d ~/.$APPNAME ]
 -then
 -	echo "Using existing ~/.$APPNAME directory."
 -else
 -	echo "Creating ~/.$APPNAME directory."
 -	cd %%DATADIR%% || exit 1
 -	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
 -	find * -type f -name "*.cfg" \
 -	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
 -	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
 -	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
 -fi
 -
 -cd ~/.$APPNAME || exit 1
 -exec %%PREFIX%%/libexec/${APPNAME}_server ${CUBE_OPTIONS} "$@"
 +cd %%DATADIR%% && exec %%PREFIX%%/libexec/assaultcube_server ${CUBE_OPTIONS} "$@"
 diff -ruN assaultcube.orig/files/patch-source_src_Makefile assaultcube/files/patch-source_src_Makefile
 --- assaultcube.orig/files/patch-source_src_Makefile	2012-07-14 17:54:48.000000000 +0400
 +++ assaultcube/files/patch-source_src_Makefile	2013-10-01 06:15:34.000000000 +0400
 @@ -16,10 +16,10 @@
   USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi)
   override CXXFLAGS+= -rdynamic
  -CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include
 -+CLIENT_INCLUDES= $(INCLUDES) `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -idirafter ../include
 ++CLIENT_INCLUDES= $(INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags` -idirafter ../include
   # -lSDL_ttf 
  -CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile
 -+CLIENT_LIBS= -L../enet/.libs -lenet `${SDL_CONFIG} --libs` -L${LOCALBASE}/lib -lSDL_image -lz -lGL -lopenal -lvorbisfile -lintl
 ++CLIENT_LIBS= -L../enet/.libs -lenet -L${LOCALBASE}/lib -lX11 `${SDL_CONFIG} --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lintl
   endif
   
   CLIENT_OBJS= \
 diff -ruN assaultcube.orig/files/patch-source_src_console.h assaultcube/files/patch-source_src_console.h
 --- assaultcube.orig/files/patch-source_src_console.h	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_console.h	2013-10-01 08:15:54.000000000 +0400
 @@ -0,0 +1,17 @@
 +--- source/src/console.h.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/console.h	2013-10-01 08:15:27.000000000 +0400
 +@@ -127,7 +127,7 @@
 +     }
 + };
 + 
 +-/** WIP ALERT */
 ++/** WIP ALERT *//*
 + struct textinputbuffer_wip
 + {
 +     string buf;
 +@@ -257,4 +257,4 @@
 +         return false;
 +     }
 + };
 +-
 ++*/
 diff -ruN assaultcube.orig/files/patch-source_src_master.cpp assaultcube/files/patch-source_src_master.cpp
 --- assaultcube.orig/files/patch-source_src_master.cpp	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_master.cpp	2013-10-01 08:05:05.000000000 +0400
 @@ -0,0 +1,11 @@
 +--- source/src/master.cpp.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/master.cpp	2013-10-01 08:04:23.000000000 +0400
 +@@ -509,7 +509,7 @@
 +     authreq &a = c.authreqs.add();
 +     a.reqtime = servtime;
 +     a.id = id;
 +-    uint seed[3] = { starttime, servtime, randomMT() };
 ++    uint seed[3] = { (uint)starttime, servtime, randomMT() };
 +     static vector<char> buf;
 +     buf.setsize(0);
 +     a.answer = genchallenge(u->pubkey, seed, sizeof(seed), buf);
 diff -ruN assaultcube.orig/files/patch-source_src_modelcache.h assaultcube/files/patch-source_src_modelcache.h
 --- assaultcube.orig/files/patch-source_src_modelcache.h	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_modelcache.h	2013-10-01 07:09:46.000000000 +0400
 @@ -0,0 +1,13 @@
 +--- source/src/modelcache.h.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/modelcache.h	2013-10-01 07:08:22.000000000 +0400
 +@@ -31,8 +31,8 @@
 + 
 +     void unlink()
 +     {
 +-        prev->entry::next = next;
 +-        next->entry::prev = prev;
 ++        prev->modelcacheentry<T>::next = next;
 ++        next->modelcacheentry<T>::prev = prev;
 +         prev = next = (T *)this;
 +     }
 + 
 diff -ruN assaultcube.orig/files/patch-source_src_server.cpp assaultcube/files/patch-source_src_server.cpp
 --- assaultcube.orig/files/patch-source_src_server.cpp	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_server.cpp	2013-10-01 07:52:17.000000000 +0400
 @@ -0,0 +1,11 @@
 +--- source/src/server.cpp.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/server.cpp	2013-10-01 07:51:55.000000000 +0400
 +@@ -3928,7 +3928,7 @@
 + 
 +     if((isdedicated = dedicated))
 +     {
 +-        ENetAddress address = { ENET_HOST_ANY, scl.serverport };
 ++        ENetAddress address = { ENET_HOST_ANY, (enet_uint16)scl.serverport };
 +         if(scl.ip[0] && enet_address_set_host(&address, scl.ip)<0) logline(ACLOG_WARNING, "server ip not resolved!");
 +         serverhost = enet_host_create(&address, scl.maxclients+1, 3, 0, scl.uprate);
 +         if(!serverhost) fatal("could not create server host");
 diff -ruN assaultcube.orig/files/patch-source_src_serverms.cpp assaultcube/files/patch-source_src_serverms.cpp
 --- assaultcube.orig/files/patch-source_src_serverms.cpp	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_serverms.cpp	2013-10-01 07:23:41.000000000 +0400
 @@ -0,0 +1,11 @@
 +--- source/src/serverms.cpp.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/serverms.cpp	2013-10-01 07:22:14.000000000 +0400
 +@@ -334,7 +334,7 @@
 + 
 + 	if(listen)
 + 	{
 +-        ENetAddress address = { ENET_HOST_ANY, infoport };
 ++        ENetAddress address = { ENET_HOST_ANY, (enet_uint16)infoport };
 +         if(*ip)
 +         {
 +             if(enet_address_set_host(&address, ip)<0) logline(ACLOG_WARNING, "server ip not resolved");
 diff -ruN assaultcube.orig/files/patch-source_src_stream.cpp assaultcube/files/patch-source_src_stream.cpp
 --- assaultcube.orig/files/patch-source_src_stream.cpp	1970-01-01 03:00:00.000000000 +0300
 +++ assaultcube/files/patch-source_src_stream.cpp	2013-10-01 07:56:40.000000000 +0400
 @@ -0,0 +1,13 @@
 +--- source/src/stream.cpp.orig	2010-11-14 21:46:24.000000000 +0300
 ++++ source/src/stream.cpp	2013-10-01 07:56:16.000000000 +0400
 +@@ -593,8 +593,8 @@
 +         }
 +         uchar trailer[8] =
 +         {
 +-            crc&0xFF, (crc>>8)&0xFF, (crc>>16)&0xFF, (crc>>24)&0xFF,
 +-            zfile.total_in&0xFF, (zfile.total_in>>8)&0xFF, (zfile.total_in>>16)&0xFF, (zfile.total_in>>24)&0xFF
 ++            uchar(crc&0xFF), uchar((crc>>8)&0xFF), uchar((crc>>16)&0xFF), uchar((crc>>24)&0xFF),
 ++            uchar(zfile.total_in&0xFF), uchar((zfile.total_in>>8)&0xFF), uchar((zfile.total_in>>16)&0xFF), uchar((zfile.total_in>>24)&0xFF)
 +         };
 +         file->write(trailer, sizeof(trailer));
 +     }
 
 --------------060707050503010404060704--

From: Sender Ghost <lightside@gmx.com>
To: bug-followup@FreeBSD.org
Cc: linimon@FreeBSD.org
Subject: Re: ports/182534: [MAINTAINER] games/assaultcube: Build with newer
 GCC and Clang compilers (for v1.1.0.4)
Date: Fri, 11 Oct 2013 03:39:34 +0400

 Replaced by newer 1.2.0.0 version from ports/182889 and could be closed.
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Fri Oct 11 02:12:24 UTC 2013 
State-Changed-Why:  
see ports/182889. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=182534 
>Unformatted:
