summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-01-24 09:36:17 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-01-24 09:36:17 +0000
commitacc1b6bf51a9160773f8f5d321432ff8836cdb34 (patch)
tree4446d2d612f52f938d79c0ebaf2a2a34cbef3779 /games-roguelike
parentinitial commit (bug 38905) (diff)
downloadhistorical-acc1b6bf51a9160773f8f5d321432ff8836cdb34.tar.gz
historical-acc1b6bf51a9160773f8f5d321432ff8836cdb34.tar.bz2
historical-acc1b6bf51a9160773f8f5d321432ff8836cdb34.zip
initial commit (bug 38905)
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/fargoal/Manifest5
-rw-r--r--games-roguelike/fargoal/fargoal-20030731b.ebuild49
-rw-r--r--games-roguelike/fargoal/files/digest-fargoal-20030731b1
-rw-r--r--games-roguelike/fargoal/files/gentoo-home-write.patch206
-rw-r--r--games-roguelike/fargoal/metadata.xml9
5 files changed, 269 insertions, 1 deletions
diff --git a/games-roguelike/fargoal/Manifest b/games-roguelike/fargoal/Manifest
index a3a95ae66cd0..458e87a43c23 100644
--- a/games-roguelike/fargoal/Manifest
+++ b/games-roguelike/fargoal/Manifest
@@ -1,2 +1,5 @@
-MD5 4542552f39bc3df9acfb2b88f70f751b fargoal-20030731b.ebuild 1051
+MD5 7c1e7dd5a0ec65353830d6b2d6ec9db4 fargoal-20030731b.ebuild 1404
+MD5 a30c9d4ce8f9629d6d7323eaab258343 metadata.xml 241
+MD5 04a79bb0af5e002c3bb22f24293e4606 ChangeLog 483
MD5 336cedc9e4543c149a20bbf8a0446ea7 files/digest-fargoal-20030731b 65
+MD5 bbb65152078901fe1ae1775f6956da7b files/gentoo-home-write.patch 5709
diff --git a/games-roguelike/fargoal/fargoal-20030731b.ebuild b/games-roguelike/fargoal/fargoal-20030731b.ebuild
new file mode 100644
index 000000000000..739ebddb540b
--- /dev/null
+++ b/games-roguelike/fargoal/fargoal-20030731b.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-roguelike/fargoal/fargoal-20030731b.ebuild,v 1.1 2004/01/24 09:36:11 mr_bones_ Exp $
+
+inherit eutils games
+
+S="${WORKDIR}/${PN}"
+DESCRIPTION="The Sword of Fargoal - a remake of C64's old dungeon crawler game"
+HOMEPAGE="http://squidfighter.sourceforge.net/fargoal/"
+SRC_URI="mirror://sourceforge/squidfighter/${PN}${PV}.zip"
+
+KEYWORDS="x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="media-libs/allegro"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}/src
+ epatch "${FILESDIR}/gentoo-home-write.patch"
+ sed -i \
+ -e "s/^\(C\(XX\)\?FLAGS =\).*/\1 ${CFLAGS} /g" Makefile \
+ || die "sed Makefile failed"
+ sed -i \
+ -e "s:sfx/:/${GAMES_DATADIR}/${PN}/sfx/:g" \
+ -e "s:gfx/:/${GAMES_DATADIR}/${PN}/gfx/:g" \
+ -e "s:data/:${GAMES_DATADIR}/${PN}/data/:g" {*,../data/sof.cfg} \
+ || die "sed failed"
+}
+
+src_compile() {
+ cd src
+ emake || die "emake failed"
+}
+
+src_install() {
+ # install as fargoal instead of sword since that may conflict with
+ # other packages.
+ newgamesbin sword fargoal || die "newgamesbin failed"
+ dodir "${GAMES_DATADIR}/${PN}" || die "dodir failed"
+ cp -r {data,gfx,sfx} ${D}/${GAMES_DATADIR}/${PN} \
+ || die "cp failed"
+ dohtml readme.html || die "dohtml failed"
+ prepgamesdirs
+}
diff --git a/games-roguelike/fargoal/files/digest-fargoal-20030731b b/games-roguelike/fargoal/files/digest-fargoal-20030731b
new file mode 100644
index 000000000000..7c76070dab09
--- /dev/null
+++ b/games-roguelike/fargoal/files/digest-fargoal-20030731b
@@ -0,0 +1 @@
+MD5 9b24008b30b2c4b075998bd082de9459 fargoal20030731b.zip 764328
diff --git a/games-roguelike/fargoal/files/gentoo-home-write.patch b/games-roguelike/fargoal/files/gentoo-home-write.patch
new file mode 100644
index 000000000000..a87455e2e73e
--- /dev/null
+++ b/games-roguelike/fargoal/files/gentoo-home-write.patch
@@ -0,0 +1,206 @@
+diff -ru fargoal.orig/src/config.c fargoal/src/config.c
+--- fargoal.orig/src/config.c 2003-07-31 10:06:51.000000000 -0700
++++ fargoal/src/config.c 2004-01-23 23:42:56.000000000 -0800
+@@ -6,7 +6,7 @@
+ void
+ save_settings (void)
+ {
+- set_config_file ("data/settings.cfg");
++ set_config_file ("./settings.cfg");
+ set_config_int ("SOF", "colordepth", colordepth);
+ set_config_int ("SOF", "fullscreen", fullscreen);
+ set_config_int ("SOF", "scheme", scheme);
+@@ -27,7 +27,7 @@
+ void
+ load_settings (void)
+ {
+- set_config_file ("data/settings.cfg");
++ set_config_file ("./settings.cfg");
+ colordepth = get_config_int ("SOF", "colordepth", desktop_color_depth ());
+ fullscreen = get_config_int ("SOF", "fullscreen", 0);
+ scheme = get_config_int ("SOF", "scheme", 0);
+diff -ru fargoal.orig/src/main.c fargoal/src/main.c
+--- fargoal.orig/src/main.c 2003-07-31 10:06:51.000000000 -0700
++++ fargoal/src/main.c 2004-01-23 23:50:26.000000000 -0800
+@@ -2,6 +2,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
++#include <sys/stat.h>
++#include <sys/types.h>
++#include <unistd.h>
+
+ #include "main.h"
+ #include "game.h"
+@@ -334,6 +337,18 @@
+ exit (0);
+ }
+
++ if (!getenv("HOME")) {
++ fprintf (stderr, "Environment variable HOME not set. Exiting.");
++ exit(1);
++ }
++ chdir(getenv("HOME"));
++ /* Don't check the return here because it may already exist. */
++ mkdir(".fargoal", 0744);
++ if (chdir(".fargoal") != 0) {
++ fprintf (stderr, "Failed to change directories to ~/.fargoal");
++ exit(1);
++ }
++
+ allegro_init ();
+
+ srand ((unsigned) time (NULL));
+@@ -442,7 +457,7 @@
+ #endif
+ }
+
+- remove ("data/last.log");
++ remove ("./last.log");
+ save_settings ();
+
+ run_exit ();
+diff -ru fargoal.orig/src/menu.c fargoal/src/menu.c
+--- fargoal.orig/src/menu.c 2003-07-31 10:06:51.000000000 -0700
++++ fargoal/src/menu.c 2004-01-23 23:53:48.000000000 -0800
+@@ -265,8 +265,8 @@
+
+ message (FPS / 2, NULL, "Quest %i selected!!", menu_selected - 1);
+
+- set_config_file ("data/settings.cfg");
+- sprintf (str, "data/save%i.dat", quest_number);
++ set_config_file ("./settings.cfg");
++ sprintf (str, "./save%i.dat", quest_number);
+ sprintf (entry, "Beginning");
+
+ set_config_string ("SOF", str, entry);
+@@ -305,8 +305,8 @@
+ if (menu_selected >= 2 && menu_selected <= 10)
+ {
+ char str[100];
+- set_config_file ("data/settings.cfg");
+- sprintf (str, "data/save%i.dat", menu_selected - 1);
++ set_config_file ("./settings.cfg");
++ sprintf (str, "./save%i.dat", menu_selected - 1);
+
+ if (!get_config_string ("SOF", str, NULL))
+ {
+@@ -346,8 +346,8 @@
+ if (menu_selected >= 2 && menu_selected <= 10)
+ {
+ char str[100];
+- set_config_file ("data/settings.cfg");
+- sprintf (str, "data/save%i.dat", menu_selected - 1);
++ set_config_file ("./settings.cfg");
++ sprintf (str, "./save%i.dat", menu_selected - 1);
+ if (game_delete (menu_selected - 1) ||
+ get_config_string ("SOF", str, NULL))
+ {
+@@ -653,7 +653,7 @@
+ int i;
+ char str[100];
+
+- set_config_file ("data/settings.cfg");
++ set_config_file ("./settings.cfg");
+
+ if (!notrunning)
+ {
+@@ -662,14 +662,14 @@
+ list[1].current_level, list[1].lev,
+ won ? "won" : gameover ? "dead" : swordrun ? "running out of time" : "alive");
+ game_save (quest_number);
+- sprintf (str, "data/save%i.dat", quest_number);
++ sprintf (str, "./save%i.dat", quest_number);
+ set_config_string ("SOF", str, entry);
+ }
+
+ for (i = 0; i < 9; i++)
+ {
+ char const *entry;
+- sprintf (str, "data/save%i.dat", i + 1);
++ sprintf (str, "./save%i.dat", i + 1);
+ entry = get_config_string ("SOF", str, "empty");
+ sprintf (savenames[i], "%i: %s", i + 1, entry);
+ menu_delete_text[2 + i] = savenames[i];
+diff -ru fargoal.orig/src/message.c fargoal/src/message.c
+--- fargoal.orig/src/message.c 2003-07-31 10:06:51.000000000 -0700
++++ fargoal/src/message.c 2004-01-23 23:51:12.000000000 -0800
+@@ -79,11 +79,11 @@
+
+ if (filename)
+ {
+- file_copy (filename, "data/last.log", 0);
+- messagefile = fopen ("data/last.log", "a");
++ file_copy (filename, "./last.log", 0);
++ messagefile = fopen ("./last.log", "a");
+ }
+ else
+- messagefile = fopen ("data/last.log", "w");
++ messagefile = fopen ("./last.log", "w");
+ }
+
+ /* Copy current messages to given file. */
+@@ -93,9 +93,9 @@
+ if (messagefile)
+ fclose (messagefile);
+
+- file_copy ("data/last.log", filename, 1);
++ file_copy ("./last.log", filename, 1);
+
+- messagefile = fopen ("data/last.log", "a");
++ messagefile = fopen ("./last.log", "a");
+ }
+
+ static void
+diff -ru fargoal.orig/src/save.c fargoal/src/save.c
+--- fargoal.orig/src/save.c 2003-07-31 10:06:51.000000000 -0700
++++ fargoal/src/save.c 2004-01-23 23:52:11.000000000 -0800
+@@ -253,7 +253,7 @@
+ char name[256];
+ PACKFILE *file;
+
+- sprintf (name, "data/save%i.dat", nr);
++ sprintf (name, "./save%i.dat", nr);
+ file = pack_fopen (name, "wp");
+
+ if (file)
+@@ -297,7 +297,7 @@
+
+ pack_fclose (file);
+
+- sprintf (name, "data/save%i.html", nr);
++ sprintf (name, "./save%i.html", nr);
+ messages_exit (name);
+
+ return 1;
+@@ -311,7 +311,7 @@
+ char name[256];
+ PACKFILE *file;
+
+- sprintf (name, "data/save%i.dat", nr);
++ sprintf (name, "./save%i.dat", nr);
+ file = pack_fopen (name, "rp");
+
+ if (file)
+@@ -356,7 +356,7 @@
+
+ pack_fclose (file);
+
+- sprintf (name, "data/save%i.html", nr);
++ sprintf (name, "./save%i.html", nr);
+ messages_init (name);
+ return 1;
+ }
+@@ -368,10 +368,10 @@
+ {
+ int ret = 1;
+ char name[256];
+- sprintf (name, "data/save%i.dat", nr);
++ sprintf (name, "./save%i.dat", nr);
+ if (remove (name))
+ ret = 0;
+- sprintf (name, "data/save%i.html", nr);
++ sprintf (name, "./save%i.html", nr);
+ if (remove (name))
+ ret = 0;
+ return ret;
diff --git a/games-roguelike/fargoal/metadata.xml b/games-roguelike/fargoal/metadata.xml
new file mode 100644
index 000000000000..1cef6e243af3
--- /dev/null
+++ b/games-roguelike/fargoal/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+<email>games@gentoo.org</email>
+<name>Games Team</name>
+</maintainer>
+</pkgmetadata>