summaryrefslogtreecommitdiff
path: root/games/starfighter/Makefile
blob: b7485bea381f0cff917815453c9fadb5ac0c288e (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
# New ports collection makefile for:	starfighter
# Date created:				13 Jul 2005
# Whom:					Alejandro Pulver <alejandro@varnet.biz>
#
# $FreeBSD$
#

PORTNAME=	starfighter
DISTVERSION=	1.1-1
PORTREVISION=	4
CATEGORIES=	games
MASTER_SITES=	NETBSD \
		http://www.amdmi3.ru/distfiles/

MAINTAINER=	alepulver@FreeBSD.org
COMMENT=	Chris Bainfield is fighting for the freedom of the galaxy

USE_GMAKE=	yes
USE_SDL=	image mixer sdl

WRKSRC=		${WRKDIR}/${PORTNAME}-1.1

OPTIONS=	OPTIMIZED_CFLAGS "Enable compilation optimizations" on

MAKEFILE=	makefile

.if !defined(NOPORTDOCS)
post-install:
	${MKDIR} ${DOCSDIR}
	@${RM} ${WRKSRC}/docs/LICENSE
	${INSTALL_DATA} ${WRKSRC}/docs/* ${DOCSDIR}
.endif

.include <bsd.port.pre.mk>

post-patch:
# Fix Makefile.
	@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}| ; \
		s|\(-Wall\)|${CFLAGS} \1|' \
		${WRKSRC}/${MAKEFILE}

# Fix SDL include statement.
	@${REINPLACE_CMD} -e 's|\(#include.*\)SDL/\(SDL.*\)|\1\2|' \
		${WRKSRC}/code/*.cpp ${WRKSRC}/code/*.h

# Enable/disable compilation optimizations.
.if defined(WITHOUT_OPTIMIZED_CFLAGS)
	@${REINPLACE_CMD} -e 's|-O3||g' ${WRKSRC}/${MAKEFILE}
.endif

.include <bsd.port.post.mk>