summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2010-07-14 17:38:21 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2010-07-14 17:38:21 +0000
commit73c014a5b04e11c0eff46b73b362b2232750d394 (patch)
treeb6546984115e4a4447266d8c1c23a289d72227d4 /games-puzzle
parentSet SUPPORT_PYTHON_ABIS. (diff)
downloadgentoo-2-73c014a5b04e11c0eff46b73b362b2232750d394.tar.gz
gentoo-2-73c014a5b04e11c0eff46b73b362b2232750d394.tar.bz2
gentoo-2-73c014a5b04e11c0eff46b73b362b2232750d394.zip
honor LDFLAGS; quiet some warnings; move sed into a patch
(Portage version: 2.1.8.3/cvs/Linux i686)
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/tetrinet/ChangeLog8
-rw-r--r--games-puzzle/tetrinet/files/tetrinet-0.11-build.patch88
-rw-r--r--games-puzzle/tetrinet/tetrinet-0.11.ebuild13
3 files changed, 99 insertions, 10 deletions
diff --git a/games-puzzle/tetrinet/ChangeLog b/games-puzzle/tetrinet/ChangeLog
index 8013cf18dc53..9ba042119ef9 100644
--- a/games-puzzle/tetrinet/ChangeLog
+++ b/games-puzzle/tetrinet/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-puzzle/tetrinet
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tetrinet/ChangeLog,v 1.10 2009/05/31 02:28:23 nyhm Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tetrinet/ChangeLog,v 1.11 2010/07/14 17:38:21 mr_bones_ Exp $
+
+ 14 Jul 2010; Michael Sterrett <mr_bones_@gentoo.org> tetrinet-0.11.ebuild,
+ +files/tetrinet-0.11-build.patch:
+ honor LDFLAGS; quiet some warnings; move sed into a patch
31 May 2009; Tristan Heaven <nyhm@gentoo.org> tetrinet-0.11.ebuild:
Fix LICENSE: as-is -> public-domain
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..719691cad4e9
--- /dev/null
+++ b/games-puzzle/tetrinet/files/tetrinet-0.11-build.patch
@@ -0,0 +1,88 @@
+diff -ru tetrinet-0.11.orig/Makefile tetrinet-0.11/Makefile
+--- tetrinet-0.11.orig/Makefile 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11/Makefile 2010-07-14 13:23:52.526003482 -0400
+@@ -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) -lncurses
+
+ 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 $<
+diff -ru tetrinet-0.11.orig/sockets.c tetrinet-0.11/sockets.c
+--- tetrinet-0.11.orig/sockets.c 2003-09-09 15:15:04.000000000 -0400
++++ tetrinet-0.11/sockets.c 2010-07-14 13:18:28.999213319 -0400
+@@ -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) {
+diff -ru tetrinet-0.11.orig/tetrinet.c tetrinet-0.11/tetrinet.c
+--- tetrinet-0.11.orig/tetrinet.c 2003-09-07 12:29:29.000000000 -0400
++++ tetrinet-0.11/tetrinet.c 2010-07-14 13:22:33.529265565 -0400
+@@ -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");
+diff -ru tetrinet-0.11.orig/tetrinet.h tetrinet-0.11/tetrinet.h
+--- tetrinet-0.11.orig/tetrinet.h 2003-09-07 12:12:51.000000000 -0400
++++ tetrinet-0.11/tetrinet.h 2010-07-14 13:18:20.061828023 -0400
+@@ -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/tetrinet-0.11.ebuild b/games-puzzle/tetrinet/tetrinet-0.11.ebuild
index bbd8ba2005ff..9232850d4fa3 100644
--- a/games-puzzle/tetrinet/tetrinet-0.11.ebuild
+++ b/games-puzzle/tetrinet/tetrinet-0.11.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tetrinet/tetrinet-0.11.ebuild,v 1.13 2009/05/31 02:28:23 nyhm Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/tetrinet/tetrinet-0.11.ebuild,v 1.14 2010/07/14 17:38:21 mr_bones_ Exp $
EAPI=2
inherit eutils flag-o-matic games
@@ -17,14 +17,11 @@ IUSE="ipv6"
DEPEND=">=sys-libs/ncurses-5"
src_prepare() {
- epatch "${FILESDIR}"/${P}-no-ipv6.patch
+ epatch \
+ "${FILESDIR}"/${P}-no-ipv6.patch \
+ "${FILESDIR}"/${P}-build.patch
use ipv6 && append-flags -DHAVE_IPV6
- sed -i \
- -e '/^CC/d' \
- -e 's/-DHAVE_IPV6//' \
- -e "s:-O2:${CFLAGS}:" Makefile \
- || die "sed Makefile failed"
}
src_install() {