summaryrefslogtreecommitdiff
path: root/games-arcade/snake3d
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-arcade/snake3d
reinit the tree, so we can have metadata
Diffstat (limited to 'games-arcade/snake3d')
-rw-r--r--games-arcade/snake3d/Manifest7
-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.ebuild37
5 files changed, 121 insertions, 0 deletions
diff --git a/games-arcade/snake3d/Manifest b/games-arcade/snake3d/Manifest
new file mode 100644
index 000000000000..5e28d1fb4d4d
--- /dev/null
+++ b/games-arcade/snake3d/Manifest
@@ -0,0 +1,7 @@
+AUX snake3d-0.9-amd64.patch 860 SHA256 5b282bdc85808e66c65351394a6c1c08fa33766e6b9cb1d35bc53513d8e4dedf SHA512 a7012bc3742e90c2c78a2f56a54f1a162a0840d31189f96557d267448076d653d2f68666634e2faa489dbe01d2a6c49fe786017aa21c7622c7be84c3d9b91a74 WHIRLPOOL 09bea26f5b2d735b83e88e110e95d738fb1269dd2f4315d3b46f24bfb6c11f7845bd5cc9f251e8c3454a7a199b7760efbcf7ac66e81e5d6c9fbfdd9dcad9facc
+AUX snake3d-0.9-build.patch 881 SHA256 562c7dc2ddb45e8603094815747e2b2eaeeca52b662a17f2357ca161343b097c SHA512 dc26cf5102f59c2ab8fcf54a2b91262dad4639236a8acdc4cfb879f211625d2fb9e1bbb9b62eb74f9c0d9c023ca63106535e200ff8cb4914a7e9b9444fc4563a WHIRLPOOL bb20625edfd600546421576722cfe19039e34872fd6182d01cf77e8dc77bae7fede185c98f4edd6214ff732a62fe0bc83fa3511ea7193783391979df5e9eb5b6
+DIST snake3d-0.9.tar.gz 62900 SHA256 38f7a8020044f331da2b718df5ec65d9cca95eaa1866acce3ea8772ac27ec16b SHA512 2bc2d3e68fd782d58c5f702727a8a72fb67096e7ff78e1e00f3a79767bad627fe3a2ceec05a621e8d5b4b3ba009a01814c93b7d21f180512b13411bf61ac1065 WHIRLPOOL 4fb6d6d0632cfa3bc869618f616f687a5dcdc9f92f4bf03b0e73af100f32d7edee331660a88ec52679c3974cfdfc2f4974b49b0df6a050fb9d6c541ab037fe93
+EBUILD snake3d-0.9.ebuild 730 SHA256 e8b629a65c59beba5d1adbbfbaa1263f4a9ac47806c7ef5a524de11d78d281ee SHA512 27bc2c38185e3371cf5d5e5982820ea37a26d2e7bc7fea64ce10b42470a201277959eaa7436c4126ff01170f765e0e1848ad2208318387fadad153c8b3af1d0d WHIRLPOOL 698a2e0a45849a08ed44d33e5653be998df3d7d398835e5f0fcb7be7f03de8baaaa5282db7c18cea96da8775b5cd842733b2070ce7aa585e94ef1b46c06971f3
+MISC ChangeLog 2603 SHA256 409cfe3c3dab4c50fe526da8cc965be27e4b449b44ba2a4a58c966f07b3fc515 SHA512 1e89a89c7e3048f3db21768b54699075934cfc42863f1a2a3fff2865e92c74a2f302a7adea5e5cd63c868f7ccf5e63ce7d7df8aed9f768cf505ed8988c54cd9f WHIRLPOOL f0d96502bf0195180055feb469c204d4d29b7328512b252cf768dc0a52193d43dd401e0599debdb3d936bcd106e25e51af96b00ad02db873a0408ea5fba564c9
+MISC ChangeLog-2015 902 SHA256 bc3385215ec7d3b0c1dbfa21ba3fd6d8c0aaf575db2402f884cee9ae1595f4fe SHA512 449e2e71fca25d077909892ec13e1b8aaecc687125fc65091d6ed27cc3d24b8a0ede40c9a289424091e0283be29608e8e4ad8efa581842daea6dd8357e927f29 WHIRLPOOL a3e9edf4bc30eeef364bd6691cf5ab72ff4e03c95eda68cdd107e51b354b973e8698f176cb8f1a44f7c330afd75f2a5a006fffbf26c86ed313e5b1b3a6cd48e5
+MISC metadata.xml 608 SHA256 26915a8e2cfd4f66e4112b1b10ec2934c606f94158af84998de3cee363a8d5c8 SHA512 38171efa331066de83f6fc6933ea805ce19ad8467dc9d06759ff1630cbff1de8d61069723bd481752a16a5399fe324c6d7c36d805778b0ac2939ead2150bf802 WHIRLPOOL 8f0774ca6d381aea88af95ced9cdfda06cf75e21f4adceb5b3b17c2e17511a3ecd29741de04d7224f125aaa2ea88cb8cd603f4368ceaacb766c14e760e30f012
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..bfa44607f886
--- /dev/null
+++ b/games-arcade/snake3d/snake3d-0.9.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 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
+}