Date: Tue, 30 Nov 2010 06:44:04 GMT From: Sender Ghost <lightside@safebox.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/152697: [PATCH] games/assaultcube: Update from 1.0.2 to 1.1.0.4 Message-ID: <201011300644.oAU6i4na011965@red.freebsd.org> Resent-Message-ID: <201011300650.oAU6oAee093269@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152697 >Category: ports >Synopsis: [PATCH] games/assaultcube: Update from 1.0.2 to 1.1.0.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Nov 30 06:50:10 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Sender Ghost >Release: FreeBSD 8.1-RELEASE amd64 >Organization: >Environment: >Description: Patch to update games/assaultcube port from 1.0.2 to 1.1.0.4 version. The pkg-plist dynamically generated for specified (PORTDATA) directories and installed binary files. Look following link for changes: http://assault.cubers.net/docs/history.html >How-To-Repeat: >Fix: Use attached diff from /usr/ports/games directory and delete assaultcube/pkg-plist file. Patch attached with submission follows: diff -ruN assaultcube.orig/Makefile assaultcube/Makefile --- assaultcube.orig/Makefile 2010-03-28 13:34:35.000000000 +0700 +++ assaultcube/Makefile 2010-11-30 07:46:01.000000000 +0600 @@ -6,11 +6,11 @@ # PORTNAME= assaultcube -PORTVERSION= 1.0.2 -PORTREVISION= 5 +PORTVERSION= 1.1.0.4 CATEGORIES= games -MASTER_SITES= SF/actiongame/AssaultCube/1.0 -DISTNAME= AssaultCube_v${PORTVERSION} +MASTER_SITES= SF/actiongame/AssaultCube%20Version%20${PORTVERSION} +DISTFILES= AssaultCube_v${PORTVERSION}_source${EXTRACT_SUFX} \ + AssaultCube_v${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= ports@FreeBSD.org COMMENT= Total conversion of the FPS game called Cube @@ -20,39 +20,46 @@ USE_GMAKE= yes GNU_CONFIGURE= yes ALL_TARGET= libenet +WRKSRC= ${WRKDIR}/${PORTVERSION} +CONFIGURE_ARGS= --enable-shared=no --enable-static=yes CONFIGURE_WRKSRC= ${WRKSRC}/source/enet BUILD_WRKSRC= ${WRKSRC}/source/src +MAKE_JOBS_SAFE= yes + +PORTDATA= config demos packages +PORTDOCS= * CFLAGS+= -DFREEBSD OPTIONS= CLIENT "Build client" on \ DEDICATED "Build dedicated server" on \ + MASTER "Build master server" off \ OPTIMIZED_CFLAGS "Enable compilation optimizations" on .include <bsd.port.pre.mk> -.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) -IGNORE= needs at least one executable (CLIENT and DEDICATED) +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && defined(WITHOUT_MASTER) +IGNORE= needs at least one executable (CLIENT, DEDICATED or MASTER) .endif .if !defined(WITHOUT_CLIENT) USE_GL= yes USE_SDL= image mixer sdl ALL_TARGET+= client -PLIST_SUB+= CLIENT="" SUB_FILES+= ${PORTNAME}_client ACUBE_BIN+= client -.else -PLIST_SUB+= CLIENT="@comment " .endif .if !defined(WITHOUT_DEDICATED) ALL_TARGET+= server -PLIST_SUB+= DEDICATED="" SUB_FILES+= ${PORTNAME}_server ACUBE_BIN+= server -.else -PLIST_SUB+= DEDICATED="@comment " +.endif + +.if !defined(WITHOUT_MASTER) +ALL_TARGET+= master +SUB_FILES+= ${PORTNAME}_master +ACUBE_BIN+= master .endif .if defined(WITHOUT_OPTIMIZED_CFLAGS) @@ -63,21 +70,21 @@ do-install: .for f in ${ACUBE_BIN} ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${PREFIX}/bin + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} ${PREFIX}/libexec/${PORTNAME}_${f} .endfor -.for f in ${ACUBE_BIN} - ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} \ - ${PREFIX}/libexec/${PORTNAME}_${f} -.endfor +.if !defined(NOPORTDATA) ${MKDIR} ${DATADIR} - cd ${WRKSRC} && ${CP} -r bot config packages ${DATADIR} - @${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE} - @${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE} + cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${DATADIR} +.endif .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} - ${CP} -R ${WRKSRC}/docs/* ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR} - @${FIND} ${DOCSDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE} - @${FIND} ${DOCSDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE} + cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR} .endif +post-install: +.for f in ${ACUBE_BIN} + @${ECHO_CMD} bin/${PORTNAME}_${f} >> ${TMPPLIST} + @${ECHO_CMD} libexec/${PORTNAME}_${f} >> ${TMPPLIST} +.endfor + .include <bsd.port.post.mk> diff -ruN assaultcube.orig/distinfo assaultcube/distinfo --- assaultcube.orig/distinfo 2009-02-11 03:31:06.000000000 +0600 +++ assaultcube/distinfo 2010-11-30 09:48:28.000000000 +0600 @@ -1,3 +1,4 @@ -MD5 (AssaultCube_v1.0.2.tar.bz2) = e083182699e65c240d8c7fa051644e6f -SHA256 (AssaultCube_v1.0.2.tar.bz2) = d4de1b1154c8aceccc0e961b751d01fd506f359472a648b88c639f99eb18c795 -SIZE (AssaultCube_v1.0.2.tar.bz2) = 42673504 +SHA256 (AssaultCube_v1.1.0.4.tar.bz2) = fea2056aa7262617b96b06ea0b85422bcec54d88cd88689c2c73ade3bd0ba029 +SIZE (AssaultCube_v1.1.0.4.tar.bz2) = 47051151 +SHA256 (AssaultCube_v1.1.0.4_source.tar.bz2) = 045925610c54b2764a79286aeb1942df2cc5ce52b710c26b447eea69fa6b1129 +SIZE (AssaultCube_v1.1.0.4_source.tar.bz2) = 2560572 diff -ruN assaultcube.orig/files/assaultcube_client.in assaultcube/files/assaultcube_client.in --- assaultcube.orig/files/assaultcube_client.in 2007-10-21 09:00:57.000000000 +0700 +++ assaultcube/files/assaultcube_client.in 2010-11-30 08:01:39.000000000 +0600 @@ -6,6 +6,7 @@ # are copied, and write permission for the user is added to them. APPNAME="assaultcube" +CUBE_OPTIONS="--home=~/.${APPNAME} --init" if [ -d ~/.$APPNAME ] then @@ -21,4 +22,4 @@ fi cd ~/.$APPNAME || exit 1 -exec %%PREFIX%%/libexec/${APPNAME}_client "$@" +exec %%PREFIX%%/libexec/${APPNAME}_client ${CUBE_OPTIONS} "$@" diff -ruN assaultcube.orig/files/assaultcube_master.in assaultcube/files/assaultcube_master.in --- assaultcube.orig/files/assaultcube_master.in 1970-01-01 06:00:00.000000000 +0600 +++ assaultcube/files/assaultcube_master.in 2010-11-30 08:02:15.000000000 +0600 @@ -0,0 +1,25 @@ +#!/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} "$@" diff -ruN assaultcube.orig/files/assaultcube_server.in assaultcube/files/assaultcube_server.in --- assaultcube.orig/files/assaultcube_server.in 2007-10-21 09:00:57.000000000 +0700 +++ assaultcube/files/assaultcube_server.in 2010-11-30 08:02:48.000000000 +0600 @@ -6,6 +6,7 @@ # are copied, and write permission for the user is added to them. APPNAME="assaultcube" +CUBE_OPTIONS= if [ -d ~/.$APPNAME ] then @@ -21,4 +22,4 @@ fi cd ~/.$APPNAME || exit 1 -exec %%PREFIX%%/libexec/${APPNAME}_server "$@" +exec %%PREFIX%%/libexec/${APPNAME}_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 1970-01-01 06:00:00.000000000 +0600 +++ assaultcube/files/patch-source_src_Makefile 2010-11-30 09:35:05.000000000 +0600 @@ -0,0 +1,36 @@ +--- source/src/Makefile.orig 2010-11-15 00:46:24.000000000 +0600 ++++ source/src/Makefile 2010-11-30 07:29:06.000000000 +0600 +@@ -1,9 +1,8 @@ + //CXX=g++-gcc-4.2.3 +-CXXFLAGS= -O3 -fomit-frame-pointer + override CXXFLAGS+= -Wall -fsigned-char + + PLATFORM= $(shell uname -s) +-PLATFORM_PREFIX=native ++PLATFORM_PREFIX= FreeBSD + + INCLUDES= -I. -Ibot -I../enet/include + +@@ -24,9 +23,9 @@ + else + 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 + # -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 + endif + + CLIENT_OBJS= \ +@@ -92,8 +91,8 @@ + SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include + SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm + else +-SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) +-SERVER_LIBS= -L../enet/.libs -lenet -lz ++SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I${LOCALBASE}/include ++SERVER_LIBS= -L../enet/.libs -lenet -lz -L${LOCALBASE}/lib + endif + + SERVER_OBJS= \ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011300644.oAU6i4na011965>