summaryrefslogtreecommitdiff
path: root/games-arcade/spacerider
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/spacerider')
-rw-r--r--games-arcade/spacerider/Manifest8
-rw-r--r--games-arcade/spacerider/files/spacerider-0.13-font.patch14
-rw-r--r--games-arcade/spacerider/files/spacerider-0.13-gcc41.patch10
-rw-r--r--games-arcade/spacerider/files/spacerider-0.13-gcc49.patch22
-rw-r--r--games-arcade/spacerider/files/spacerider-0.13-gentoo.patch27
-rw-r--r--games-arcade/spacerider/files/spacerider-0.13-ovflfix.patch11
-rw-r--r--games-arcade/spacerider/metadata.xml11
-rw-r--r--games-arcade/spacerider/spacerider-0.13-r1.ebuild44
8 files changed, 147 insertions, 0 deletions
diff --git a/games-arcade/spacerider/Manifest b/games-arcade/spacerider/Manifest
new file mode 100644
index 000000000000..11d28caf20db
--- /dev/null
+++ b/games-arcade/spacerider/Manifest
@@ -0,0 +1,8 @@
+AUX spacerider-0.13-font.patch 409 BLAKE2B e01077b6e2fafd317618218b54596036928c36812043976610f9109205aefb497f5b47ab814fe89e17ca0d1f191c2f78017d9c2c06518b78788d002a702d17ea SHA512 efbb6b47b19dcc653b380eaabfd817518887cc77aadb54e9dcfb7dc9c37e3a91c156eab7076eea90ffee698c1b9d1ac745a1638e023d35778eb35482d8f8dec5
+AUX spacerider-0.13-gcc41.patch 468 BLAKE2B 0c3b75a8a573ecacf808bb597429ca12ca59501b58bbf2aa73f64ce150a594659184ff32ff88770ea038eac232936491c750e75be81611ce8cd91910007a8922 SHA512 0cbd0c0003554bf90d8261af1c5db1617489bc5427b1e52caa0d56350df07939f007ba035cbdbb209176e3bbcec125c9171714631400ad5cad2323b8059f0765
+AUX spacerider-0.13-gcc49.patch 775 BLAKE2B 4b77bee14741fc4258d0fb3e8af69e9cceff2ac3886f97acab65c1e84dad27ccfc602aa0fb4d535b91d2c1947fc5adc1671cc725799e88ac60d78a01ebf791a5 SHA512 6ef7af29e88365fe3e34517ae6ee193a9b3765c77ecc883c8a34480c1944900388a9f89ca253031f673adae9552ff68eac5ec5af2203beff6835005a3f23bfb3
+AUX spacerider-0.13-gentoo.patch 737 BLAKE2B 7660dd666c6a838b7a8b64cd173f1a5dc7393163a42c2cdb919a8c719600e3cbb1b08ee2230f2d4675fa9702cf56ad556337eccee0fd66c3b82ef012aa641a47 SHA512 89bcf2565833ab462fdcdd16a97a5a339dcb82ad7e685754dfc3dca5c37093c10c787615338791c62b431222734953b2add3545fa41812ea0c6f63f7c02ce267
+AUX spacerider-0.13-ovflfix.patch 347 BLAKE2B 977a25efb7badce88c80f4ee5c68768910aa2139b94f3cd56ee996aac26053c749eea7d671f5bf02d055251060f3f9536493de513f79c617e96a1db4f8b90c91 SHA512 227d519c51555fa99a162e2abc939b53feb0abc817667c5b2edc502ff6e7265a0f86a750498dbed5f0741f7d5e6840b86c0421fc7770b10a7ac862cdaafb1af1
+DIST spacerider-0.13.tar.bz2 283861 BLAKE2B 89687ca24a663addb81af0c775201e1a57e6d524e9fb99766d4003a4401dc406e50c8d103600c57c7d4b30ee620b3ec60089f05aaa4e0ad9da72a6f5e64fd527 SHA512 4f8d506abfe242039247d5c4e43c012ded14f3b18de710aea0c9c6d933cb60fde3116008723d44acadd490b3666e107506fad6ee027d2b31c47d118185e0c03e
+EBUILD spacerider-0.13-r1.ebuild 1049 BLAKE2B 0855a5400194c53dc8d5bd7984feaf491feecd192f64c64fe8357eca3bc00ae7108beff6c2d294498102b1145ee86b34be58aa31581095b5ddf688c6cafbed59 SHA512 916debef11bf13ee5eda029b5c067525a94baafd7b72308884ebd2c76259ff3ecf6dcd6725aad7c0dbaf9383aad0b1293d08bbddbfc06a0f5e556242b21e8fa6
+MISC metadata.xml 357 BLAKE2B 92788e73f724c0a4de633ee3b5a4f4b07c487b82de01a57ef7d2829b5f3f75617eda10727e8499f3d243360a7afcec28427e495f72d2ba48d6e32893865d3a33 SHA512 51a7291b12ee0c0f12cf55a0d24d8e2dd3cf44f9ef2023caa9c457b659dc677a9882512472525073c17717a7f56180c94a88a40d3db2d33bd843e31ca862739d
diff --git a/games-arcade/spacerider/files/spacerider-0.13-font.patch b/games-arcade/spacerider/files/spacerider-0.13-font.patch
new file mode 100644
index 000000000000..87732a106633
--- /dev/null
+++ b/games-arcade/spacerider/files/spacerider-0.13-font.patch
@@ -0,0 +1,14 @@
+Ugly brute-force method for avoiding a double-free segfault on exit.
+Better patch welcome.
+
+--- a/spacerider.cpp.orig 2015-03-31 23:24:17.770966147 -0400
++++ b/spacerider.cpp 2015-03-31 23:24:41.592174463 -0400
+@@ -306,8 +306,6 @@
+ /* free screen */
+ SDL_FreeSurface(screen);
+ }
+- /* call the TTF-Library cleanup function */
+- TTF_Quit();
+
+ /* call the NET-Library cleanup function */
+ SDLNet_Quit();
diff --git a/games-arcade/spacerider/files/spacerider-0.13-gcc41.patch b/games-arcade/spacerider/files/spacerider-0.13-gcc41.patch
new file mode 100644
index 000000000000..e5524b6e6430
--- /dev/null
+++ b/games-arcade/spacerider/files/spacerider-0.13-gcc41.patch
@@ -0,0 +1,10 @@
+--- a/spacerider.cpp.old 2007-02-18 11:25:38.000000000 +0100
++++ b/spacerider.cpp 2007-02-18 11:27:00.000000000 +0100
+@@ -17,6 +17,7 @@
+ #include <unistd.h>
+ }
+
++int send_score_thread(void *param);
+
+ Spacerider::Spacerider(const int argc, char *argv[]) : fullscreen(FULLSCREEN), game_over(false), online_highscore(ONLINE_HIGHSCORE), score_sent(false), name_input(true), highscore_thread_started(false), scroll(0), last_enemy(0), score(0), lives(LIVES), fps(FPS)
+ {
diff --git a/games-arcade/spacerider/files/spacerider-0.13-gcc49.patch b/games-arcade/spacerider/files/spacerider-0.13-gcc49.patch
new file mode 100644
index 000000000000..b4d5ca6d5764
--- /dev/null
+++ b/games-arcade/spacerider/files/spacerider-0.13-gcc49.patch
@@ -0,0 +1,22 @@
+--- a/effect.cpp.orig 2015-03-31 22:36:53.336131373 -0400
++++ b/effect.cpp 2015-03-31 22:37:04.359755281 -0400
+@@ -18,7 +18,7 @@
+ void Effect::add(const int x, const int y)
+ {
+ object_struct *effect;
+- if((effect = add_object(x, y)) == NULL)
++ if((effect = add_object(x, y, 0, 0)) == NULL)
+ {
+ return;
+ }
+--- a/object.h.orig 2015-03-31 22:35:22.939214561 -0400
++++ b/object.h 2015-03-31 22:37:19.654233441 -0400
+@@ -172,7 +172,7 @@
+ return object->next;
+ }
+
+-template <class T>struct Object<T>::object_struct *Object<T>::add_object(const int x, const int y, const int speedx = 0, const int speedy = 0)
++template <class T>struct Object<T>::object_struct *Object<T>::add_object(const int x, const int y, const int speedx, const int speedy)
+ {
+ object_struct *object;
+
diff --git a/games-arcade/spacerider/files/spacerider-0.13-gentoo.patch b/games-arcade/spacerider/files/spacerider-0.13-gentoo.patch
new file mode 100644
index 000000000000..ecfdcc513cd0
--- /dev/null
+++ b/games-arcade/spacerider/files/spacerider-0.13-gentoo.patch
@@ -0,0 +1,27 @@
+--- a/Makefile
++++ b/Makefile
+@@ -3,12 +3,12 @@
+ BINDIR=/usr/bin/
+ MANDIR=/usr/share/man/man1/
+ DATADIR=/usr/share/games/spacerider/
+-CXX=g++
++CXX?=g++
+ CP=cp
+ MKDIR=mkdir -p
+ INSTALL=install
+ RM=rm -f
+-CXXFLAGS=-Wall -fomit-frame-pointer -O3 `sdl-config --cflags`
++CXXFLAGS+=$(shell sdl-config --cflags)
+ OBJS=main.o globals.o spacerider.o music.o sprite.o enemy.o effect.o visible.o box.o features.o font.o image.o bullet.o
+ OUTPUT=spacerider
+ LIBS=`sdl-config --libs` -lSDL_image -lSDL_ttf -lSDL_mixer -lSDL_net -lSDL_gfx
+@@ -22,8 +22,7 @@
+
+
+ $(OUTPUT): $(OBJS)
+- $(CXX) $(CXXFLAGS) -o $(OUTPUT) $(OBJS) $(LIBS)
+- strip $(OUTPUT)
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(OUTPUT) $(OBJS) $(LIBS)
+
+ %.o: %.cpp
+ $(CXX) $(CXXFLAGS) -c $<
diff --git a/games-arcade/spacerider/files/spacerider-0.13-ovflfix.patch b/games-arcade/spacerider/files/spacerider-0.13-ovflfix.patch
new file mode 100644
index 000000000000..c590400f649f
--- /dev/null
+++ b/games-arcade/spacerider/files/spacerider-0.13-ovflfix.patch
@@ -0,0 +1,11 @@
+--- a/spacerider.cpp.old 2010-10-29 10:12:19.000000000 +0200
++++ b/spacerider.cpp 2010-10-29 10:13:47.000000000 +0200
+@@ -112,7 +112,7 @@
+ break;
+ case 'n':
+ /* specify a name for the online-highscore */
+- strncpy(name, optarg, 128);
++ strncpy(name, optarg, sizeof (name));
+ online_highscore = true;
+ break;
+ case 't':
diff --git a/games-arcade/spacerider/metadata.xml b/games-arcade/spacerider/metadata.xml
new file mode 100644
index 000000000000..6d3980e569e5
--- /dev/null
+++ b/games-arcade/spacerider/metadata.xml
@@ -0,0 +1,11 @@
+<?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">
+spacerider is a space-shooter written in C++, using the SDL.
+</longdescription>
+</pkgmetadata>
diff --git a/games-arcade/spacerider/spacerider-0.13-r1.ebuild b/games-arcade/spacerider/spacerider-0.13-r1.ebuild
new file mode 100644
index 000000000000..8cf24d976f7d
--- /dev/null
+++ b/games-arcade/spacerider/spacerider-0.13-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Space-shooter written in C++, using the SDL"
+HOMEPAGE="http://www.hackl.dhs.org/spacerider/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2" # stupid php script
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+ media-libs/sdl-gfx
+ media-libs/sdl-mixer
+ media-libs/sdl-image[jpeg]
+ media-libs/sdl-net
+ media-libs/sdl-ttf"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}/${P}"-gentoo.patch \
+ "${FILESDIR}/${P}"-gcc41.patch \
+ "${FILESDIR}"/${P}-ovflfix.patch \
+ "${FILESDIR}"/${P}-gcc49.patch \
+ "${FILESDIR}"/${P}-font.patch
+ sed -i \
+ -e "s:/usr/share/games/spacerider:/usr/share/${PN}:" \
+ globals.cpp || die
+}
+
+src_install() {
+ dobin ${PN}
+ insinto "/usr/share/${PN}"
+ doins -r data
+ einstalldocs
+ newman ${PN}.{1,6}
+ newicon data/sprites/star_monster1/1.bmp ${PN}.bmp
+ make_desktop_entry ${PN} Spacerider /usr/share/pixmaps/${PN}.bmp
+}