summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-05-30 07:22:24 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-05-30 07:22:24 +0000
commitb41530317a8978a811c3eeed91a54c9717539792 (patch)
treec4e97381465fdbb5e72b9fd57970dea79edb1870 /games-arcade/abe
parentmailx move (Manifest recommit) (diff)
downloadgentoo-2-b41530317a8978a811c3eeed91a54c9717539792.tar.gz
gentoo-2-b41530317a8978a811c3eeed91a54c9717539792.tar.bz2
gentoo-2-b41530317a8978a811c3eeed91a54c9717539792.zip
Initial commit - ebuild and patch from Alexandru Toma via bug #47591
Diffstat (limited to 'games-arcade/abe')
-rw-r--r--games-arcade/abe/ChangeLog10
-rw-r--r--games-arcade/abe/Manifest3
-rw-r--r--games-arcade/abe/abe-1.0.ebuild55
-rw-r--r--games-arcade/abe/files/1.0-gentoo-paths.patch88
-rw-r--r--games-arcade/abe/files/digest-abe-1.01
-rw-r--r--games-arcade/abe/metadata.xml5
6 files changed, 162 insertions, 0 deletions
diff --git a/games-arcade/abe/ChangeLog b/games-arcade/abe/ChangeLog
new file mode 100644
index 000000000000..1ee3f41ec088
--- /dev/null
+++ b/games-arcade/abe/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-arcade/abe
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/abe/ChangeLog,v 1.1 2004/05/30 07:22:24 mr_bones_ Exp $
+
+*abe-1.0 (30 May 2004)
+
+ 30 May 2004; Michael Sterrett <mr_bones_@gentoo.org> abe-1.0.ebuild,
+ metadata.xml, files/1.0-gentoo-paths.patch:
+ Initial commit - ebuild and patch from Alexandru Toma via bug #47591
+
diff --git a/games-arcade/abe/Manifest b/games-arcade/abe/Manifest
new file mode 100644
index 000000000000..e51f5bc50358
--- /dev/null
+++ b/games-arcade/abe/Manifest
@@ -0,0 +1,3 @@
+MD5 ea847e3985bda848a740225fb6b09015 abe-1.0.ebuild 1264
+MD5 aa38d7b594fae9c33a8d595f7f60f730 files/digest-abe-1.0 60
+MD5 a67caf6d55013988b16d44cdfdf8460e files/1.0-gentoo-paths.patch 3503
diff --git a/games-arcade/abe/abe-1.0.ebuild b/games-arcade/abe/abe-1.0.ebuild
new file mode 100644
index 000000000000..296dcf387e25
--- /dev/null
+++ b/games-arcade/abe/abe-1.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-arcade/abe/abe-1.0.ebuild,v 1.1 2004/05/30 07:22:24 mr_bones_ Exp $
+
+inherit eutils games
+
+MY_P="${P/./_}"
+DESCRIPTION="A scrolling, platform-jumping, key-collecting, ancient pyramid exploring game"
+HOMEPAGE="http://abe.sourceforge.net"
+SRC_URI="mirror://sourceforge/abe/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libsdl-1.2.3
+ >=media-libs/sdl-mixer-1.2.5"
+
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}/${MY_P}"
+DEST_DIR="${GAMES_DATADIR}/${PN}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}/src"
+
+ # Modify paths to resources
+ sed -i \
+ -e "s:\"images\":\"${DEST_DIR}/images\":" Image.h \
+ || die "sed Image.h failed"
+ sed -i \
+ -e "s:\"maps\":\"${DEST_DIR}/maps\":" Map.h MapIO.h \
+ || die "sed Map.h MapIO.h failed"
+ sed -i \
+ -e "s:\"sounds\":\"${DEST_DIR}/sounds\":" Sound.h \
+ || die "sed Sound.h failed"
+ epatch "${FILESDIR}/${PV}-gentoo-paths.patch"
+}
+
+src_compile() {
+ ./autogen.sh || die "autogen.sh failed"
+ egamesconf || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ dogamesbin abe || die "dogamesbin failed"
+ dodir "${DEST_DIR}"
+ cp -R images sounds maps "${D}${DEST_DIR}" || die "cp failed"
+ dodoc README
+ prepgamesdirs
+}
diff --git a/games-arcade/abe/files/1.0-gentoo-paths.patch b/games-arcade/abe/files/1.0-gentoo-paths.patch
new file mode 100644
index 000000000000..c4659eee3043
--- /dev/null
+++ b/games-arcade/abe/files/1.0-gentoo-paths.patch
@@ -0,0 +1,88 @@
+Only in ./: 1.0-gentoo-paths.patch
+diff -ud ../../abe-1.0/src/Game.c ./Game.c
+--- ../../abe-1.0/src/Game.c 2003-04-12 22:42:03.000000000 +0300
++++ ./Game.c 2004-04-12 13:07:59.000000000 +0300
+@@ -6,14 +6,14 @@
+ void deleteSavedGame() {
+ char path[300];
+ // version 2
+- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
++ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
+ remove(path);
+- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
++ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
+ remove(path);
+ // version 1
+- sprintf(path, "%s%ssave.dat", SAVEGAME_DIR, PATH_SEP);
++ sprintf(path, "%s%s%s%ssave.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP);
+ remove(path);
+- sprintf(path, "%s%ssavedmap.dat", SAVEGAME_DIR, PATH_SEP);
++ sprintf(path, "%s%s%s%ssavedmap.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP);
+ remove(path);
+ }
+
+@@ -23,7 +23,7 @@
+ char *err;
+ SDL_RWops *rwop;
+
+- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
++ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
+
+ if(!(fp = fopen(path, "wb"))) {
+ err = strerror(errno);
+@@ -51,7 +51,7 @@
+ SDL_RWclose(rwop);
+
+ // save the map in savegame/savedmap.dat
+- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
++ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, (int)GAME_VERSION);
+ saveMapPath(path);
+ }
+
+@@ -66,7 +66,7 @@
+ version = (int)GAME_VERSION;
+
+ // load the map from savegame/savedmap.dat
+- sprintf(path, "%s%ssavedmap%d.dat", SAVEGAME_DIR, PATH_SEP, version);
++ sprintf(path, "%s%s%s%ssavedmap%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, version);
+ if(!loadMapPath(path, 0)) {
+ // if can't find saved map load static map
+ fprintf(stderr, "Can't find current saved map. Will try to use static map.\n");
+@@ -82,9 +82,9 @@
+ // try to find a saved game of any version
+ while(version > 0) {
+ if(version > 1) {
+- sprintf(path, "%s%ssave%d.dat", SAVEGAME_DIR, PATH_SEP, version);
++ sprintf(path, "%s%s%s%ssave%d.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP, version);
+ } else {
+- sprintf(path, "%s%ssave.dat", SAVEGAME_DIR, PATH_SEP);
++ sprintf(path, "%s%s%s%ssave.dat", getenv("HOME"), PATH_SEP, SAVEGAME_DIR, PATH_SEP);
+ }
+ fprintf(stderr, "Trying to load saved game: %s\n", path);
+ fflush(stderr);
+diff -ud ../../abe-1.0/src/Game.h ./Game.h
+--- ../../abe-1.0/src/Game.h 2003-04-12 23:55:37.000000000 +0300
++++ ./Game.h 2004-04-12 13:08:03.000000000 +0300
+@@ -19,7 +19,7 @@
+
+ #define SPRING_JUMP 30
+
+-#define SAVEGAME_DIR "savegame"
++#define SAVEGAME_DIR ".abe"
+
+ #define MAX_HEALTH 100
+
+diff -ud ../../abe-1.0/src/Image.c ./Image.c
+--- ../../abe-1.0/src/Image.c 2003-04-12 21:16:13.000000000 +0300
++++ ./Image.c 2004-04-12 13:31:33.000000000 +0300
+@@ -305,7 +305,9 @@
+ int block = 0;
+
+ image_count = 0;
+- sprintf(tmp_path, "%s%s%s", IMAGES_DIR, PATH_SEP, "tmp.bmp");
++ sprintf(tmp_path, "%s%s%s", getenv("HOME"), PATH_SEP, ".abe");
++ mkdir(tmp_path, 0755);
++ sprintf(tmp_path, "%s%s%s%s%s", getenv("HOME"), PATH_SEP, ".abe", PATH_SEP, "tmp.bmp");
+
+ sprintf(path, "%s%s%s", IMAGES_DIR, PATH_SEP, "images.tar");
+ fprintf(stderr, "Opening %s for reading.\n", path);
diff --git a/games-arcade/abe/files/digest-abe-1.0 b/games-arcade/abe/files/digest-abe-1.0
new file mode 100644
index 000000000000..a3e7130e4f07
--- /dev/null
+++ b/games-arcade/abe/files/digest-abe-1.0
@@ -0,0 +1 @@
+MD5 a7e44d5e605b2d32fffdf46f019f7119 abe-1_0.tar.gz 3114987
diff --git a/games-arcade/abe/metadata.xml b/games-arcade/abe/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/games-arcade/abe/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+</pkgmetadata>