summaryrefslogtreecommitdiffstats
path: root/games/highmoon/Makefile
blob: 2fe7d940ffa0cb7c960926ebc179749bba88384c (plain)
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
# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$

PORTNAME=	highmoon
PORTVERSION=	1.2.4
PORTREVISION=	9
CATEGORIES=	games
MASTER_SITES=	http://highmoon.gerdsmeier.net/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Duel in the universe

WRKSRC=		${WRKDIR}/HighMoon

USE_SDL=	image sdl
USE_GMAKE=	yes
MAKE_ARGS=	CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}"

CXXFLAGS+=	`${SDL_CONFIG} --cflags`
LDFLAGS+=	`${SDL_CONFIG} --libs` -lSDL_image

NO_STAGE=	yes
post-patch:
	@${FIND} ${WRKSRC}/src -type f | ${XARGS} ${REINPLACE_CMD} -e \
		's|SDL/SDL|SDL|g ; \
		 s|^#define __ENV|//#define __ENV|g ; \
		 s|"gfx/|"${DATADIR}/gfx/|g ; \
		 s|"snd/|"${DATADIR}/snd/|g ; \
		 s|-round(|-rint(|g'

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/ufo ${PREFIX}/bin/${PORTNAME}
	@${MKDIR} ${DATADIR}/gfx
	${INSTALL_DATA} ${WRKSRC}/gfx/* ${DATADIR}/gfx
	@${MKDIR} ${DATADIR}/snd
	${INSTALL_DATA} ${WRKSRC}/snd/* ${DATADIR}/snd
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud