aboutsummaryrefslogtreecommitdiffstats
path: root/games/qmars/Makefile
blob: 64141536df223a5b9679c5596a4955ba7da54471 (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
# New ports collection makefile for:    qmars
# Date created:             2008-01-15
# Whom:                 alepulver
#
# $FreeBSD$
#

PORTNAME=   qmars
PORTVERSION=    1.1
CATEGORIES= games
MASTER_SITES=   http://corewar.co.uk/ankerl/
DISTNAME=   ${PORTNAME}_${PORTVERSION}

MAINTAINER= alepulver@FreeBSD.org
COMMENT=    Quicker Mars is heavily optimized to be as fast as possible

BUILD_DEPENDS=  makedepend:${PORTSDIR}/devel/makedepend

USE_BZIP2=  yes
REINPLACE_ARGS= -i ""
WRKSRC=     ${WRKDIR}/${PORTNAME}

post-patch:
    @${REINPLACE_CMD} -e 's|g++|${CXX}|; s|CCFLAGS =|& ${CXXFLAGS}|' \
        ${WRKSRC}/${MAKEFILE}
    @${REINPLACE_CMD} -e 's|\./||' ${WRKSRC}/bench.*
    @${REINPLACE_CMD} -e 's|pmars|&-server|' ${WRKSRC}/bench.pmars
    @${REINPLACE_CMD} -e 's|Warrior::||' ${WRKSRC}/warrior.hpp
    @${REINPLACE_CMD} -e 's|Parser::||' ${WRKSRC}/parser.hpp

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
    ${MKDIR} ${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/bench.* ${DATADIR}
    ${CP} -r ${WRKSRC}/warriors ${DATADIR}

.include <bsd.port.mk>