games-action/xbomber: fix building with clang
authorAustin English <wizardedit@gentoo.org>
Wed, 13 Jul 2016 17:27:27 +0000 (12:27 -0500)
committerAustin English <wizardedit@gentoo.org>
Wed, 27 Jul 2016 16:09:43 +0000 (11:09 -0500)
Also remove deprecated games eclass

Also update to EAPI 6

Gentoo-Bug: https://bugs.gentoo.org/574082
Gentoo-Bug: https://bugs.gentoo.org/588772

Package-Manager: portage-2.3.0

games-action/xbomber/files/xbomber-101-clang.patch [new file with mode: 0644]
games-action/xbomber/files/xbomber-101-gcc4.patch
games-action/xbomber/files/xbomber-101-ldflags.patch
games-action/xbomber/files/xbomber-101-va_list.patch
games-action/xbomber/xbomber-101-r1.ebuild [new file with mode: 0644]

diff --git a/games-action/xbomber/files/xbomber-101-clang.patch b/games-action/xbomber/files/xbomber-101-clang.patch
new file mode 100644 (file)
index 0000000..1771f15
--- /dev/null
@@ -0,0 +1,123 @@
+--- a/bomber.c 2016-07-13 16:35:34.596802964 -0500
++++ b/bomber.c 2016-07-13 16:40:43.110797439 -0500
+@@ -350,7 +350,7 @@
+                       inform1(i);
+ }
+ 
+-networktraffic()
++void networktraffic()
+ {
+ int i,j,k;
+ int length;
+@@ -1252,7 +1252,7 @@
+       }
+ }
+ 
+-addsprite(int x,int y,figure *fig)
++void addsprite(int x,int y,figure *fig)
+ {
+ sprite *sp;
+       if(spritesused==MAXSPRITES) return;
+@@ -1262,7 +1262,7 @@
+       sp->ypos=y;
+       sp->fig=fig;
+ }
+-adddamage(int xpos,int ypos,int xsize,int ysize)
++void adddamage(int xpos,int ypos,int xsize,int ysize)
+ {
+ damage *dm;
+       if(damageused==MAXDAMAGES) return;
+@@ -1375,7 +1375,7 @@
+       return (y>>FRACTION)+arraystarty;
+ }
+ 
+-int trymove(player *pl,int dx,int dy)
++void trymove(player *pl,int dx,int dy)
+ {
+ int wx,wy;
+ int sx,sy;
+@@ -1520,7 +1520,7 @@
+       }
+ }
+ 
+-doplayer(player *pl)
++void doplayer(player *pl)
+ {
+ int last;
+ int color;
+@@ -1640,7 +1640,7 @@
+ 8,14,4,
+ };
+ 
+-initplayers()
++void initplayers()
+ {
+ int i;
+ unsigned char *p;
+@@ -1794,7 +1794,7 @@
+       copyup();
+ }
+ 
+-pulseon()
++void pulseon()
+ {
+       if(havepulse) return;
+       havepulse=1;
+@@ -1803,7 +1803,7 @@
+       thandler(0);
+       setitimer(ITIMER_REAL,&itval,NULL);
+ }
+-pulseoff()
++void pulseoff()
+ {
+       if(!havepulse) return;
+       havepulse=0;
+@@ -2235,7 +2235,7 @@
+ failure(char *str,...)
+ {
+       gamemode=0;
+-      return;
++      return 1;
+ }
+ drawmode3()
+ {
+@@ -2261,7 +2261,7 @@
+ }
+ 
+ 
+-domode3()
++void domode3()
+ {
+ int size;
+ int i,j;
+@@ -2351,7 +2351,7 @@
+ 
+       gamemode=0;
+ }
+-domode4()
++void domode4()
+ {
+ unsigned char querystr[16];
+ long now;
+--- a/bomber.h 2016-07-13 16:35:34.596802964 -0500
++++ b/bomber.h 2016-07-13 16:40:26.797797731 -0500
+@@ -210,6 +210,8 @@
+ extern void scrprintf(char *str, ...);
+ extern int textx,texty,fontxsize,fontysize;
+ extern void texthome(void);
++extern void adddamage(int xpos,int ypos,int xsize,int ysize);
++extern void addsprite(int x,int y,figure *fig);
+ 
+ extern unsigned char field[32][32];
+ extern void *info[32][32];
+--- a/sound.c  2016-07-13 16:35:34.596802964 -0500
++++ b/sound.c  2016-07-13 16:40:57.702797177 -0500
+@@ -44,7 +44,7 @@
+ 
+ 
+ 
+-soundinit(char *name)
++void soundinit(char *name)
+ {
+ int fd[2];
+ char devname[256];
index 8a5a063c61453d0c862d1953f396568959d40102..0ee82d81801bc96ee69b446592ae1a6fac70bd49 100644 (file)
@@ -1,5 +1,5 @@
---- bomber.c.old       2006-01-28 12:06:34.000000000 -0700
-+++ bomber.c   2006-01-28 12:06:46.000000000 -0700
+--- a/bomber.c 2006-01-28 12:06:34.000000000 -0700
++++ b/bomber.c 2006-01-28 12:06:46.000000000 -0700
 @@ -1699,7 +1699,7 @@
  }
  void addtail(void *header,void *entry)
index ebde16412b530ec27ed2981b86138338c5bd1f42..a0bf2f89d735750a47771454c06b5a84b32a147e 100644 (file)
@@ -1,5 +1,5 @@
---- Makefile.old       2010-10-19 09:17:43.000000000 +0200
-+++ Makefile   2010-10-19 09:18:12.000000000 +0200
+--- a/Makefile 2010-10-19 09:17:43.000000000 +0200
++++ b/Makefile 2010-10-19 09:18:12.000000000 +0200
 @@ -1,10 +1,8 @@
 -CFLAGS        = -O3
 -
index cd15b84b00e3dd69b224b90d85de426d221bd7a7..5a1691a65ad8e8ce98c1057c3cb52c3edb448375 100644 (file)
@@ -1,5 +1,5 @@
---- bomber.c.orig      2005-11-06 16:50:04.000000000 +0100
-+++ bomber.c   2005-11-06 16:47:35.000000000 +0100
+--- a/bomber.c 2005-11-06 16:50:04.000000000 +0100
++++ b/bomber.c 2005-11-06 16:47:35.000000000 +0100
 @@ -1,5 +1,6 @@
  #include <stdio.h>
  #include <stdlib.h>
diff --git a/games-action/xbomber/xbomber-101-r1.ebuild b/games-action/xbomber/xbomber-101-r1.ebuild
new file mode 100644 (file)
index 0000000..d8343c2
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="Bomberman clone w/multiplayer support"
+HOMEPAGE="http://www.xdr.com/dash/bomber.html"
+SRC_URI="http://www.xdr.com/dash/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="x11-libs/libX11"
+RDEPEND=${DEPEND}
+
+PATCHES=(
+               "${FILESDIR}"/${P}-va_list.patch
+               "${FILESDIR}"/${P}-gcc4.patch
+               "${FILESDIR}"/${P}-ldflags.patch
+               "${FILESDIR}"/${P}-clang.patch
+)
+
+src_prepare() {
+       sed -i \
+               -e "/^CC/d" \
+               -e 's/gcc/$(CC)/g' \
+               -e "s:X386:X11R6:" \
+               Makefile || die
+
+       # ${P}-ldflags.patch depends on the munged Makefile
+       default
+
+       sed -i \
+               -e "s:data/%s:/usr/share/${PN}/%s:" bomber.c || die
+       sed -i \
+               -e "s:=\"data\":=\"/usr/share/${PN}\":" sound.c || die
+}
+
+src_install() {
+       dobin matcher bomber
+       insinto /usr/share/${PN}
+       doins -r data/*
+       dodoc README Changelog
+}