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

Collapse All | Expand All

(-)Makefile (-33 / +22 lines)
Lines 24-30 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 tar:bzip2
26
USES=		gmake tar:bzip2
27
ALL_TARGET=	# empty
28
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
27
WRKSRC=		${WRKDIR}/AssaultCube_v${PORTVERSION}
29
BUILD_WRKSRC=	${WRKSRC}/source/src
28
BUILD_WRKSRC=	${WRKSRC}/source/src
30
SUB_FILES=	${PLIST_FILES:Mbin/*:T}
29
SUB_FILES=	${PLIST_FILES:Mbin/*:T}
Lines 31-37 Link Here
31
30
32
PORTDATA=	config packages scripts
31
PORTDATA=	config packages scripts
33
PORTDOCS=	*
32
PORTDOCS=	*
34
PLIST_DIRS=	%%DATADIR%%/packages/maps/servermaps/incoming
33
PLIST_DIRS=	${DATADIR}/packages/maps/servermaps/incoming
35
34
36
OPTIONS_DEFINE=	DOCS PORT_ENET
35
OPTIONS_DEFINE=	DOCS PORT_ENET
37
OPTIONS_MULTI=	BUILD
36
OPTIONS_MULTI=	BUILD
Lines 44-49 Link Here
44
CLIENT_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis \
43
CLIENT_LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis \
45
			libcurl.so:ftp/curl
44
			libcurl.so:ftp/curl
46
CLIENT_ALL_TARGET=	client
45
CLIENT_ALL_TARGET=	client
46
CLIENT_DESKTOP_ENTRIES=	"AssaultCube" "${COMMENT}" \
47
	"${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}_client" \
48
	"Game;" false
47
CLIENT_PLIST_FILES=	bin/${PORTNAME}_client libexec/${PORTNAME}_client \
49
CLIENT_PLIST_FILES=	bin/${PORTNAME}_client libexec/${PORTNAME}_client \
48
			share/pixmaps/${PORTNAME}.png
50
			share/pixmaps/${PORTNAME}.png
49
DEDICATED_DESC=	Build dedicated server
51
DEDICATED_DESC=	Build dedicated server
Lines 53-76 Link Here
53
MASTER_ALL_TARGET=	master
55
MASTER_ALL_TARGET=	master
54
MASTER_PLIST_FILES=	bin/${PORTNAME}_master libexec/${PORTNAME}_master
56
MASTER_PLIST_FILES=	bin/${PORTNAME}_master libexec/${PORTNAME}_master
55
PORT_ENET_DESC=	Use libenet from net/enet
57
PORT_ENET_DESC=	Use libenet from net/enet
58
PORT_ENET_ALL_TARGET_OFF=	libenet
59
PORT_ENET_CONFIGURE_OFF=	--enable-shared=no --enable-static=yes
60
PORT_ENET_LIB_DEPENDS=	libenet.so:net/enet
61
PORT_ENET_VARS_OFF=	GNU_CONFIGURE=yes CONFIGURE_WRKSRC="${WRKSRC}/source/enet"
56
62
57
.include <bsd.port.options.mk>
58
59
.if ${PORT_OPTIONS:MCLIENT}
60
DESKTOP_ENTRIES="AssaultCube" "${COMMENT}" \
61
	"${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}_client" \
62
	"Game;" false
63
.endif
64
65
.if ${PORT_OPTIONS:MPORT_ENET}
66
LIB_DEPENDS+=	libenet.so:net/enet
67
.else
68
ALL_TARGET+=	libenet
69
GNU_CONFIGURE=		yes
70
CONFIGURE_ARGS+=	--enable-shared=no --enable-static=yes
71
CONFIGURE_WRKSRC=	${WRKSRC}/source/enet
72
.endif
73
74
post-patch: .SILENT
63
post-patch: .SILENT
75
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \
64
	${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \
76
		/^INCLUDES=/s|$$| -I$$(LOCALBASE)/include| ; \
65
		/^INCLUDES=/s|$$| -I$$(LOCALBASE)/include| ; \
Lines 80-105 Link Here
80
		/^CLIENT_LIBS=/s|$$| -lintl| ; \
69
		/^CLIENT_LIBS=/s|$$| -lintl| ; \
81
		/^SERVER_LIBS=/s|$$| -L$$(LOCALBASE)/lib|' \
70
		/^SERVER_LIBS=/s|$$| -L$$(LOCALBASE)/lib|' \
82
		${BUILD_WRKSRC}/Makefile
71
		${BUILD_WRKSRC}/Makefile
83
.if ${PORT_OPTIONS:MPORT_ENET}
72
84
	${SED} -i '.port_enet.bak' -e 's/libenet // ; \
73
post-patch-PORT_ENET-on: .SILENT
74
	${REINPLACE_CMD} -i '.port_enet.bak' -e 's/libenet // ; \
85
		s|-I\.\./enet/include|| ; \
75
		s|-I\.\./enet/include|| ; \
86
		s|-L\.\./enet/\.libs||' \
76
		s|-L\.\./enet/\.libs||' \
87
		${BUILD_WRKSRC}/Makefile
77
		${BUILD_WRKSRC}/Makefile
88
.endif
89
78
90
do-install:
79
do-install:
91
.for f in ${PLIST_FILES:Mbin/*}
92
	${INSTALL_SCRIPT} ${WRKDIR}/${f:T} ${STAGEDIR}${PREFIX}/${f}
93
.endfor
94
.for f in ${PLIST_FILES:Mlibexec/*}
95
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${f:T:S/${PORTNAME}/ac/} \
96
		${STAGEDIR}${PREFIX}/${f}
97
.endfor
98
.if ${PORT_OPTIONS:MCLIENT}
99
	${INSTALL_DATA} ${WRKSRC}/docs/images/icon.png \
100
		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
101
.endif
102
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
80
	(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
103
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
81
	(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
104
82
83
do-install-CLIENT-on:
84
	${INSTALL_DATA} ${WRKSRC}/docs/images/icon.png \
85
		${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
86
87
.for f in client master server
88
post-install-${f:S|server|DEDICATED|:tu}-on:
89
	${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${STAGEDIR}${PREFIX}/bin
90
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} \
91
		${STAGEDIR}${PREFIX}/libexec/${PORTNAME}_${f}
92
.endfor
93
105
.include <bsd.port.mk>
94
.include <bsd.port.mk>

Return to bug 227190