summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-06-22 09:05:56 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-06-22 09:05:56 +0000
commit43946563de3ced492b80165126b499e1b84cee6f (patch)
tree7c5a8a5c8f06e4391c856af2fc73644f4fe6e86e /games-rpg/xu4
parentStable on alpha. (Manifest recommit) (diff)
downloadgentoo-2-43946563de3ced492b80165126b499e1b84cee6f.tar.gz
gentoo-2-43946563de3ced492b80165126b499e1b84cee6f.tar.bz2
gentoo-2-43946563de3ced492b80165126b499e1b84cee6f.zip
Initial commit; ebuild by me to fix bug #45767
Diffstat (limited to 'games-rpg/xu4')
-rw-r--r--games-rpg/xu4/ChangeLog10
-rw-r--r--games-rpg/xu4/Manifest2
-rw-r--r--games-rpg/xu4/files/0.9-savegame.patch76
-rw-r--r--games-rpg/xu4/files/digest-xu4-0.93
-rw-r--r--games-rpg/xu4/metadata.xml5
-rw-r--r--games-rpg/xu4/xu4-0.9.ebuild70
6 files changed, 166 insertions, 0 deletions
diff --git a/games-rpg/xu4/ChangeLog b/games-rpg/xu4/ChangeLog
new file mode 100644
index 000000000000..76fdc29ac39e
--- /dev/null
+++ b/games-rpg/xu4/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-rpg/xu4
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/xu4/ChangeLog,v 1.1 2004/06/22 09:05:56 mr_bones_ Exp $
+
+*xu4-0.9 (22 Jun 2004)
+
+ 22 Jun 2004; Michael Sterrett <mr_bones_@gentoo.org> +metadata.xml,
+ +files/0.9-savegame.patch, +xu4-0.9.ebuild:
+ Initial commit; ebuild by me to fix bug #45767
+
diff --git a/games-rpg/xu4/Manifest b/games-rpg/xu4/Manifest
new file mode 100644
index 000000000000..2935296c4d47
--- /dev/null
+++ b/games-rpg/xu4/Manifest
@@ -0,0 +1,2 @@
+MD5 36b6ed44b8a2de436da5e568c8802249 xu4-0.9.ebuild 1170
+MD5 6c0078d6a0b637f6fb6a862894f9734b files/digest-xu4-0.9 177
diff --git a/games-rpg/xu4/files/0.9-savegame.patch b/games-rpg/xu4/files/0.9-savegame.patch
new file mode 100644
index 000000000000..a0c4906b06ed
--- /dev/null
+++ b/games-rpg/xu4/files/0.9-savegame.patch
@@ -0,0 +1,76 @@
+--- src/savegame.c.orig 2004-06-22 01:11:47.000000000 -0700
++++ src/savegame.c 2004-06-22 01:14:42.000000000 -0700
+@@ -21,23 +21,24 @@
+ char *partySavFilename() {
+ char *fname;
+
+-#if defined(MACOSX)
+ char *home;
+
+ home = getenv("HOME");
+ if (home && home[0]) {
+ fname = (char *) malloc(strlen(home) +
++#if defined(MACOSX)
+ strlen(MACOSX_USER_FILES_PATH) +
++#endif
++strlen("/.u4/") +
+ strlen(PARTY_SAV_BASE_FILENAME) + 2);
+ strcpy(fname, home);
++#if defined(MACOSX)
+ strcat(fname, MACOSX_USER_FILES_PATH);
+- strcat(fname, "/");
++#endif
++ strcat(fname, "/.u4/");
+ strcat(fname, PARTY_SAV_BASE_FILENAME);
+ } else
+ fname = strdup(PARTY_SAV_BASE_FILENAME);
+-#else
+- fname = strdup(PARTY_SAV_BASE_FILENAME);
+-#endif
+
+ return fname;
+ }
+@@ -45,24 +45,24 @@
+ char *monstersSavFilename() {
+ char *fname;
+
+-#if defined(MACOSX)
+ char *home;
+
+ home = getenv("HOME");
+ if (home && home[0]) {
+ fname = (char *) malloc(strlen(home) +
++#if defined(MACOSX)
+ strlen(MACOSX_USER_FILES_PATH) +
++#endif
++strlen("/.u4/") +
+ strlen(MONSTERS_SAV_BASE_FILENAME) + 2);
+ strcpy(fname, home);
++#if defined(MACOSX)
+ strcat(fname, MACOSX_USER_FILES_PATH);
+- strcat(fname, "/");
++#endif
++ strcat(fname, "/.u4/");
+ strcat(fname, MONSTERS_SAV_BASE_FILENAME);
+ } else
+ fname = strdup(MONSTERS_SAV_BASE_FILENAME);
+-#else
+- fname = strdup(MONSTERS_SAV_BASE_FILENAME);
+-#endif
+-
+ return fname;
+ }
+
+--- src/u4.c.orig 2004-06-22 01:28:38.000000000 -0700
++++ src/u4.c 2004-06-22 01:30:30.000000000 -0700
+@@ -38,6 +38,10 @@
+ osxInit(argv[0]);
+ #endif
+
++ if (getenv("HOME")) {
++ chdir(getenv("HOME"));
++ mkdir(".u4", 0777);
++ }
+ settingsRead();
+
+ for (i = 1; i < (unsigned int)argc; i++) {
diff --git a/games-rpg/xu4/files/digest-xu4-0.9 b/games-rpg/xu4/files/digest-xu4-0.9
new file mode 100644
index 000000000000..481c0adb33a3
--- /dev/null
+++ b/games-rpg/xu4/files/digest-xu4-0.9
@@ -0,0 +1,3 @@
+MD5 b2c71b0a292ff7d39d7fa1d056ffd63a xu4-0.9.tar.gz 320090
+MD5 9b668cc1a2d508a6325442c28cbe53ba ultima4-1.01.zip 537487
+MD5 4ce9c9cd9dab111275e0ebfde7a482c4 u4upgrad.zip 632072
diff --git a/games-rpg/xu4/metadata.xml b/games-rpg/xu4/metadata.xml
new file mode 100644
index 000000000000..d3c2cc926f0b
--- /dev/null
+++ b/games-rpg/xu4/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>
diff --git a/games-rpg/xu4/xu4-0.9.ebuild b/games-rpg/xu4/xu4-0.9.ebuild
new file mode 100644
index 000000000000..f774abec53bf
--- /dev/null
+++ b/games-rpg/xu4/xu4-0.9.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-rpg/xu4/xu4-0.9.ebuild,v 1.1 2004/06/22 09:05:56 mr_bones_ Exp $
+
+inherit eutils games
+
+DESCRIPTION="A remake of the computer game Ultima IV"
+HOMEPAGE="http://xu4.sourceforge.net/"
+SRC_URI="mirror://sourceforge/xu4/${P}.tar.gz
+ mirror://sourceforge/xu4/ultima4-1.01.zip
+ mirror://sourceforge/xu4/u4upgrad.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2
+ media-libs/sdl-mixer
+ media-libs/libsdl
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/u4"
+
+src_unpack() {
+ # xu4 will read the data files right out of the zip files
+ # but we want the docs from the original.
+ unpack ${P}.tar.gz
+ cp ${DISTDIR}/{ultima4-1.01.zip,u4upgrad.zip} . \
+ || die "cp failed"
+ cd ${WORKDIR}
+ mv ultima4-1.01.zip ultima4.zip
+ mkdir u4-dos
+ cd u4-dos
+ unzip -q ../ultima4.zip || die "unzip failed"
+ cd ${S}
+ epatch "${FILESDIR}/${PV}-savegame.patch"
+ sed -i \
+ -e "s:/usr/local/lib/u4:${GAMES_LIBDIR}/u4:" src/u4file.c \
+ || die "sed u4file failed"
+ sed -i \
+ -e 's:-Wall:$(E_CFLAGS):' src/Makefile \
+ || die "sed Makefile failed"
+}
+
+src_compile() {
+ emake -C src \
+ DEBUGCFLAGS= \
+ E_CFLAGS="${CFLAGS}" \
+ bindir="${GAMES_BINDIR}" \
+ datadir="/usr/share" \
+ libdir="${GAMES_LIBDIR}" \
+ || die "emake failed"
+}
+
+src_install() {
+ make -C src \
+ DEBUGCFLAGS= \
+ E_CFLAGS="${CFLAGS}" \
+ bindir="${D}${GAMES_BINDIR}" \
+ datadir="${D}/usr/share" \
+ libdir="${D}${GAMES_LIBDIR}" \
+ install || die "make install failed"
+ dodoc AUTHORS README doc/*txt "${WORKDIR}/u4-dos/ULTIMA4/"*TXT
+ insinto "${GAMES_LIBDIR}/u4"
+ doins "${WORKDIR}/"*zip || die "doins failed"
+ prepgamesdirs
+}