summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Sokolov <sokolov@google.com>2020-09-12 22:22:15 +0100
committerConrad Kostecki <conikost@gentoo.org>2020-09-20 23:34:24 +0200
commit354a137aa65056969227cb7573d61682889c2c56 (patch)
tree6102e3e3b67851d47aed34547e8c5dcb02205011 /games-puzzle/tetrinet
parentsys-devel/clang-runtime: x86 stable (bug #742974) (diff)
downloadgentoo-354a137aa65056969227cb7573d61682889c2c56.tar.gz
gentoo-354a137aa65056969227cb7573d61682889c2c56.tar.bz2
gentoo-354a137aa65056969227cb7573d61682889c2c56.zip
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@asokolov.org> Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'games-puzzle/tetrinet')
-rw-r--r--games-puzzle/tetrinet/files/tetrinet-0.11-fnocommon.patch11
-rw-r--r--games-puzzle/tetrinet/tetrinet-0.11-r2.ebuild37
2 files changed, 48 insertions, 0 deletions
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 000000000000..e64fe5c62d06
--- /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 000000000000..424e841be087
--- /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
+}