aboutsummaryrefslogtreecommitdiff
path: root/games/rtb
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2004-12-10 10:24:06 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2004-12-10 10:24:06 +0000
commit72b60eb7a726f2021e143b15448bdb328a98e531 (patch)
tree39a7602920e83bea0ff4155c84c6be6c7cedd39d /games/rtb
parentb6a297aef0e3fb30b21b6c35860cdf2d63a50b6b (diff)
downloadports-72b60eb7a726f2021e143b15448bdb328a98e531.tar.gz
ports-72b60eb7a726f2021e143b15448bdb328a98e531.zip
Notes
Diffstat (limited to 'games/rtb')
-rw-r--r--games/rtb/Makefile14
-rw-r--r--games/rtb/files/patch-src::GeometricalObjects.cc47
-rw-r--r--games/rtb/files/patch-src::StartTournamentWindow.cc20
3 files changed, 6 insertions, 75 deletions
diff --git a/games/rtb/Makefile b/games/rtb/Makefile
index 70092f5c5752..5e6af1c4c5d1 100644
--- a/games/rtb/Makefile
+++ b/games/rtb/Makefile
@@ -30,14 +30,12 @@ MAKE_ARGS= ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
CPPFLAGS= -I${LOCALBASE}/include -DHAVE_DECL_GETOPT
LDFLAGS= -L${LOCALBASE}/lib
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN= "Does not compile on 4.x"
-.endif
-
post-extract:
- @${REINPLACE_CMD} -e 's/min/Min/; s/max/Max/' ${WRKSRC}/include/Various.h
+ @${REINPLACE_CMD} -E -e 's/min[[:space:]]*\(/Min(/; s/max[[:space:]]*\(/Max\(/' \
+ ${WRKSRC}/include/Various.h ${WRKSRC}/src/ArenaBase.cc \
+ ${WRKSRC}/src/GeometricalObjects.cc ${WRKSRC}/src/Options.cc \
+ ${WRKSRC}/src/Robot.cc ${WRKSRC}/src/StartTournamentWindow.cc \
+ ${WRKSRC}/src/StatisticsWindow.cc ${WRKSRC}/src/Various.cc
@${REINPLACE_CMD} -E -e 's/\(int\*\)/int\*/' ${WRKSRC}/src/ArenaRealTime.cc
post-install:
@@ -48,4 +46,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/RealTimeBattle.txt ${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/games/rtb/files/patch-src::GeometricalObjects.cc b/games/rtb/files/patch-src::GeometricalObjects.cc
deleted file mode 100644
index 0a1802159038..000000000000
--- a/games/rtb/files/patch-src::GeometricalObjects.cc
+++ /dev/null
@@ -1,47 +0,0 @@
---- src/GeometricalObjects.cc.orig Tue Sep 21 18:01:56 2004
-+++ src/GeometricalObjects.cc Tue Sep 21 18:02:43 2004
-@@ -89,7 +89,7 @@
- if( s < 0 || s > length ) return infinity;
- if( t < 0 && ((d=-dot(y, direction)) < 0.0 || d > length ) ) return infinity;
-
-- return max(t, 0);
-+ return Max(t, 0);
- }
-
- Vector2D
-@@ -169,7 +169,7 @@
- double r = size+radius;
- double c = dt*dt + speedsqr * (r*r - lengthsqr(y));
- if( c < 0.0 || dt <= 0.0) return infinity;
-- return max( (dt - sqrt(c))/speedsqr, 0);
-+ return Max( (dt - sqrt(c))/speedsqr, 0);
- }
-
- bool
-@@ -231,7 +231,7 @@
- if( speedsqr == 0.0 ) return infinity;
- double dt = dot(vel, y);
- double c = dt*dt + speedsqr*((size-radius)*(size-radius) - lengthsqr(y));
-- return max( (dt + sqrt(c))/speedsqr, 0 );
-+ return Max( (dt + sqrt(c))/speedsqr, 0 );
- }
-
- bool
-@@ -318,7 +318,7 @@
- r = size + outer_radius;
- c = dt*dt + speedsqr * (r*r - lengthsqr(d));
- if( c < 0.0 || dt <= 0.0) return infinity;
-- t = max( (dt - sqrt(c))/speedsqr, 0);
-+ t = Max( (dt - sqrt(c))/speedsqr, 0);
-
- if( within_angle( vec2angle( vel * t - d ) ) )
- return t;
-@@ -336,7 +336,7 @@
- c = dt*dt + speedsqr*( r*r - lengthsqr(d) );
- if( c < 0.0 ) return infinity; // Can happen if object outside circle
-
-- t = max( (dt + sqrt(c))/speedsqr, 0 );
-+ t = Max( (dt + sqrt(c))/speedsqr, 0 );
-
- if( !within_angle( vec2angle( vel * t - d ) ) )
- return infinity;
diff --git a/games/rtb/files/patch-src::StartTournamentWindow.cc b/games/rtb/files/patch-src::StartTournamentWindow.cc
deleted file mode 100644
index 840ac3db971f..000000000000
--- a/games/rtb/files/patch-src::StartTournamentWindow.cc
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/StartTournamentWindow.cc.orig Tue Sep 21 18:05:42 2004
-+++ src/StartTournamentWindow.cc Tue Sep 21 18:06:01 2004
-@@ -660,7 +660,7 @@
- max_value = 10000;
- else
- {
-- max_value = min( the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number);
-+ max_value = Min( the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number);
- }
- if(i != 1)
- min_value = 1;
-@@ -805,7 +805,7 @@
- max_value = 10000;
- else
- {
-- max_value = min(the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number);
-+ max_value = Min(the_opts.get_l( OPTION_MAX_ROBOTS_ALLOWED ),robot_number);
- }
- if(i != 1)
- min_value = 1;