summaryrefslogtreecommitdiff
path: root/games/rtb/Makefile
blob: 4826571ba5d996ce5eafe7489a8531702ff13508 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# New ports collection makefile for:	RealTimeBattle
# Date created:				30 June 2000
# Whom:				Dishanker Rajakulendren <draj@oceanfree.net>
#
# $FreeBSD$
#

PORTNAME=	RealTimeBattle
PORTVERSION=	1.0.7
PORTREVISION=	1
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME:L}
DISTNAME=	${PORTNAME}-${PORTVERSION}-Ext

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Robot programming game for UNIX

BUILD_DEPENDS=	gsed:${PORTSDIR}/textproc/gsed

USE_X_PREFIX=	yes
USE_GNOME=	gnometarget gtk20
USE_GCC=	3.4
USE_PERL5=	yes
USE_GETOPT_LONG=	yes
USE_REINPLACE=	yes
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_ARGS=	--with-rtb-dir=${PREFIX}/lib/${PORTNAME}

CXXFLAGS+=	-fpermissive

CPPFLAGS=	-I${LOCALBASE}/include -DHAVE_DECL_GETOPT
LDFLAGS=	-L${LOCALBASE}/lib -lintl

post-patch:
.for file in include/Various.h src/ArenaBase.cc src/GeometricalObjects.cc \
	src/Options.cc src/Robot.cc src/StartTournamentWindow.cc \
	src/StatisticsWindow.cc src/Various.cc
	@${REINPLACE_CMD} -E -e 's|min[[:space:]]*\(|Min(|g ; \
		 s|max[[:space:]]*\(|Max\(|g' ${WRKSRC}/${file}
.endfor
.for file in src/ArenaRealTime.cc
	@${REINPLACE_CMD} -E -e 's|\(int\*\)|int\*|g' ${WRKSRC}/${file}
.endfor
.for file in rtb-team-framework/createrobot.sh \
	rtb-team-framework/createrobotconf.sh
	@${REINPLACE_CMD} -e 's| sed| gsed|g' ${WRKSRC}/${file}
.endfor
.for file in Makefile.in
	@${REINPLACE_CMD} -e 's|intl Documentation||g' ${WRKSRC}/${file}
.endfor

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.for file in AUTHORS ChangeLog EXTRAROBOTS.README NEWS README TODO \
	Documentation/RealTimeBattle-1.html \
	Documentation/RealTimeBattle-2.html \
	Documentation/RealTimeBattle-3.html \
	Documentation/RealTimeBattle-4.html \
	Documentation/RealTimeBattle-5.html \
	Documentation/RealTimeBattle-6.html \
	Documentation/RealTimeBattle.html \
	Documentation/next.gif Documentation/prev.gif Documentation/toc.gif \
	Documentation/next.png Documentation/prev.png Documentation/toc.png \
	Documentation/RealTimeBattle.dvi \
	Documentation/RealTimeBattle.sgml \
	Documentation/RealTimeBattle.txt \
	Documentation/RTB-Team-Framework-Tutorial.tar.gz
	${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
.endif

.include <bsd.port.mk>