summaryrefslogtreecommitdiff
path: root/games/race/Makefile
blob: c13a7720b9a65607b6c3861492b61da7a6b85ab7 (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
# ex:ts=8
# Ports collection makefile for:	race
# Date created:			Jul 16, 2002
# Whom:				ijliao
#
# $FreeBSD$
#

PORTNAME=	race
PORTVERSION=	0.5
CATEGORIES=	games
MASTER_SITES=	ftp://users.freebsd.org.uk/pub/foobar2k/

MAINTAINER=	ports@FreeBSD.org

PORTCOMMENT=	OpenGL Racing Game

LIB_DEPENDS=	SDL_mixer:${PORTSDIR}/audio/sdl_mixer \
		SDL_image:${PORTSDIR}/graphics/sdl_image

USE_BZIP2=	yes
USE_REINPLACE=	yes
USE_MESA=	yes
SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config
CFLAGS+=	"-I${X11BASE}/include"
MAKE_ENV=	CC="${CC} ${CFLAGS}" LDFLAGS="-L${X11BASE}/lib ${PTHREAD_LIBS}"

post-patch:
	@${REINPLACE_CMD} -e "s|^CC|#CC|g" \
		-e "s|sdl-config|${SDL_CONFIG}|g" ${WRKSRC}/Makefile
.for file in  game.c main.c menu.c terrain.c textures.c
	@${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|g" ${WRKSRC}/src/${file}
.endfor

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/race ${PREFIX}/bin
	@${MKDIR} ${DATADIR}/data
	${INSTALL_DATA} ${WRKSRC}/config ${DATADIR}
	${CP} -R ${WRKSRC}/data/* ${DATADIR}/data

.include <bsd.port.mk>