This time, fix the build on 4.X, 5.X, and 6-CURRENT.
Reported by: kris, krion Approved by: fjoe (mentor, implicit)
This commit is contained in:
parent
b6a297aef0
commit
72b60eb7a7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123629
@ -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>
|
||||
|
@ -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;
|
@ -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;
|
Loading…
Reference in New Issue
Block a user