commit:     354a137aa65056969227cb7573d61682889c2c56
Author:     Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Sat Sep 12 21:22:15 2020 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 21:34:24 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=354a137a

games-puzzle/tetrinet: fix build with gcc 10

Closes: https://github.com/gentoo/gentoo/pull/17513
Closes: https://bugs.gentoo.org/707264
Package-Manager: Portage-3.0.4, Repoman-2.3.23
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../tetrinet/files/tetrinet-0.11-fnocommon.patch   | 11 +++++++
 games-puzzle/tetrinet/tetrinet-0.11-r2.ebuild      | 37 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/games-puzzle/tetrinet/files/tetrinet-0.11-fnocommon.patch 
b/games-puzzle/tetrinet/files/tetrinet-0.11-fnocommon.patch
new file mode 100644
index 00000000000..e64fe5c62d0
--- /dev/null
+++ b/games-puzzle/tetrinet/files/tetrinet-0.11-fnocommon.patch
@@ -0,0 +1,11 @@
+--- a/tetris.h 2003-09-07 16:29:29.000000000 -0000
++++ b/tetris.h 2020-09-12 21:13:50.978870902 -0000
+@@ -50,7 +50,7 @@ typedef struct {
+     char shape[4][4]; /* Shape data for the piece */
+ } PieceData;
+ 
+-PieceData piecedata[7][4];
++extern PieceData piecedata[7][4];
+ 
+ extern int current_piece, current_rotation;
+ 

diff --git a/games-puzzle/tetrinet/tetrinet-0.11-r2.ebuild 
b/games-puzzle/tetrinet/tetrinet-0.11-r2.ebuild
new file mode 100644
index 00000000000..424e841be08
--- /dev/null
+++ b/games-puzzle/tetrinet/tetrinet-0.11-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Console based tetrinet inc. standalone server"
+HOMEPAGE="http://tetrinet.or.cz/";
+SRC_URI="http://tetrinet.or.cz/download/${P}.tar.bz2";
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6"
+
+RDEPEND="sys-libs/ncurses:0="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-no-ipv6.patch
+       "${FILESDIR}"/${P}-build.patch
+       "${FILESDIR}"/${P}-fnocommon.patch
+)
+
+src_prepare() {
+       default
+
+       use ipv6 && append-cflags -DHAVE_IPV6
+       tc-export CC PKG_CONFIG
+}
+
+src_install() {
+       dobin tetrinet tetrinet-server
+       dodoc README TODO tetrinet.txt
+}

Reply via email to