summaryrefslogtreecommitdiff
path: root/games/toppler/Makefile
blob: 48f09f4744a780d6cec832b0c8399bb49383f606 (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
# New ports collection makefile for:	toppler
# Date created:				18 Jan 2002
# Whom:					Dom Mitchell <dom@happygiraffe.net>
#
# $FreeBSD$
#

PORTNAME=	toppler
PORTVERSION=	0.71
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	toppler

MAINTAINER=	dom@happygiraffe.net

LIB_DEPENDS=	SDL-1.1:${PORTSDIR}/devel/sdl12

SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config

USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}"

SCOREDIR?=	/var/games/${PORTNAME}
SCOREFILE?=	${PORTNAME}.hscr

pre-patch:
	@${PERL} -pi -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
	@find ${WRKSRC} \( -name "*.[ch]" -or -name "*.cc" \) | \
		xargs ${PERL} -pi -e 's|"SDL/SDL|"SDL|g ; s|<SDL/SDL|<SDL|g'

post-patch:
	@${PERL} -pi -e 's|%SCOREDIR%|${SCOREDIR}|g;' \
		-e 's|%SCOREFILE%|${SCOREFILE}|g' ${WRKSRC}/menu.cc

pre-install:
	${MKDIR} ${SCOREDIR}

post-install:
	${CHOWN} root:games ${PREFIX}/bin/${PORTNAME}
	${CHMOD} g+s ${PREFIX}/bin/${PORTNAME}
	${TOUCH} ${SCOREDIR}/${SCOREFILE}
	${CHMOD} 664 ${SCOREDIR}/${SCOREFILE}
	${CHOWN} root:games ${SCOREDIR}/${SCOREFILE}

.include <bsd.port.mk>