aboutsummaryrefslogtreecommitdiff
path: root/games/armagetron/Makefile
blob: ec8fc97876ffbc50172d263329c2ea3fa935c00c (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
# ex:ts=8
# New ports collection makefile for:   	armagetron
# Date created:                        	12 November 2005
# Whom:                                 Maxime Henrion <mux@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	armagetron
PORTVERSION=	0.2.8.2.1
CATEGORIES=	games
MASTER_SITES=	SF/armagetronad
DISTNAME=	armagetronad-${PORTVERSION}
EXTRACT_SUFX=	.src.tar.gz

MAINTAINER=	ianthetechie@gmail.com
COMMENT=	A multiplayer networked Tron clone in 3D

USE_GL=		gl
USE_SDL=	sdl image
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CXXFLAGS="${CFLAGS} -I${LOCALBASE}/include `${SDL_CONFIG} --cflags`"
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS=	--disable-etc

BUILD_DEPENDS+=	bash:${PORTSDIR}/shells/bash
LIB_DEPENDS+=	jpeg.9:${PORTSDIR}/graphics/jpeg \
		png.5:${PORTSDIR}/graphics/png \
		xml2.5:${PORTSDIR}/textproc/libxml2

OPTIONS=	MUSIC	"Compile in support for background music" on

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_MUSIC)
USE_SDL+=	mixer
CONFIGURE_ARGS+=--enable-music
.endif

# This script isn't needed and only causes install problems
CONFIGURE_ARGS+=--disable-uninstall 

post-patch:
	@${REINPLACE_CMD} -e 's|sdl11-config|${SDL_CONFIG}|g' ${WRKSRC}/configure
	@${FIND} ${WRKSRC}/batch -type f -exec ${REINPLACE_CMD} -e 's|^#!/bin/bash$$|#!/bin/sh|g' {} \+
	@${REINPLACE_CMD} -e 's|^INSTALL=.*$$|INSTALL=${DATADIR}|g' \
	    ${WRKSRC}/batch/*.in
	@${FIND} ${WRKSRC}/batch -name '*.bak' -o -name '*.orig' -delete

.include <bsd.port.post.mk>