diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-puzzle/tetrinet | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'games-puzzle/tetrinet')
-rw-r--r-- | games-puzzle/tetrinet/Manifest | 5 | ||||
-rw-r--r-- | games-puzzle/tetrinet/files/tetrinet-0.11-build.patch | 84 | ||||
-rw-r--r-- | games-puzzle/tetrinet/files/tetrinet-0.11-no-ipv6.patch | 11 | ||||
-rw-r--r-- | games-puzzle/tetrinet/metadata.xml | 8 | ||||
-rw-r--r-- | games-puzzle/tetrinet/tetrinet-0.11-r1.ebuild | 34 |
5 files changed, 142 insertions, 0 deletions
diff --git a/games-puzzle/tetrinet/Manifest b/games-puzzle/tetrinet/Manifest new file mode 100644 index 000000000000..b9f3f7c6f804 --- /dev/null +++ b/games-puzzle/tetrinet/Manifest @@ -0,0 +1,5 @@ +AUX tetrinet-0.11-build.patch 2331 BLAKE2B a23200aff602acaf0dd6c1341a8c63b3b4d16b417478034dc46db4d90081c2910a8026d5b419e18432309ded69de64e16bcdaf4d2301767dcb1a857367eb8207 SHA512 e56a43ef53d9df84c4ba49b39ba2d77f99de1b616f9e81e105d4c49553b909f418f74cb13d431dbd658c41c99388321e0806dbeb63294817ec85f7148f2d2ae0 +AUX tetrinet-0.11-no-ipv6.patch 185 BLAKE2B 47b66d15eaf30d233a60f0c877fd03b66ad6007630c4a45c1c208cb21582add109ccfc3ca77d741214dbb5d00a4719a55556ab404420d5383e098e748f6c055b SHA512 1851623b20e2685548650d54f290a49f9572b65a2293848c0d83a6fdc1c1256ebcdd0f737b2f32f7fb4bd921aa69c17e7120cfc8acb1d8c5a97342741964890f +DIST tetrinet-0.11.tar.bz2 38607 BLAKE2B f794660b037d2605990b775a00381279eea64a361e4b66dcb9314a3f784ce77a0cfc87cea52d183fb5553f05f95b466318b6a1e98dbd735f34618964d2d901d2 SHA512 8123a8c50a3c1b6326d3209272a60c8050afd2a9eb455814fd676d8c4de922f8b81a88df9e4825d1ff5e0c8b8a7ac46ebe9ce68994587f829e047a3d889880fa +EBUILD tetrinet-0.11-r1.ebuild 698 BLAKE2B bb5f84fad0c3940b313221d36e2079c53037ae1f57ee48eb34629fe785b9329fecb32f548cf9f097b67f4b7ee5cccc7f0dba9770740c8007652a59d6adb63a95 SHA512 c61e799893a744e1a5c14ecb2d2e8445681f632c2ee618878ed929416fb0254e8c735b26203740ed26e9ae26d8c3e76256b2187aa09ca641ebe63ecd2e626963 +MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 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..78274e0fa550 --- /dev/null +++ b/games-puzzle/tetrinet/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> +</maintainer> +</pkgmetadata> diff --git a/games-puzzle/tetrinet/tetrinet-0.11-r1.ebuild b/games-puzzle/tetrinet/tetrinet-0.11-r1.ebuild new file mode 100644 index 000000000000..013dcef24a21 --- /dev/null +++ b/games-puzzle/tetrinet/tetrinet-0.11-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +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-5:0=" +DEPEND="${RDEPEND} + virtual/pkgconfig +" + +src_prepare() { + default + eapply \ + "${FILESDIR}"/${P}-no-ipv6.patch \ + "${FILESDIR}"/${P}-build.patch + + use ipv6 && append-cflags -DHAVE_IPV6 + tc-export PKG_CONFIG +} + +src_install() { + dobin tetrinet tetrinet-server + dodoc README TODO tetrinet.txt +} |