summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2003-09-10 18:14:28 +0000
committerMike Frysinger <vapier@gentoo.org>2003-09-10 18:14:28 +0000
commit5185da51cd857a2dfde2d4b4705136834d5354e4 (patch)
tree751722dcc6f2f65f7839b89babf369c6a7de9fb3 /games-misc/c++robots
parentstable on x86/alpha (diff)
downloadgentoo-2-5185da51cd857a2dfde2d4b4705136834d5354e4.tar.gz
gentoo-2-5185da51cd857a2dfde2d4b4705136834d5354e4.tar.bz2
gentoo-2-5185da51cd857a2dfde2d4b4705136834d5354e4.zip
games-misc
Diffstat (limited to 'games-misc/c++robots')
-rw-r--r--games-misc/c++robots/ChangeLog8
-rw-r--r--games-misc/c++robots/Manifest4
-rw-r--r--games-misc/c++robots/c++robots-0.ebuild32
-rw-r--r--games-misc/c++robots/files/digest-c++robots-01
-rw-r--r--games-misc/c++robots/files/proper-coding.patch146
5 files changed, 191 insertions, 0 deletions
diff --git a/games-misc/c++robots/ChangeLog b/games-misc/c++robots/ChangeLog
new file mode 100644
index 000000000000..890eb74fb652
--- /dev/null
+++ b/games-misc/c++robots/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for app-games/c++robots
+# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-misc/c++robots/ChangeLog,v 1.1 2003/09/10 18:14:04 vapier Exp $
+
+*c++robots-0 (01 Jan 2002)
+
+ 01 Jan 2002; Mike Frysinger <vapier@gentoo.org> :
+ Initial import. Ebuild submitted by me for #7200.
diff --git a/games-misc/c++robots/Manifest b/games-misc/c++robots/Manifest
new file mode 100644
index 000000000000..df34f28bb2fa
--- /dev/null
+++ b/games-misc/c++robots/Manifest
@@ -0,0 +1,4 @@
+MD5 ac29f830b8cc5758b42760255128caac ChangeLog 353
+MD5 486d3f1694a49cc37205eaf010b8c4dd c++robots-0.ebuild 799
+MD5 cf611219e89c7d1abf52480318628372 files/digest-c++robots-0 60
+MD5 fa8da7d1719da9b43e02dff5ce08efea files/proper-coding.patch 3366
diff --git a/games-misc/c++robots/c++robots-0.ebuild b/games-misc/c++robots/c++robots-0.ebuild
new file mode 100644
index 000000000000..b1e393396ca0
--- /dev/null
+++ b/games-misc/c++robots/c++robots-0.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-misc/c++robots/c++robots-0.ebuild,v 1.1 2003/09/10 18:14:04 vapier Exp $
+
+inherit games
+
+DESCRIPTION="ongoing 'King of the Hill' (KotH) tournament"
+HOMEPAGE="http://www.gamerz.net/c++robots/"
+SRC_URI="http://www.gamerz.net/c++robots/c++robots.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 ppc"
+IUSE="static"
+
+DEPEND="virtual/glibc"
+
+S="${WORKDIR}/${PN}"
+
+src_compile() {
+ patch -p0 < ${FILESDIR}/proper-coding.patch
+
+ local myldflags="${LDFLAGS}"
+ use static && myldflags="${myldflags} -static"
+ emake CFLAGS="${CFLAGS}" LDFLAGS="${myldflags}" || die
+}
+
+src_install() {
+ dogamesbin combat cylon target tracker
+ dodoc README
+ prepgamesdirs
+}
diff --git a/games-misc/c++robots/files/digest-c++robots-0 b/games-misc/c++robots/files/digest-c++robots-0
new file mode 100644
index 000000000000..d3696ad4eded
--- /dev/null
+++ b/games-misc/c++robots/files/digest-c++robots-0
@@ -0,0 +1 @@
+MD5 aad09c3966a9e8b24b765c73aa101087 c++robots.tar.gz 10027
diff --git a/games-misc/c++robots/files/proper-coding.patch b/games-misc/c++robots/files/proper-coding.patch
new file mode 100644
index 000000000000..3df36a153758
--- /dev/null
+++ b/games-misc/c++robots/files/proper-coding.patch
@@ -0,0 +1,146 @@
+--- Makefile.orig 2003-01-01 23:36:19.000000000 -0500
++++ Makefile 2003-01-01 23:39:32.000000000 -0500
+@@ -1,8 +1,9 @@
+ CFLAGS=-g
++LDFLAGS=
+ PROGRAMS=combat
+ ROBOTS=cylon tracker target
+
+-CC=g++ -g
++CC=g++
+
+ all: $(PROGRAMS) $(ROBOTS)
+
+@@ -10,29 +11,29 @@
+ rm -f $(PROGRAMS) $(ROBOTS) *.o core
+
+ combat: combat.o
+- $(CC) $(CFLAGS) -o $@ combat.o -lm
++ $(CC) -o $@ $(LDFLAGS) combat.o -lm
+
+ combat.o: combat.c
+ $(CC) $(CFLAGS) -c combat.c
+
+ robots.o: robots.C robots.h
+- g++ -c robots.C
++ $(CC) $(CFLAGS) -c robots.C
+
+ cylon: cylon.o robots.o
+- g++ -static -o $@ cylon.o robots.o
++ $(CC) -o $@ $(LDFLAGS) cylon.o robots.o
+
+ cylon.o: cylon.c robots.h
+- g++ -c cylon.c
++ $(CC) $(CFLAGS) -c cylon.c
+
+ tracker: tracker.o robots.o
+- g++ -static -o $@ tracker.o robots.o
++ $(CC) -o $@ $(LDFLAGS) tracker.o robots.o
+
+ tracker.o: tracker.c robots.h
+- g++ -c tracker.c
++ $(CC) $(CFLAGS) -c tracker.c
+
+ target: target.o robots.o
+- g++ -static -o $@ target.o robots.o
++ $(CC) -o $@ $(LDFLAGS) target.o robots.o
+
+ target.o: target.c robots.h
+- g++ -c target.c
++ $(CC) $(CFLAGS) -c target.c
+
+--- combat.c.orig 2003-01-01 23:32:55.000000000 -0500
++++ combat.c 2003-01-01 23:34:06.000000000 -0500
+@@ -29,6 +29,7 @@
+ #include <signal.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <errno.h>
+@@ -96,7 +97,7 @@
+ Robot *robots=NULL;
+ int nrobots=0;
+
+-plot(int x, int y, char c)
++void plot(int x, int y, char c)
+ {
+ int h = int(x)*79/10000;
+ int v = 34-int(y)*(31-nrobots)/10000;
+@@ -472,7 +473,7 @@
+
+ }
+
+-Between(double x1, double y1, double x2, double y2, double x0, double y0)
++int Between(double x1, double y1, double x2, double y2, double x0, double y0)
+ {
+ double tx,ty;
+ /* is (x0,y0) between (x1,y1) - (x2,y2)? */
+--- cylon.c.orig 2003-01-01 23:32:49.000000000 -0500
++++ cylon.c 2003-01-01 23:40:13.000000000 -0500
+@@ -1,6 +1,6 @@
+ #include "robots.h"
+
+-Distance(int x1, int y1, int x2, int y2)
++int Distance(int x1, int y1, int x2, int y2)
+ {
+ int dx = x1-x2;
+ int dy = y1-y2;
+@@ -8,7 +8,7 @@
+ return sqrt(dx*dx + dy*dy);
+ }
+
+-Goto(int x, int y)
++void Goto(int x, int y)
+ {
+ int dir = atan2(y-loc_y(),x-loc_x());
+ int dist = Distance(x,y,loc_x(),loc_y());
+@@ -37,8 +37,9 @@
+ drive(dir,0);
+ }
+
+-main()
++int main()
+ {
+ while (1)
+ Goto(rand(9000)+500,rand(9000)+500);
++ return 0;
+ }
+--- robots.C.orig 2003-01-01 23:34:39.000000000 -0500
++++ robots.C 2003-01-01 23:35:18.000000000 -0500
+@@ -6,6 +6,7 @@
+ #include <time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include "robots.h"
+
+--- tracker.c.orig 2003-01-01 23:35:27.000000000 -0500
++++ tracker.c 2003-01-01 23:35:46.000000000 -0500
+@@ -18,7 +18,7 @@
+ // Shoot at a target if its in range (<= 7000 units) *and* its far
+ // enough away that we will only be slightly damaged (>200 units) by the
+ // resulting explosion.
+-inline shoot(int dir,int range)
++void inline shoot(int dir,int range)
+ {
+ if (range <= 7000 && range > 200) {
+ printlog("cannon(%d,%d)",dir,range);
+@@ -26,7 +26,7 @@
+ }
+ }
+
+-main()
++int main()
+ {
+ int sdir=0; /* current scan direction */
+ int dir=0; /* current movement direction */
+@@ -74,4 +74,6 @@
+ else
+ sdir -= 20; /* increment the scan */
+ }
++
++ return 0;
+ }