summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle')
-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
+}