summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-puzzle/tetrinet
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-puzzle/tetrinet')
-rw-r--r--games-puzzle/tetrinet/Manifest1
-rw-r--r--games-puzzle/tetrinet/files/tetrinet-0.11-build.patch84
-rw-r--r--games-puzzle/tetrinet/files/tetrinet-0.11-no-ipv6.patch11
-rw-r--r--games-puzzle/tetrinet/metadata.xml5
-rw-r--r--games-puzzle/tetrinet/tetrinet-0.11.ebuild36
5 files changed, 137 insertions, 0 deletions
diff --git a/games-puzzle/tetrinet/Manifest b/games-puzzle/tetrinet/Manifest
new file mode 100644
index 000000000000..b6980a579478
--- /dev/null
+++ b/games-puzzle/tetrinet/Manifest
@@ -0,0 +1 @@
+DIST tetrinet-0.11.tar.bz2 38607 SHA256 a7a32da072d0a7bb9f1a61ced5641336924c314692ed8ac3394147f3716b972c SHA512 8123a8c50a3c1b6326d3209272a60c8050afd2a9eb455814fd676d8c4de922f8b81a88df9e4825d1ff5e0c8b8a7ac46ebe9ce68994587f829e047a3d889880fa WHIRLPOOL c0331f1fb42560a46711c6545f0df4b2bdca7bc1694a0c3ff0f1fc14f4cd483dc13b993b8488909eff9ddc94cc7b8c7ed93da64227bfe70dd6da1afeefb2fea1
diff --git a/games-puzzle/tetrinet/files/tetrinet-0.11-build.patch b/games-puzzle/tetrinet/files/tetrinet-0.11-build.patch
new file mode 100644
index 000000000000..0540b7bc8ce9
--- /dev/null
+++ b/games-puzzle/tetrinet/files/tetrinet-0.11-build.patch
@@ -0,0 +1,84 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,4 @@
+-CC = cc
+-
+-CFLAGS = -O2 -I/usr/include/ncurses -DHAVE_IPV6 -g -Wall
++CFLAGS += -I/usr/include/ncurses -g -Wall
+ OBJS = sockets.o tetrinet.o tetris.o tty.o xwin.o
+
+ ### If you want to have -server tetrinet client option, comment the two lines
+@@ -24,10 +22,10 @@
+ ########
+
+ tetrinet: $(OBJS)
+- $(CC) -o $@ $(OBJS) -lncurses
++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(shell ${PKG_CONFIG} --libs ncurses)
+
+ tetrinet-server: server.c sockets.c tetrinet.c tetris.c server.h sockets.h tetrinet.h tetris.h
+- $(CC) $(CFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -DSERVER_ONLY server.c sockets.c tetrinet.c tetris.c
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $<
+--- a/sockets.c
++++ b/sockets.c
+@@ -66,7 +66,7 @@
+ if (c == 0xFF)
+ ptr--;
+ *ptr = 0;
+- if (log) {
++ if (logging) {
+ if (!logfile)
+ logfile = fopen(logname, "a");
+ if (logfile) {
+@@ -89,7 +89,7 @@
+ unsigned char c = 0xFF;
+ int n = 0;
+
+- if (log) {
++ if (logging) {
+ if (!logfile)
+ logfile = fopen(logname, "a");
+ if (logfile) {
+--- a/tetrinet.c
++++ b/tetrinet.c
+@@ -21,7 +21,7 @@
+ /*************************************************************************/
+
+ int fancy = 0; /* Fancy TTY graphics? */
+-int log = 0; /* Log network traffic to file? */
++int logging = 0; /* Log network traffic to file? */
+ char *logname; /* Log filename */
+ int windows_mode = 0; /* Try to be just like the Windows version? */
+ int noslide = 0; /* Disallow piece sliding? */
+@@ -82,8 +82,7 @@
+ else
+ winlist[i].team = 0;
+ s++;
+- strncpy(winlist[i].name, s, sizeof(winlist[i].name)-1);
+- winlist[i].name[sizeof(winlist[i].name)] = 0;
++ snprintf(winlist[i].name, sizeof(winlist[i].name), "%s", s);
+ winlist[i].points = atoi(t);
+ if ((t = strchr(t, ';')) != NULL)
+ winlist[i].games = atoi(t+1);
+@@ -590,7 +589,7 @@
+ if (strcmp(av[i], "-fancy") == 0) {
+ fancy = 1;
+ } else if (strcmp(av[i], "-log") == 0) {
+- log = 1;
++ logging = 1;
+ i++;
+ if (i >= ac) {
+ fprintf(stderr, "Option -log requires an argument\n");
+--- a/tetrinet.h
++++ b/tetrinet.h
+@@ -74,7 +74,7 @@
+ /* Externs */
+
+ extern int fancy;
+-extern int log;
++extern int logging;
+ extern char *logname;
+ extern int windows_mode;
+ extern int noslide;
diff --git a/games-puzzle/tetrinet/files/tetrinet-0.11-no-ipv6.patch b/games-puzzle/tetrinet/files/tetrinet-0.11-no-ipv6.patch
new file mode 100644
index 000000000000..addfd9a0047c
--- /dev/null
+++ b/games-puzzle/tetrinet/files/tetrinet-0.11-no-ipv6.patch
@@ -0,0 +1,11 @@
+--- a/sockets.c
++++ b/sockets.c
+@@ -188,7 +188,7 @@
+ return -1;
+ }
+ if (ipbuf)
+- memcpy(retbuf, &sa.sin_addr, 4);
++ memcpy(ipbuf, &sa.sin_addr, 4);
+ #endif
+
+ return sock;
diff --git a/games-puzzle/tetrinet/metadata.xml b/games-puzzle/tetrinet/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/games-puzzle/tetrinet/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>
diff --git a/games-puzzle/tetrinet/tetrinet-0.11.ebuild b/games-puzzle/tetrinet/tetrinet-0.11.ebuild
new file mode 100644
index 000000000000..e3fa5718926c
--- /dev/null
+++ b/games-puzzle/tetrinet/tetrinet-0.11.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic games 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 ppc x86"
+IUSE="ipv6"
+
+RDEPEND=">=sys-libs/ncurses-5"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-no-ipv6.patch \
+ "${FILESDIR}"/${P}-build.patch
+
+ use ipv6 && append-cflags -DHAVE_IPV6
+ tc-export PKG_CONFIG
+}
+
+src_install() {
+ dogamesbin tetrinet tetrinet-server
+ dodoc README TODO tetrinet.txt
+ prepgamesdirs
+}