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

Collapse All | Expand All

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

Return to bug 227190