summaryrefslogtreecommitdiff
path: root/games-arcade/insaneodyssey
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/insaneodyssey
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-arcade/insaneodyssey')
-rw-r--r--games-arcade/insaneodyssey/Manifest5
-rw-r--r--games-arcade/insaneodyssey/files/insaneodyssey-000311-datafiles.patch55
-rw-r--r--games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch21
-rw-r--r--games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild60
-rw-r--r--games-arcade/insaneodyssey/metadata.xml8
5 files changed, 149 insertions, 0 deletions
diff --git a/games-arcade/insaneodyssey/Manifest b/games-arcade/insaneodyssey/Manifest
new file mode 100644
index 000000000000..8445079c8599
--- /dev/null
+++ b/games-arcade/insaneodyssey/Manifest
@@ -0,0 +1,5 @@
+AUX insaneodyssey-000311-datafiles.patch 1605 BLAKE2B 2418e72f6b74dad8c00b26235ffbb8df1394d90e639994d080be3845c02f7d278c262405682d9c8ca2ac8a15b6dd5695224461fdc13f96b61dc01ea70ed20da4 SHA512 b0a7a32f5463474435e17d56169e7a5f79a624e508df8142760ba24c22625707aa409f2a5381502676a6af86b2857a2db739e36cdb2471cf4a98181e5532be8d
+AUX insaneodyssey-000311-gcc6.patch 388 BLAKE2B 4976b873e3a74992cab91d155a8ab280d689c067cbb6e66944cf8b7a4a0c82c1f0e18fab1f6c3f9339b49fd0d73ef98f4a5382bb60844afe849cde3ef5d7a99b SHA512 7f634c129bcdd1a54ec196792dbfe18b0d26823907efc92c3389b5f3280c8243cd23d8e980744673bb2cabbf7c44203e4b7ec320ebe729300566adf39d6ee1f3
+DIST io000311.tar.gz 839950 BLAKE2B 4974471c69541afcb98764a3bf7c71c72afba7e9301f540eb1af85611bada547e87b491205f9fb9ba41e6e8e52326eb5e0b4cf07bf3d02259280ea6b2e5be162 SHA512 9fbf79daf1886c31a6309036cf382c2e175e3c280d6d5aa822971e977e97227f4290474c272afd7ed8218b2cc7e66b407b37522207b30225a41488201a244d96
+EBUILD insaneodyssey-000311-r1.ebuild 1428 BLAKE2B 4abc6a58c24847da2364fa937e0bbfa752a2399e1be021dde475dcf528e3cc8706c405d9d7e99765ebd976f378e7a92399c6b750fd7a4bc4af2472cc7ad6a79b SHA512 46273e06fdddd0c40caef61f986573732a6508a398103491f6584d514af76dc8021c556439f5f3521a919df7f7debd5912590aa93695b743e4500530888c4a69
+MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118
diff --git a/games-arcade/insaneodyssey/files/insaneodyssey-000311-datafiles.patch b/games-arcade/insaneodyssey/files/insaneodyssey-000311-datafiles.patch
new file mode 100644
index 000000000000..3aab4eeaf9da
--- /dev/null
+++ b/games-arcade/insaneodyssey/files/insaneodyssey-000311-datafiles.patch
@@ -0,0 +1,55 @@
+--- a/io.cpp.orig 2004-06-01 19:11:16.000000000 +0300
++++ b/io.cpp 2004-06-01 19:21:14.000000000 +0300
+@@ -42,7 +42,11 @@
+ {
+ SDL_Surface *image, *surface;
+
+- image = IMG_Load(datafile);
++ char data_path[100];
++ strcpy(data_path, "/usr/share/games/insaneodyssey/");
++ strcat(data_path, datafile);
++
++ image = IMG_Load(data_path);
+ if ( image == NULL ) {
+ fprintf(stderr, "Couldn't load image %s\n",
+ datafile);
+@@ -67,7 +71,11 @@
+ {
+ SDL_Surface *image, *surface;
+
+- image = IMG_Load(datafile);
++ char data_path[100];
++ strcpy(data_path, "/usr/share/games/insaneodyssey/");
++ strcat(data_path, datafile);
++
++ image = IMG_Load(data_path);
+ if ( image == NULL ) {
+ fprintf(stderr, "Couldn't load image %s\n", datafile);
+ return(NULL);
+@@ -87,8 +95,12 @@
+ {
+ SDL_Surface *image;
+
++ char data_path[100];
++ strcpy(data_path, "/usr/share/games/insaneodyssey/");
++ strcat(data_path, datafile);
++
+ /* Load the BMP file into a surface */
+- image = IMG_Load(datafile);
++ image = IMG_Load(data_path);
+ if ( image == NULL ) {
+ fprintf(stderr, "Couldn't load %s: %s\n", datafile,
+ SDL_GetError());
+@@ -493,7 +493,11 @@
+ if ( fp != NULL )
+ while( !feof(fp) && j < MAXTILES )
+ {
+- fscanf ( fp, "%d %d %d\n", &tileatt[j].nexttile, &tileatt[j].bits, &tileatt[j].wait );
++ int nexttile, bits, wait;
++ fscanf(fp, "%d %d %d\n", &nexttile, &bits, &wait);
++ tileatt[j].nexttile = nexttile;
++ tileatt[j].bits = bits;
++ tileatt[j].wait = wait;
+ j++;
+ }
+ else
diff --git a/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch b/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
new file mode 100644
index 000000000000..4fd35438d24b
--- /dev/null
+++ b/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
@@ -0,0 +1,21 @@
+Bug: https://bugs.gentoo.org/600894
+
+--- a/io.cpp
++++ b/io.cpp
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <cmath>
+
+ #include <SDL/SDL.h>
+
+@@ -894,7 +895,7 @@
+ else
+ {
+ if ( jumping )
+- yspeed = -jumpheight - abs(xspeed)/4;
++ yspeed = -jumpheight - std::abs(xspeed)/4;
+ }
+
+ short TempX = (x + width/2) / TILESIZE;
diff --git a/games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild b/games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild
new file mode 100644
index 000000000000..0383afc0b2b3
--- /dev/null
+++ b/games-arcade/insaneodyssey/insaneodyssey-000311-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+DESCRIPTION="Help West Muldune escape from a futuristic mental hospital"
+HOMEPAGE="http://members.fortunecity.com/rivalentertainment/iox.html"
+# Upstream has download issues.
+#SRC_URI="http://members.fortunecity.com/rivalentertainment/io${PV}.tar.gz"
+SRC_URI="mirror://gentoo/io${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ default
+
+ cd ${PN}
+
+ # Modify data load code and paths to game data
+ eapply "${FILESDIR}"/${P}-datafiles.patch
+
+ eapply "${FILESDIR}"/${P}-gcc6.patch
+
+ sed -i \
+ -e "/lvl/s:^:/usr/share/${PN}/:" \
+ -e "s:night:/usr/share/${PN}/night:" \
+ levels.dat || die
+ sed -i \
+ -e "s:tiles.dat:/usr/share/${PN}/tiles.dat:" \
+ -e "s:sprites.dat:/usr/share/${PN}/sprites.dat:" \
+ -e "s:levels.dat:/usr/share/${PN}/levels.dat:" \
+ -e "s:IO_T:/usr/share/${PN}/IO_T:" \
+ -e "s:tiles.att:/usr/share/${PN}/tiles.att:" \
+ -e "s:shot:/usr/share/${PN}/shot:" \
+ io.cpp || die
+ sed -i \
+ -e 's:\[32:[100:' \
+ io.h || die
+}
+
+src_install() {
+ cd ${PN}
+ dobin ${PN}
+ insinto /usr/share/${PN}
+ doins *bmp *png *dat *att *lvl *wav *mod *IT
+ newicon west00r.png ${PN}.png
+ make_desktop_entry ${PN} "Insane Odyssey"
+}
diff --git a/games-arcade/insaneodyssey/metadata.xml b/games-arcade/insaneodyssey/metadata.xml
new file mode 100644
index 000000000000..78274e0fa550
--- /dev/null
+++ b/games-arcade/insaneodyssey/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>