diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2014-05-13 06:37:19 +0000 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2014-05-13 06:37:19 +0000 |
commit | 44a03185e6b94d795013ec3b923a1130f4fb1066 (patch) | |
tree | 01a9fecefb9e902f0438a6149d7a0272c25ff18a /games-misc | |
parent | Add sys-freebsd/freebsd-ubin. #509154 (diff) | |
download | gentoo-2-44a03185e6b94d795013ec3b923a1130f4fb1066.tar.gz gentoo-2-44a03185e6b94d795013ec3b923a1130f4fb1066.tar.bz2 gentoo-2-44a03185e6b94d795013ec3b923a1130f4fb1066.zip |
Fix patch file as per Bug #507932
Migrate to EAPI=4
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0145142D)
Diffstat (limited to 'games-misc')
-rw-r--r-- | games-misc/c++robots/ChangeLog | 7 | ||||
-rw-r--r-- | games-misc/c++robots/c++robots-0.ebuild | 11 | ||||
-rw-r--r-- | games-misc/c++robots/files/proper-coding.patch | 95 |
3 files changed, 11 insertions, 102 deletions
diff --git a/games-misc/c++robots/ChangeLog b/games-misc/c++robots/ChangeLog index 39abe761e8d1..edda05fd9545 100644 --- a/games-misc/c++robots/ChangeLog +++ b/games-misc/c++robots/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for games-misc/c++robots # Copyright 2002-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-misc/c++robots/ChangeLog,v 1.9 2014/04/17 19:17:30 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-misc/c++robots/ChangeLog,v 1.10 2014/05/13 06:37:18 tupone Exp $ + + 13 May 2014; Tupone Alfredo <tupone@gentoo.org> c++robots-0.ebuild, + files/proper-coding.patch: + Fix patch file as per Bug #507932 by Ulrich Muller + Migrate to EAPI=4 17 Apr 2014; Ulrich Müller <ulm@gentoo.org> c++robots-0.ebuild: Update LICENSE, BSD according to LICENSE file, bug 505858. diff --git a/games-misc/c++robots/c++robots-0.ebuild b/games-misc/c++robots/c++robots-0.ebuild index 54529c11d72c..a3d05c76e605 100644 --- a/games-misc/c++robots/c++robots-0.ebuild +++ b/games-misc/c++robots/c++robots-0.ebuild @@ -1,7 +1,8 @@ # Copyright 1999-2014 Gentoo Foundation # 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.9 2014/04/17 19:17:30 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-misc/c++robots/c++robots-0.ebuild,v 1.10 2014/05/13 06:37:18 tupone Exp $ +EAPI=4 inherit eutils games DESCRIPTION="ongoing 'King of the Hill' (KotH) tournament" @@ -15,20 +16,18 @@ IUSE="static" S=${WORKDIR}/${PN} -src_unpack() { - unpack ${A} - cd "${S}" +src_prepare() { epatch "${FILESDIR}/proper-coding.patch" } src_compile() { local myldflags="${LDFLAGS}" use static && myldflags="${myldflags} -static" - emake CFLAGS="${CFLAGS}" LDFLAGS="${myldflags}" || die "emake failed" + emake CFLAGS="${CFLAGS}" LDFLAGS="${myldflags}" } src_install() { - dogamesbin combat cylon target tracker || die "dogamesbin failed" + dogamesbin combat cylon target tracker dodoc README prepgamesdirs } diff --git a/games-misc/c++robots/files/proper-coding.patch b/games-misc/c++robots/files/proper-coding.patch index 3df36a153758..f54af0389079 100644 --- a/games-misc/c++robots/files/proper-coding.patch +++ b/games-misc/c++robots/files/proper-coding.patch @@ -49,98 +49,3 @@ - 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; - } |