blob: 316ba094d7fd703967a4963112a90a8068498d81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$
PORTNAME= relay
PORTVERSION= 0.4
CATEGORIES= games
MASTER_SITES= LOCAL/danfe http://freebsd.nsu.ru/distfiles/
PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX}
DISTNAME= relay-${PORTVERSION}.src
MAINTAINER= ports@FreeBSD.org
COMMENT= Quake II multi-view demo recording facility
LICENSE= GPLv2
USES= gmake
MAKE_ARGS= MODE=release OBJ_DIR=. OUT_DIR=. Q2MODULE=game.so \
QUAKE2_DIR="${Q2DIR}" BIN_DIR="${PREFIX}/bin" \
CC="${CC}" LD="${CC}" CFLAGS="${CFLAGS}"
WRKSRC= ${WRKDIR}/relay-${PORTVERSION}
PORTDOCS= FAQ README
OPTIONS_DEFINE= DOCS
NO_STAGE= yes
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.options.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+= -fPIC
.endif
post-patch: .SILENT
${REINPLACE_CMD} -e 's/-ldl// ; /^include/d ; \
s/cp -p/${INSTALL_PROGRAM}/' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e '/random/d' ${WRKSRC}/replay/rp_local.h
${REINPLACE_CMD} -e 's,<malloc\.h>,<stdlib\.h>,' \
${WRKSRC}/common/mem.c
cd ${WRKSRC}/common && ${SH} -c 'for i in *.h; do \
${ECHO_CMD} >> $${i}; done'
# Reorganize #include's (use /bin/ed to avoid a patch)
${ECHO_CMD} -e '35t30\n36d\nwq' | ${ED} -s ${WRKSRC}/common/net.h
${ECHO_CMD} -e '9t7\n10d\nwq' | ${ED} -s ${WRKSRC}/common/net.c
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
.endif
ED?= /bin/ed
.include <bsd.port.mk>
|