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

Collapse All | Expand All

(-)assaultcube/Makefile (-5 / +32 lines)
Lines 24-46 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
27
ALL_TARGET=	# empty
28
ALL_TARGET=	libenet
29
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
28
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
29
BUILD_WRKSRC=	${WRKSRC}/source/src
33
30
34
PORTDATA=	config packages scripts
31
PORTDATA=	config packages scripts
35
PORTDOCS=	*
32
PORTDOCS=	*
36
33
37
OPTIONS_DEFINE=	DOCS
34
OPTIONS_DEFINE=	DOCS PORT_ENET
38
OPTIONS_MULTI=	BUILD
35
OPTIONS_MULTI=	BUILD
39
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED MASTER
36
OPTIONS_MULTI_BUILD=	CLIENT DEDICATED MASTER
40
OPTIONS_DEFAULT=	CLIENT DEDICATED
37
OPTIONS_DEFAULT=	CLIENT DEDICATED
41
CLIENT_DESC=	Build client
38
CLIENT_DESC=	Build client
42
DEDICATED_DESC=	Build dedicated server
39
DEDICATED_DESC=	Build dedicated server
43
MASTER_DESC=	Build master server
40
MASTER_DESC=	Build master server
41
PORT_ENET_DESC=	Use libenet from net/enet
42
PORT_ENET_LIB_DEPENDS=		libenet.so:${PORTSDIR}/net/enet
43
PORT_ENET_ALL_TARGET_OFF=	libenet
44
PORT_ENET_CONFIGURE_OFF=	--enable-shared=no --enable-static=yes
44
45
45
.include <bsd.port.options.mk>
46
.include <bsd.port.options.mk>
46
47
Lines 70-75 Link Here
70
ACUBE_BIN+=	master
71
ACUBE_BIN+=	master
71
.endif
72
.endif
72
73
74
.if !${PORT_OPTIONS:MPORT_ENET}
75
GNU_CONFIGURE=		yes
76
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
77
.endif
78
79
post-patch: .SILENT
80
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; \
81
		/^PLATFORM_PREFIX=/s|native|${OPSYS}| ; \
82
		/^INCLUDES=/s|$$| -I${LOCALBASE}/include| ; \
83
		s|-I/usr/include || ; \
84
		s|sdl-config|${SDL_CONFIG}| ; \
85
		s|-lcurl|& -lintl| ; \
86
		s|$$(USRLIB)|${LOCALBASE}/lib| ; \
87
		/^SERVER_LIBS=/s|-lz|& -L${LOCALBASE}/lib|' \
88
		${BUILD_WRKSRC}/Makefile
89
.if ${PORT_OPTIONS:MPORT_ENET}
90
	${SED} -i .port_enet.bak -e 's/libenet // ; \
91
		s|-I\.\./enet/include|| ; \
92
		s|-L\.\./enet/\.libs||' \
93
		${BUILD_WRKSRC}/Makefile
94
.endif
95
.if ${OPSYS} != FreeBSD
96
	${REINPLACE_CMD} -e '/defined/s|FreeBSD|${OPSYS}|g' \
97
		${WRKSRC}/source/enet/unix.c
98
.endif
99
73
pre-install: .SILENT
100
pre-install: .SILENT
74
	# 	Current STAGEDIR doesn't create empty directories for package,
101
	# 	Current STAGEDIR doesn't create empty directories for package,
75
	# in case of dynamically generated TMPPLIST, where these directories exist
102
	# in case of dynamically generated TMPPLIST, where these directories exist
(-)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