summaryrefslogtreecommitdiff
path: root/games-arcade/snake3d
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-arcade/snake3d
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-arcade/snake3d')
-rw-r--r--games-arcade/snake3d/Manifest5
-rw-r--r--games-arcade/snake3d/files/snake3d-0.9-amd64.patch37
-rw-r--r--games-arcade/snake3d/files/snake3d-0.9-build.patch24
-rw-r--r--games-arcade/snake3d/metadata.xml16
-rw-r--r--games-arcade/snake3d/snake3d-0.9.ebuild38
5 files changed, 120 insertions, 0 deletions
diff --git a/games-arcade/snake3d/Manifest b/games-arcade/snake3d/Manifest
new file mode 100644
index 000000000000..cd14d5cbd501
--- /dev/null
+++ b/games-arcade/snake3d/Manifest
@@ -0,0 +1,5 @@
+AUX snake3d-0.9-amd64.patch 860 BLAKE2B 49aa7d5647f603b6c8606e44ae847b3271f49c045a42bd68bada1b2d1ae403c015fdff22e2f41e74a902b1e7d6c4eef85f628d9a8ddbce69f25e6413ca440da4 SHA512 a7012bc3742e90c2c78a2f56a54f1a162a0840d31189f96557d267448076d653d2f68666634e2faa489dbe01d2a6c49fe786017aa21c7622c7be84c3d9b91a74
+AUX snake3d-0.9-build.patch 881 BLAKE2B 131b30c31b00bb3f736241d322d5204fc7b97ff67ba0da6bed04625f3abcf9d213873de763e971d68cff530ba4e80a0b9719e56d1504fe8dbf3c882bbb573fd7 SHA512 dc26cf5102f59c2ab8fcf54a2b91262dad4639236a8acdc4cfb879f211625d2fb9e1bbb9b62eb74f9c0d9c023ca63106535e200ff8cb4914a7e9b9444fc4563a
+DIST snake3d-0.9.tar.gz 62900 BLAKE2B 8520ddf52705cf086374c707f319fef5f3d9d964a05f367da8aab19c46f4f8e42947e104cdc4f3d7db20901308d995470f29a840af22500fd6c4c4d2ab7a301b SHA512 2bc2d3e68fd782d58c5f702727a8a72fb67096e7ff78e1e00f3a79767bad627fe3a2ceec05a621e8d5b4b3ba009a01814c93b7d21f180512b13411bf61ac1065
+EBUILD snake3d-0.9.ebuild 733 BLAKE2B 386654ee29beca8ceb1ce4067faf02c2adfa83ed38c615cf1f1e7d0ed717a1b6f602092eb6c4ec4f7b2220f92d7fcdae1b963ba242fbb90b10c5f2844b211baa SHA512 bfc0509ba04abc50ce5b2c2881d6678a8d74420b386b9d1299b69697575a4c3c700dc69dd3cdcd3d187275b0eb8a4750722bebb612d5899ef3e972f1b15bcdcf
+MISC metadata.xml 608 BLAKE2B 293c3db365ab9938fab9796ea2caf9498f33007e10fcd6561a40edfa4c5a72902be3d786a89d6412d61ad4357abe96d9ab477fe47115119644d79fa478747999 SHA512 38171efa331066de83f6fc6933ea805ce19ad8467dc9d06759ff1630cbff1de8d61069723bd481752a16a5399fe324c6d7c36d805778b0ac2939ead2150bf802
diff --git a/games-arcade/snake3d/files/snake3d-0.9-amd64.patch b/games-arcade/snake3d/files/snake3d-0.9-amd64.patch
new file mode 100644
index 000000000000..d2b5f2c79acd
--- /dev/null
+++ b/games-arcade/snake3d/files/snake3d-0.9-amd64.patch
@@ -0,0 +1,37 @@
+--- src/functions.cpp.old 2007-03-31 11:04:10.000000000 +0200
++++ src/functions.cpp 2007-03-31 11:11:52.000000000 +0200
+@@ -107,8 +107,8 @@
+ pointer = end;
+ }
+
+- memcpy(str, i, (int)pointer - (int)i);
+- str[(int)pointer - (int)i] = 0;
++ memcpy(str, i, ssize_t(pointer - i));
++ str[pointer - i] = 0;
+
+ drawString(x, y, str);
+
+@@ -501,15 +501,21 @@
+
+ Uint32 timer(Uint32 interval, void* value) {
+
++ union {
++ void *value;
++ int p_mode;
++ } p_modeConv;
++ p_modeConv.value = value;
++
+ //if ((int)value != gameModeValue)
+- if ((int)value != p_mode)
++ if (p_modeConv.p_mode != p_mode)
+ return 0;
+
+ SDL_Event event;
+ SDL_UserEvent userevent;
+
+ userevent.type = SDL_USEREVENT;
+- userevent.code = (int)value;
++ userevent.code = p_modeConv.p_mode;
+ userevent.data1 = NULL;
+ userevent.data2 = NULL;
+
diff --git a/games-arcade/snake3d/files/snake3d-0.9-build.patch b/games-arcade/snake3d/files/snake3d-0.9-build.patch
new file mode 100644
index 000000000000..f7d8c4404df4
--- /dev/null
+++ b/games-arcade/snake3d/files/snake3d-0.9-build.patch
@@ -0,0 +1,24 @@
+--- src/Makefile
++++ src/Makefile
+@@ -1,10 +1,10 @@
+ OBJ = board.o snake.o game.o menu.o snake3d.o global.o consts.o cube.o functions.o preferences.o rooms2.o network.o userInput.o server.o packets.o client.o classic2d.o
+-CXXFLAGS = -g -Wall -I/usr/X11R6/include/ `sdl-config --cflags`
++CXXFLAGS += -Wall $(shell sdl-config --cflags)
+ CXX = g++
+ CC = g++
+ #LDFLAGSMAC = -framework GLUT -framework OpenGL -framework Cocoa -bind_at_load -L/sw/lib/ -lSDL -lSDLmain
+ LDFLAGSMAC = `sdl-config --libs` -framework GLUT -framework OpenGL -lSDL_net
+-LDFLAGS = -L/usr/X11R6/lib/ -lGL -lglut -lGLU -lSDL -lSDL_net
++LIBS = -lGL -lglut -lGLU $(shell sdl-config --libs) -lSDL_net
+
+ all: snake3d
+
+@@ -18,7 +18,7 @@
+ g++ $(LDFLAGSMAC) $(OBJ) -o ../snake3d
+
+ snake3d.linux: $(OBJ)
+- g++ $(LDFLAGS) $(OBJ) -o ../snake3d
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o ../snake3d
+
+
+ clean:
diff --git a/games-arcade/snake3d/metadata.xml b/games-arcade/snake3d/metadata.xml
new file mode 100644
index 000000000000..261d7fab00c9
--- /dev/null
+++ b/games-arcade/snake3d/metadata.xml
@@ -0,0 +1,16 @@
+<?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>
+ <longdescription lang="en">
+snake3d is a variant of the snake game. You are a snake in a 3d world trying to
+eat as many icosahedrons as possible, which makes your tail longer. There are
+other snakes (network players) in the world which will try to fail you.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">worms3d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-arcade/snake3d/snake3d-0.9.ebuild b/games-arcade/snake3d/snake3d-0.9.ebuild
new file mode 100644
index 000000000000..57db6998ed0b
--- /dev/null
+++ b/games-arcade/snake3d/snake3d-0.9.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs games
+
+DESCRIPTION="variant of the snake game"
+HOMEPAGE="https://sourceforge.net/projects/worms3d/"
+SRC_URI="mirror://sourceforge/worms3d/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/sdl-net
+ virtual/opengl
+ media-libs/freeglut
+ virtual/glu
+ media-libs/libsdl"
+RDEPEND="${DEPEND}"
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-amd64.patch \
+ "${FILESDIR}"/${P}-build.patch
+}
+
+src_compile() {
+ emake CXX=$(tc-getCXX) -C src snake3d.linux
+}
+
+src_install() {
+ dogamesbin ${PN}
+ dodoc ChangeLog README TODO
+ prepgamesdirs
+}