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

(-)sauerbraten/Makefile (-21 / +45 lines)
Lines 9-64 Link Here
9
PORTVERSION=	20060611
9
PORTVERSION=	20060611
10
CATEGORIES=	games
10
CATEGORIES=	games
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
11
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
12
MASTER_SITE_SUBDIR=	sauerbraten
12
MASTER_SITE_SUBDIR=	${PORTNAME}
13
DISTNAME=	${PORTNAME}_2006_06_11_sp_edition_linux
13
DISTNAME=	${PORTNAME}_2006_06_11_sp_edition_linux
14
14
15
MAINTAINER=	acm@FreeBSD.org
15
MAINTAINER=	acm@FreeBSD.org
16
COMMENT=	First person shooter based on Cube
16
COMMENT=	First person shooter based on Cube
17
17
18
USE_GL=		yes
18
USE_GCC=	3.2+
19
USE_SDL=	sdl image mixer
20
USE_GMAKE=	yes
19
USE_GMAKE=	yes
21
USE_AUTOTOOLS=	autoconf:259 aclocal:19 automake:19
22
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
23
AUTOMAKE_ARGS=	-a -c --foreign --add-missing
21
CONFIGURE_ENV=	ACLOCAL=true AUTOCONF=true AUTOMAKE=true
24
CONFIGURE_WRKSRC=	${WRKSRC}/src/enet
22
CONFIGURE_WRKSRC=	${WRKSRC}/src/enet
25
BUILD_WRKSRC=	${WRKSRC}/src
23
BUILD_WRKSRC=	${WRKSRC}/src
26
WRKSRC=	${WRKDIR}/${PORTNAME}
24
WRKSRC=		${WRKDIR}/${PORTNAME}
27
SAUDATDIR=	packages data
25
ALL_TARGET=	libenet
26
27
OPTIONS=	CLIENT "Build client" on \
28
		DEDICATED "Build dedicated server" on
29
28
SUB_FILES=	sauer_client sauer_server pkg-message
30
SUB_FILES=	sauer_client sauer_server pkg-message
29
31
32
SAUDATDIR=	packages data
33
30
.include <bsd.port.pre.mk>
34
.include <bsd.port.pre.mk>
31
35
32
.if ${OSVERSION} < 500000
36
.if !defined(WITH_CLIENT) && !defined(WITH_DEDICATED)
33
BROKEN=		Does not build on 4.x
37
IGNORE=		needs at least one executable (CLIENT and DEDICATED)
34
.elif ${OSVERSION} > 700016
38
.endif
35
BROKEN=		Does not build on CURRENT
39
40
.if defined(WITH_CLIENT)
41
USE_GL=		yes
42
USE_SDL=	image mixer sdl
43
ALL_TARGET+=	client
44
PLIST_SUB+=	CLIENT=""
45
SAUER_BIN+=	client
46
.else
47
PLIST_SUB+=	CLIENT=""
48
.endif
49
50
.if defined(WITH_DEDICATED)
51
ALL_TARGET+=	server
52
PLIST_SUB+=	DEDICATED=""
53
SAUER_BIN+=	server
54
.else
55
PLIST_SUB+=	DEDICATED=""
36
.endif
56
.endif
37
57
38
post-extract:
58
post-extract:
39
	@${FIND} ${WRKSRC} -type d -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R
59
	@${FIND} ${WRKSRC} -type d -name CVS -type d -print0 | \
60
		${XARGS} -0 ${RM} -R
40
61
41
post-patch:
62
post-patch:
42
	@${REINPLACE_CMD} -e 's|%%CXX%%|${CXX}|g ; \
63
	@${REINPLACE_CMD} -Ee '/^#define (HAS_GETHOSTBY(NAME|ADDR)_R) 1/d' \
43
		s|%%CXXFLAGS%%|${CXXFLAGS}|g ; s|%%X11BASE%%|${X11BASE}|g' \
64
		${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
44
			${WRKSRC}/src/Makefile
45
65
46
do-install:
66
do-install:
47
	@${INSTALL_SCRIPT} ${WRKDIR}/sauer_client ${WRKDIR}/sauer_server ${PREFIX}/bin
67
.for f in ${SAUER_BIN}
48
	@${INSTALL_PROGRAM} ${BUILD_WRKSRC}/sauer_client ${BUILD_WRKSRC}/sauer_server ${PREFIX}/libexec
68
	${INSTALL_SCRIPT} ${WRKDIR}/sauer_${f} ${PREFIX}/bin
49
	@${MKDIR} ${DATADIR}
69
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/sauer_${f} ${PREFIX}/libexec
50
	@cd ${WRKSRC} && \
70
.endfor
71
	${MKDIR} ${DATADIR}
72
	cd ${WRKSRC} && \
51
		${FIND} -E ${SAUDATDIR} -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
73
		${FIND} -E ${SAUDATDIR} -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
52
		${FIND} -E ${SAUDATDIR} -type f -iregex ".*\.(png|cfg|cgz|jpg|ogg|ogz|txt|md2|md3|ms3d|qc|wav)" \
74
		${FIND} -E ${SAUDATDIR} -type f -iregex ".*\.(png|cfg|cgz|jpg|ogg|ogz|txt|md2|md3|ms3d|qc|wav)" \
53
			-exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
75
			-exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
54
.if !defined(NOPORTDOCS)
76
.if !defined(NOPORTDOCS)
55
	@${MKDIR} ${DOCSDIR}
77
	${MKDIR} ${DOCSDIR}
56
	@cd ${WRKSRC}/docs && \
78
	cd ${WRKSRC}/docs && \
57
		${FIND} -E * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
79
		${FIND} -E * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
58
		${FIND} -E * -type f -iregex ".*\.(html|css|jpg)" -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
80
		${FIND} -E * -type f -iregex ".*\.(html|css|jpg)" -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
59
.endif
81
.endif
60
82
61
post-install:
83
post-install:
84
	@${ECHO_CMD}
62
	@${CAT} ${PKGMESSAGE}
85
	@${CAT} ${PKGMESSAGE}
86
	@${ECHO_CMD}
63
87
64
.include <bsd.port.post.mk>
88
.include <bsd.port.post.mk>
(-)sauerbraten/pkg-plist (-4 / +4 lines)
Lines 1-7 Link Here
1
bin/sauer_client
1
%%CLIENT%%bin/sauer_client
2
bin/sauer_server
2
%%DEDICATED%%bin/sauer_server
3
libexec/sauer_client
3
%%CLIENT%%libexec/sauer_client
4
libexec/sauer_server
4
%%DEDICATED%%libexec/sauer_server
5
%%PORTDOCS%%%%DOCSDIR%%/config.html
5
%%PORTDOCS%%%%DOCSDIR%%/config.html
6
%%PORTDOCS%%%%DOCSDIR%%/dev/sauer_maps_in_max.jpg
6
%%PORTDOCS%%%%DOCSDIR%%/dev/sauer_maps_in_max.jpg
7
%%PORTDOCS%%%%DOCSDIR%%/dev/sauerchild.JPG
7
%%PORTDOCS%%%%DOCSDIR%%/dev/sauerchild.JPG
(-)sauerbraten/files/patch-src_Makefile (-30 lines)
Removed Link Here
1
--- src/Makefile	Tue Jun  6 15:25:26 2006
2
+++ src/Makefile	Wed Jun 14 01:19:40 2006
3
@@ -1,9 +1,8 @@
4
-CXX=g++
5
-CXXOPTFLAGS=-Wall -fsigned-char -O3 -fomit-frame-pointer
6
-CXXFLAGS=$(CXXOPTFLAGS) -Ienet/include -I. -Ishared -Iengine -Ifpsgame `sdl-config --cflags`
7
+CXX=%%CXX%%
8
+CXXFLAGS=%%CXXFLAGS%% -I%%X11BASE%%/include -Ienet/include -I. -Ishared -Iengine -Ifpsgame `sdl11-config --cflags` -DHAS_SOCKLEN_T
9
 
10
-PLATFORM_PREFIX=linux
11
-CLIENT_LIBS=-Lenet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU 
12
+PLATFORM_PREFIX=FreeBSD
13
+CLIENT_LIBS=-L%%X11BASE%%/lib -Lenet -lenet `sdl11-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU 
14
 CLIENT_OBJS= \
15
 	shared/tools.o \
16
 	engine/client.o \
17
@@ -46,11 +45,11 @@
18
 	cd enet; ./configure
19
 	
20
 libenet: enet/Makefile
21
-	-make -C enet/ all
22
+	-gmake -C enet/ all
23
 
24
 clean: enet/Makefile
25
 	-rm -f $(SERVER_OBJS) $(CLIENT_OBJS) sauer_server sauer_client
26
-	-make -C enet/ clean
27
+	-gmake -C enet/ clean
28
 
29
 engine/server-standalone.o:
30
 	$(CXX) $(CXXFLAGS) -DSTANDALONE -c -o engine/server-standalone.o engine/server.cpp
(-)sauerbraten/files/patch-src__Makefile (+30 lines)
Added Link Here
1
--- ./src/Makefile.orig	Tue Jun  6 17:25:26 2006
2
+++ ./src/Makefile	Sun Jul 30 15:23:58 2006
3
@@ -1,9 +1,9 @@
4
-CXX=g++
5
+CXX?=g++
6
 CXXOPTFLAGS=-Wall -fsigned-char -O3 -fomit-frame-pointer
7
-CXXFLAGS=$(CXXOPTFLAGS) -Ienet/include -I. -Ishared -Iengine -Ifpsgame `sdl-config --cflags`
8
+CXXFLAGS+=$(CXXOPTFLAGS) -Ienet/include -I. -Ishared -Iengine -Ifpsgame `$(SDL_CONFIG) --cflags` -I$(X11BASE)/include
9
 
10
-PLATFORM_PREFIX=linux
11
-CLIENT_LIBS=-Lenet -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL -lGLU 
12
+PLATFORM_PREFIX=FreeBSD
13
+CLIENT_LIBS=-Lenet -lenet `$(SDL_CONFIG) --libs` -lSDL_image -lSDL_mixer -lz -L$(X11BASE)/lib -lGL -lGLU
14
 CLIENT_OBJS= \
15
 	shared/tools.o \
16
 	engine/client.o \
17
@@ -46,11 +46,11 @@
18
 	cd enet; ./configure
19
 	
20
 libenet: enet/Makefile
21
-	-make -C enet/ all
22
+	-$(MAKE) -C enet/ all
23
 
24
 clean: enet/Makefile
25
 	-rm -f $(SERVER_OBJS) $(CLIENT_OBJS) sauer_server sauer_client
26
-	-make -C enet/ clean
27
+	-$(MAKE) -C enet/ clean
28
 
29
 engine/server-standalone.o:
30
 	$(CXX) $(CXXFLAGS) -DSTANDALONE -c -o engine/server-standalone.o engine/server.cpp
(-)sauerbraten/files/pkg-message.in (-4 / +4 lines)
Lines 1-9 Link Here
1
###############################################################################
1
###############################################################################
2
2
3
1) First time, sauerbraten create ~/.sauerbraten directory and symlinks
3
1) First time, sauerbraten creates a ~/.sauerbraten directory with symlinks.
4
2) Config files are into ~/.sauerbraten directory.
4
2) Config files are in the ~/.sauerbraten directory.
5
3) See %%DATADIR%%/data/keymap.cfg, if you want add new bind into 
5
3) If you want add new bindings into ~/.sauerbraten/config.cfg, see
6
   ~/.sauerbraten/config.cfg
6
   %%DATADIR%%/data/keymap.cfg.
7
4) Enjoy it ;)
7
4) Enjoy it ;)
8
8
9
###############################################################################
9
###############################################################################
(-)sauerbraten/files/sauer_client.in (-7 / +9 lines)
Lines 4-16 Link Here
4
# configuration in it. We therefore mirror the data directory hierarchy in
4
# configuration in it. We therefore mirror the data directory hierarchy in
5
# ~/.sauerbraten, and create symlinks to the data files.
5
# ~/.sauerbraten, and create symlinks to the data files.
6
6
7
if [ -d "~/.sauerbraten" ]; then
7
if [ -d ~/.sauerbraten ]
8
	cd ~/.sauerbraten || exit 1
8
then
9
	exec %%PREFIX%%/libexec/sauer_client
9
	echo "Using existing ~/.sauerbraten directory."
10
else
10
else
11
	echo "Creating ~/.sauerbraten directory."
11
	cd %%DATADIR%% || exit 1
12
	cd %%DATADIR%% || exit 1
12
	find * -type d -exec mkdir -p ~/.sauerbraten/{} \; || exit 1
13
	find * -type d -exec mkdir -p ~/.sauerbraten/{} \;
13
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null || exit 1
14
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null
14
	cd ~/.sauerbraten || exit 1
15
	exec %%PREFIX%%/libexec/sauer_client
16
fi
15
fi
16
17
cd ~/.sauerbraten || exit 1
18
exec %%PREFIX%%/libexec/sauer_client "$@"
(-)sauerbraten/files/sauer_server.in (-7 / +9 lines)
Lines 4-16 Link Here
4
# configuration in it. We therefore mirror the data directory hierarchy in
4
# configuration in it. We therefore mirror the data directory hierarchy in
5
# ~/.sauerbraten, and create symlinks to the data files.
5
# ~/.sauerbraten, and create symlinks to the data files.
6
6
7
if [ -d "~/.sauerbraten" ]; then
7
if [ -d ~/.sauerbraten ]
8
	cd ~/.sauerbraten || exit 1
8
then
9
	exec %%PREFIX%%/libexec/sauer_server
9
	echo "Using existing ~/.sauerbraten directory."
10
else
10
else
11
	echo "Creating ~/.sauerbraten directory."
11
	cd %%DATADIR%% || exit 1
12
	cd %%DATADIR%% || exit 1
12
	find * -type d -exec mkdir -p ~/.sauerbraten/{} \; || exit 1
13
	find * -type d -exec mkdir -p ~/.sauerbraten/{} \;
13
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null || exit 1
14
	find * -type f -exec ln -s %%DATADIR%%/{} ~/.sauerbraten/{} \; 2>/dev/null
14
	cd ~/.sauerbraten || exit 1
15
	exec %%PREFIX%%/libexec/sauer_server
16
fi
15
fi
16
17
cd ~/.sauerbraten || exit 1
18
exec %%PREFIX%%/libexec/sauer_server "$@"

Return to bug 101116