View | Details | Raw Unified | Return to bug 152697
Collapse All | Expand All

(-)assaultcube/Makefile (-23 / +30 lines)
Lines 6-16 Link Here
6
#
6
#
7
7
8
PORTNAME=	assaultcube
8
PORTNAME=	assaultcube
9
PORTVERSION=	1.0.2
9
PORTVERSION=	1.1.0.4
10
PORTREVISION=	5
11
CATEGORIES=	games
10
CATEGORIES=	games
12
MASTER_SITES=	SF/actiongame/AssaultCube/1.0
11
MASTER_SITES=	SF/actiongame/AssaultCube%20Version%20${PORTVERSION}
13
DISTNAME=	AssaultCube_v${PORTVERSION}
12
DISTFILES=	AssaultCube_v${PORTVERSION}_source${EXTRACT_SUFX} \
13
		AssaultCube_v${PORTVERSION}${EXTRACT_SUFX}
14
14
15
MAINTAINER=	ports@FreeBSD.org
15
MAINTAINER=	ports@FreeBSD.org
16
COMMENT=	Total conversion of the FPS game called Cube
16
COMMENT=	Total conversion of the FPS game called Cube
Lines 20-58 Link Here
20
USE_GMAKE=	yes
20
USE_GMAKE=	yes
21
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
22
ALL_TARGET=	libenet
22
ALL_TARGET=	libenet
23
WRKSRC=		${WRKDIR}/${PORTVERSION}
24
CONFIGURE_ARGS=	--enable-shared=no --enable-static=yes
23
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
25
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
24
BUILD_WRKSRC=	${WRKSRC}/source/src
26
BUILD_WRKSRC=	${WRKSRC}/source/src
27
MAKE_JOBS_SAFE=	yes
28
29
PORTDATA=	config demos packages
30
PORTDOCS=	*
25
31
26
CFLAGS+=	-DFREEBSD
32
CFLAGS+=	-DFREEBSD
27
33
28
OPTIONS=	CLIENT "Build client" on \
34
OPTIONS=	CLIENT "Build client" on \
29
		DEDICATED "Build dedicated server" on \
35
		DEDICATED "Build dedicated server" on \
36
		MASTER "Build master server" off \
30
		OPTIMIZED_CFLAGS "Enable compilation optimizations" on
37
		OPTIMIZED_CFLAGS "Enable compilation optimizations" on
31
38
32
.include <bsd.port.pre.mk>
39
.include <bsd.port.pre.mk>
33
40
34
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED)
41
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) && defined(WITHOUT_MASTER)
35
IGNORE=		needs at least one executable (CLIENT and DEDICATED)
42
IGNORE=		needs at least one executable (CLIENT, DEDICATED or MASTER)
36
.endif
43
.endif
37
44
38
.if !defined(WITHOUT_CLIENT)
45
.if !defined(WITHOUT_CLIENT)
39
USE_GL=		yes
46
USE_GL=		yes
40
USE_SDL=	image mixer sdl
47
USE_SDL=	image mixer sdl
41
ALL_TARGET+=	client
48
ALL_TARGET+=	client
42
PLIST_SUB+=	CLIENT=""
43
SUB_FILES+=	${PORTNAME}_client
49
SUB_FILES+=	${PORTNAME}_client
44
ACUBE_BIN+=	client
50
ACUBE_BIN+=	client
45
.else
46
PLIST_SUB+=	CLIENT="@comment "
47
.endif
51
.endif
48
52
49
.if !defined(WITHOUT_DEDICATED)
53
.if !defined(WITHOUT_DEDICATED)
50
ALL_TARGET+=	server
54
ALL_TARGET+=	server
51
PLIST_SUB+=	DEDICATED=""
52
SUB_FILES+=	${PORTNAME}_server
55
SUB_FILES+=	${PORTNAME}_server
53
ACUBE_BIN+=	server
56
ACUBE_BIN+=	server
54
.else
57
.endif
55
PLIST_SUB+=	DEDICATED="@comment "
58
59
.if !defined(WITHOUT_MASTER)
60
ALL_TARGET+=	master
61
SUB_FILES+=	${PORTNAME}_master
62
ACUBE_BIN+=	master
56
.endif
63
.endif
57
64
58
.if defined(WITHOUT_OPTIMIZED_CFLAGS)
65
.if defined(WITHOUT_OPTIMIZED_CFLAGS)
Lines 63-83 Link Here
63
do-install:
70
do-install:
64
.for f in ${ACUBE_BIN}
71
.for f in ${ACUBE_BIN}
65
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${PREFIX}/bin
72
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${PREFIX}/bin
73
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} ${PREFIX}/libexec/${PORTNAME}_${f}
66
.endfor
74
.endfor
67
.for f in ${ACUBE_BIN}
75
.if !defined(NOPORTDATA)
68
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} \
69
		${PREFIX}/libexec/${PORTNAME}_${f}
70
.endfor
71
	${MKDIR} ${DATADIR}
76
	${MKDIR} ${DATADIR}
72
	cd ${WRKSRC} && ${CP} -r bot config packages ${DATADIR}
77
	cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${DATADIR}
73
	@${FIND} ${DATADIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE}
78
.endif
74
	@${FIND} ${DATADIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
75
.if !defined(NOPORTDOCS)
79
.if !defined(NOPORTDOCS)
76
	${MKDIR} ${DOCSDIR}
80
	${MKDIR} ${DOCSDIR}
77
	${CP} -R ${WRKSRC}/docs/* ${DOCSDIR}
81
	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
78
	${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR}
79
	@${FIND} ${DOCSDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} ${BINMODE}
80
	@${FIND} ${DOCSDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${SHAREMODE}
81
.endif
82
.endif
82
83
84
post-install:
85
.for f in ${ACUBE_BIN}
86
	@${ECHO_CMD} bin/${PORTNAME}_${f} >> ${TMPPLIST}
87
	@${ECHO_CMD} libexec/${PORTNAME}_${f} >> ${TMPPLIST}
88
.endfor
89
83
.include <bsd.port.post.mk>
90
.include <bsd.port.post.mk>
(-)assaultcube/distinfo (-3 / +4 lines)
Lines 1-3 Link Here
1
MD5 (AssaultCube_v1.0.2.tar.bz2) = e083182699e65c240d8c7fa051644e6f
1
SHA256 (AssaultCube_v1.1.0.4.tar.bz2) = fea2056aa7262617b96b06ea0b85422bcec54d88cd88689c2c73ade3bd0ba029
2
SHA256 (AssaultCube_v1.0.2.tar.bz2) = d4de1b1154c8aceccc0e961b751d01fd506f359472a648b88c639f99eb18c795
2
SIZE (AssaultCube_v1.1.0.4.tar.bz2) = 47051151
3
SIZE (AssaultCube_v1.0.2.tar.bz2) = 42673504
3
SHA256 (AssaultCube_v1.1.0.4_source.tar.bz2) = 045925610c54b2764a79286aeb1942df2cc5ce52b710c26b447eea69fa6b1129
4
SIZE (AssaultCube_v1.1.0.4_source.tar.bz2) = 2560572
(-)assaultcube/files/assaultcube_client.in (-1 / +2 lines)
Lines 6-11 Link Here
6
# are copied, and write permission for the user is added to them.
6
# are copied, and write permission for the user is added to them.
7
7
8
APPNAME="assaultcube"
8
APPNAME="assaultcube"
9
CUBE_OPTIONS="--home=~/.${APPNAME} --init"
9
10
10
if [ -d ~/.$APPNAME ]
11
if [ -d ~/.$APPNAME ]
11
then
12
then
Lines 21-24 Link Here
21
fi
22
fi
22
23
23
cd ~/.$APPNAME || exit 1
24
cd ~/.$APPNAME || exit 1
24
exec %%PREFIX%%/libexec/${APPNAME}_client "$@"
25
exec %%PREFIX%%/libexec/${APPNAME}_client ${CUBE_OPTIONS} "$@"
(-)assaultcube/files/assaultcube_master.in (+25 lines)
Line 0 Link Here
1
#!/bin/sh
2
3
# The executable needs to be run from its data directory, and needs to store
4
# configuration in it. We therefore mirror the data directory hierarchy in
5
# ~/.XXX, and create symlinks to the data files, but the configuration files
6
# are copied, and write permission for the user is added to them.
7
8
APPNAME="assaultcube"
9
CUBE_OPTIONS=
10
11
if [ -d ~/.$APPNAME ]
12
then
13
	echo "Using existing ~/.$APPNAME directory."
14
else
15
	echo "Creating ~/.$APPNAME directory."
16
	cd %%DATADIR%% || exit 1
17
	find * -type d -exec mkdir -p ~/.$APPNAME/{} \;
18
	find * -type f -name "*.cfg" \
19
	    -exec cp %%DATADIR%%/{} ~/.$APPNAME/{} \; \
20
	    -exec chmod u+w ~/.$APPNAME/{} \; 2>/dev/null
21
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.$APPNAME/{} \; 2>/dev/null
22
fi
23
24
cd ~/.$APPNAME || exit 1
25
exec %%PREFIX%%/libexec/${APPNAME}_master ${CUBE_OPTIONS} "$@"
(-)assaultcube/files/assaultcube_server.in (-1 / +2 lines)
Lines 6-11 Link Here
6
# are copied, and write permission for the user is added to them.
6
# are copied, and write permission for the user is added to them.
7
7
8
APPNAME="assaultcube"
8
APPNAME="assaultcube"
9
CUBE_OPTIONS=
9
10
10
if [ -d ~/.$APPNAME ]
11
if [ -d ~/.$APPNAME ]
11
then
12
then
Lines 21-24 Link Here
21
fi
22
fi
22
23
23
cd ~/.$APPNAME || exit 1
24
cd ~/.$APPNAME || exit 1
24
exec %%PREFIX%%/libexec/${APPNAME}_server "$@"
25
exec %%PREFIX%%/libexec/${APPNAME}_server ${CUBE_OPTIONS} "$@"
(-)assaultcube/files/patch-source_src_Makefile (+36 lines)
Line 0 Link Here
1
--- source/src/Makefile.orig	2010-11-15 00:46:24.000000000 +0600
2
+++ source/src/Makefile	2010-11-30 07:29:06.000000000 +0600
3
@@ -1,9 +1,8 @@
4
 //CXX=g++-gcc-4.2.3
5
-CXXFLAGS= -O3 -fomit-frame-pointer
6
 override CXXFLAGS+= -Wall -fsigned-char
7
 
8
 PLATFORM= $(shell uname -s)
9
-PLATFORM_PREFIX=native
10
+PLATFORM_PREFIX= FreeBSD
11
 
12
 INCLUDES= -I. -Ibot -I../enet/include
13
 
14
@@ -24,9 +23,9 @@
15
 else
16
 USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi)
17
 override CXXFLAGS+= -rdynamic
18
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include
19
+CLIENT_INCLUDES= $(INCLUDES) `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -idirafter ../include
20
 # -lSDL_ttf 
21
-CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile
22
+CLIENT_LIBS= -L../enet/.libs -lenet `${SDL_CONFIG} --libs` -L${LOCALBASE}/lib -lSDL_image -lz -lGL -lopenal -lvorbisfile -lintl
23
 endif
24
 
25
 CLIENT_OBJS= \
26
@@ -92,8 +91,8 @@
27
 SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include
28
 SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm
29
 else
30
-SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
31
-SERVER_LIBS= -L../enet/.libs -lenet -lz
32
+SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I${LOCALBASE}/include
33
+SERVER_LIBS= -L../enet/.libs -lenet -lz -L${LOCALBASE}/lib
34
 endif
35
 
36
 SERVER_OBJS= \

Return to bug 152697