aboutsummaryrefslogtreecommitdiff
path: root/games/odamex/Makefile
blob: e5175e94b43015e92f46eb0250ba5063e95e6fe6 (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
55
56
57
58
59
60
61
62
63
64
65
66
# New ports collection makefile for:	odamex
# Date created:				2007-12-06
# Whom:					alepulver
#
# $FreeBSD$
#

PORTNAME=	odamex
PORTVERSION=	0.4.3
PORTREVISION=	2
CATEGORIES=	games
MASTER_SITES=	SF/${PORTNAME}/Odamex/${PORTVERSION}
DISTNAME=	odamex-src-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	The Standard in Online Multiplayer Doom

USE_BZIP2=	yes
USE_GMAKE=	yes
USE_SDL=	sdl mixer

OPTIONS=	LAUNCHER "Enable GUI launcher program" off \
		MIDI	 "Enable MIDI support (timidity)" off

.include <bsd.port.pre.mk>

.if defined(WITH_LAUNCHER)
USE_WX=		2.6+
MAKE_ENV+=	WXRC_CMD="${WXRC_CMD}" WITH_LAUNCHER=yes
PLIST_SUB+=	LAUNCHER=""
.else
PLIST_SUB+=	LAUNCHER="@comment "
.endif

.if defined(WITH_MIDI)
RUN_DEPENDS+=	timidity:${PORTSDIR}/audio/timidity
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|%%DMDIR%%|${DMDIR}|; \
		s|%%DATADIR%%|${DATADIR}|' \
		${WRKSRC}/client/src/d_main.cpp \
		${WRKSRC}/server/src/d_main.cpp

.if defined(WITH_LAUNCHER)
	@${REINPLACE_CMD} -e 's|\./odamex|odamex|' \
		${WRKSRC}/odalaunch/src/misc.cpp
.endif

do-install:
.for f in odamaster odamex odasrv
	${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
.endfor
.if defined(WITH_LAUNCHER)
	${INSTALL_PROGRAM} ${WRKSRC}/odalaunch/odalaunch ${PREFIX}/bin
.endif
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/odamex.wad ${DATADIR}
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include "${.CURDIR}/../doom-data/Makefile.include"

.include <bsd.port.post.mk>