summaryrefslogtreecommitdiff
path: root/games/vdrift/Makefile
blob: f70f0b54a1cd40231bdfe07fb8f422f367b66e89 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# New ports collection makefile for:	vdrift
# Date created:		2005-11-09
# Whom:			Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#

PORTNAME=	vdrift
PORTVERSION=	20100630
PORTREVISION=	4
CATEGORIES=	games
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${DATE_VERSION}
DISTNAME=	${PORTNAME}-${DATE_VERSION}-src
DIST_SUBDIR=	${PORTNAME}

MAINTAINER=	acm@FreeBSD.org
COMMENT=	Open source driving simulation

BUILD_DEPENDS=	scons:${PORTSDIR}/devel/scons \
		${LOCALBASE}/lib/libBulletCollision.a:${PORTSDIR}/devel/bullet \
		${LOCALBASE}/include/asio.hpp:${PORTSDIR}/net/asio
LIB_DEPENDS=	vorbis.4:${PORTSDIR}/audio/libvorbis \
		boost_thread.4:${PORTSDIR}/devel/boost-libs
RUN_DEPENDS=	${LOCALBASE}/share/${PORTNAME}/settings/VDrift.config:${PORTSDIR}/games/vdrift-data

USE_BZIP2=	yes
USE_GL=		glew
USE_SDL=	sdl image net gfx

SCONS_ARGS=	prefix=${PREFIX} \
		datadir=share/${PORTNAME} \
		bindir=bin \
		use_binreloc=0
WRKSRC=		${WRKDIR}/${DISTNAME}

DATE_VERSION=	2010-06-30

SUB_FILES=	pkg-message

OPTIONS=	DEBUG	"Additional debug information"	off \
		NLS	"Internationalization support "	on

.include <bsd.port.pre.mk>

.if defined(WITH_DEBUG)
SCONS_ARGS+=	release=0
.else
SCONS_ARGS+=	release=1
.endif

.if !defined(WITHOUT_NLS)
USE_GETTEXT=	yes
PLIST_SUB+=	NLS=""
FLAG_NLS=	true
.else
PLIST_SUB+=	NLS="@comment "
.endif

.if ${ARCH} == "sparc64"
BROKEN=		Does not compile on sparc64
.endif

post-patch:
	@${REINPLACE_CMD} -e 's,(__APPLE__),(__APPLE__) || defined(__FreeBSD__),g' \
		${WRKSRC}/include/quickmp.h
	@${REINPLACE_CMD} -e 's|GEN_clamped|btClamped|g' \
		${WRKSRC}/bullet/BulletDynamics/Dynamics/btRigidBody.cpp

do-build:
	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} scons ${SCONS_ARGS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/build/vdrift ${PREFIX}/bin

.if defined(FLAG_NLS)
	@${MKDIR} ${DATADIR}/po
	@cd ${WRKSRC}/po && \
		${FIND} * -type f -name "*.po" -exec ${INSTALL_DATA} "{}" "${DATADIR}/po/{}" \;
.endif

.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
.for FILE in docs/AUTHORS docs/README
	${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>