View | Details | Raw Unified | Return to bug 197605 | Differences between
and this patch

Collapse All | Expand All

(-)assaultcube/Makefile (-6 / +28 lines)
Lines 24-45 Link Here
24
LICENSE_PERMS_OTHER=	dist-mirror pkg-mirror auto-accept
24
LICENSE_PERMS_OTHER=	dist-mirror pkg-mirror auto-accept
25
25
26
USES=		gmake openal:al tar:bzip2
26
USES=		gmake openal:al tar:bzip2
27
GNU_CONFIGURE=	yes
28
ALL_TARGET=	libenet
29
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
27
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
30
CONFIGURE_ARGS=	--enable-shared=no --enable-static=yes
31
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
32
BUILD_WRKSRC=	${WRKSRC}/source/src
28
BUILD_WRKSRC=	${WRKSRC}/source/src
33
29
34
PORTDATA=	config packages scripts
30
PORTDATA=	config packages scripts
35
PORTDOCS=	*
31
PORTDOCS=	*
36
32
37
OPTIONS_DEFINE=	DOCS
33
OPTIONS_DEFINE=	DOCS ENET
38
OPTIONS_MULTI=	BUILD
34
OPTIONS_MULTI=	BUILD
39
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED MASTER
35
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED MASTER
40
OPTIONS_DEFAULT=	CLIENT DEDICATED
36
OPTIONS_DEFAULT=	CLIENT DEDICATED
41
CLIENT_DESC=	Build client
37
CLIENT_DESC=	Build client
42
DEDICATED_DESC=	Build dedicated server
38
DEDICATED_DESC=	Build dedicated server
39
ENET_DESC=	Use Enet library from ports, instead of bundled one
40
ENET_LIB_DEPENDS=	libenet.so:${PORTSDIR}/net/enet
43
MASTER_DESC=	Build master server
41
MASTER_DESC=	Build master server
44
42
45
.include <bsd.port.options.mk>
43
.include <bsd.port.options.mk>
Lines 58-63 Link Here
58
	"Game;" false
56
	"Game;" false
59
.endif
57
.endif
60
58
59
.if !${PORT_OPTIONS:MENET}
60
ALL_TARGET+=	libenet
61
GNU_CONFIGURE=	yes
62
CONFIGURE_ARGS=	--enable-shared=no --enable-static=yes
63
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
64
SED_ENET_RE=	s|$$(USRLIB)|${LOCALBASE}/lib| ; \
65
	/^SERVER_LIBS=/s|-lz|& -L${LOCALBASE}/lib|
66
.else
67
SED_ENET_RE=	s|-I\.\./enet/include|| ; \
68
	s|-L\.\./enet/\.libs|-L${LOCALBASE}/lib| ; \
69
	s|-L$$(USRLIB) ||
70
.endif
71
61
.if ${PORT_OPTIONS:MDEDICATED}
72
.if ${PORT_OPTIONS:MDEDICATED}
62
ALL_TARGET+=	server
73
ALL_TARGET+=	server
63
SUB_FILES+=	${PORTNAME}_server
74
SUB_FILES+=	${PORTNAME}_server
Lines 70-75 Link Here
70
ACUBE_BIN+=	master
81
ACUBE_BIN+=	master
71
.endif
82
.endif
72
83
84
.include <bsd.port.pre.mk>
85
86
post-patch: .SILENT
87
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; \
88
		/^PLATFORM_PREFIX=/s|native|${OPSYS}|; \
89
		/^INCLUDES=/s|$$| -I${LOCALBASE}/include| ; \
90
		s|-I/usr/include || ; \
91
		s|sdl-config|${SDL_CONFIG}| ; \
92
		s|-lcurl|& -lintl| ; ${SED_ENET_RE}' \
93
		${BUILD_WRKSRC}/Makefile
94
73
pre-install: .SILENT
95
pre-install: .SILENT
74
	# 	Current STAGEDIR doesn't create empty directories for package,
96
	# 	Current STAGEDIR doesn't create empty directories for package,
75
	# in case of dynamically generated TMPPLIST, where these directories exist
97
	# in case of dynamically generated TMPPLIST, where these directories exist
Lines 97-100 Link Here
97
	@${ECHO_CMD} share/pixmaps/${PORTNAME}.png >> ${TMPPLIST}
119
	@${ECHO_CMD} share/pixmaps/${PORTNAME}.png >> ${TMPPLIST}
98
.endif
120
.endif
99
121
100
.include <bsd.port.mk>
122
.include <bsd.port.post.mk>
(-)assaultcube/files/patch-source_src_Makefile (-35 lines)
Lines 1-35 Link Here
1
--- source/src/Makefile.orig	2013-10-29 13:20:58.000000000 +0400
2
+++ source/src/Makefile	2013-10-29 17:00:06.000000000 +0400
3
@@ -1,9 +1,7 @@
4
-CXXFLAGS= -O3 -fomit-frame-pointer
5
-CXX=clang++	# Use clang++, as g++ optimizations cause crashes...
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
@@ -22,8 +20,8 @@
15
 else
16
 USRLIB=$(shell if [ -e /usr/lib64 ]; then echo "/usr/lib64"; else echo "/usr/lib"; fi)
17
 # override CXXFLAGS+= -rdynamic		# clang++ doesn't use this...
18
-CLIENT_INCLUDES= $(INCLUDES) -I/usr/include `sdl-config --cflags` -idirafter ../include
19
-CLIENT_LIBS= -L../enet/.libs -lenet -L$(USRLIB) -lX11 `sdl-config --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lcurl
20
+CLIENT_INCLUDES= $(INCLUDES) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags` -idirafter ../include
21
+CLIENT_LIBS= -L../enet/.libs -lenet -L${LOCALBASE}/lib -lX11 `${SDL_CONFIG} --libs` -lSDL_image -lz -lGL -lopenal -lvorbisfile -lcurl -lintl
22
 endif
23
 
24
 CLIENT_OBJS= \
25
@@ -87,8 +85,8 @@
26
 SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I../include
27
 SERVER_LIBS= -L../lib -lzdll -lenet -llibintl -lws2_32 -lwinmm
28
 else
29
-SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
30
-SERVER_LIBS= -L../enet/.libs -lenet -lz
31
+SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) -I${LOCALBASE}/include
32
+SERVER_LIBS= -L../enet/.libs -lenet -lz -L${LOCALBASE}/lib
33
 endif
34
 
35
 SERVER_OBJS= \

Return to bug 197605