summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2016-10-17 13:42:54 -0500
committerAustin English <wizardedit@gentoo.org>2016-10-17 19:00:52 -0500
commitb8d712da8c18f478e0529b6e29a8ed375e205ee5 (patch)
tree2ea2011c0047b470bf4775032f2df8d1f40d7bbd /games-rpg/xu4
parentgames-rpg/vendetta-online-bin: remove deprecated games eclass (diff)
downloadgentoo-b8d712da8c18f478e0529b6e29a8ed375e205ee5.tar.gz
gentoo-b8d712da8c18f478e0529b6e29a8ed375e205ee5.tar.bz2
gentoo-b8d712da8c18f478e0529b6e29a8ed375e205ee5.zip
games-rpg/xu4: remove deprecated games eclass
Also update to EAPI 6 Gentoo-Bug: https://bugs.gentoo.org/574082 Package-Manager: portage-2.3.0
Diffstat (limited to 'games-rpg/xu4')
-rw-r--r--games-rpg/xu4/files/0.9-savegame.patch8
-rw-r--r--games-rpg/xu4/files/xu4-0.9-ldflags.patch4
-rw-r--r--games-rpg/xu4/files/xu4-0.9-warnings.patch8
-rw-r--r--games-rpg/xu4/files/xu4-0.9-zip.patch8
-rw-r--r--games-rpg/xu4/xu4-0.9-r1.ebuild76
5 files changed, 90 insertions, 14 deletions
diff --git a/games-rpg/xu4/files/0.9-savegame.patch b/games-rpg/xu4/files/0.9-savegame.patch
index 44a52dd40e95..96d16360f37c 100644
--- a/games-rpg/xu4/files/0.9-savegame.patch
+++ b/games-rpg/xu4/files/0.9-savegame.patch
@@ -1,5 +1,5 @@
---- src/savegame.c.orig
-+++ src/savegame.c
+--- a/src/savegame.c.
++++ b/src/savegame.c
@@ -21,23 +21,24 @@
char *partySavFilename() {
char *fname;
@@ -61,8 +61,8 @@
return fname;
}
---- src/u4.c.orig
-+++ src/u4.c
+--- a/src/u4.c
++++ b/src/u4.c
@@ -38,6 +38,10 @@
osxInit(argv[0]);
#endif
diff --git a/games-rpg/xu4/files/xu4-0.9-ldflags.patch b/games-rpg/xu4/files/xu4-0.9-ldflags.patch
index 560cdc33f1d9..7f1e5cd922d7 100644
--- a/games-rpg/xu4/files/xu4-0.9-ldflags.patch
+++ b/games-rpg/xu4/files/xu4-0.9-ldflags.patch
@@ -1,5 +1,5 @@
---- src/Makefile.common.old
-+++ src/Makefile.common
+--- a/src/Makefile.common
++++ b/src/Makefile.common
@@ -68,25 +68,25 @@
mkutils:: dumpsavegame$(EXEEXT) lzwenc$(EXEEXT) lzwdec$(EXEEXT) rleenc$(EXEEXT) rledec$(EXEEXT) tlkconv$(EXEEXT)
diff --git a/games-rpg/xu4/files/xu4-0.9-warnings.patch b/games-rpg/xu4/files/xu4-0.9-warnings.patch
index 58b35316ac0d..e52b610e61d4 100644
--- a/games-rpg/xu4/files/xu4-0.9-warnings.patch
+++ b/games-rpg/xu4/files/xu4-0.9-warnings.patch
@@ -1,5 +1,5 @@
---- u4.orig/src/u4.c
-+++ u4/src/u4.c
+--- a/src/u4.c
++++ b/src/u4.c
@@ -3,6 +3,8 @@
*/
@@ -9,8 +9,8 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
---- u4.orig/u4.desktop
-+++ u4/u4.desktop
+--- a/u4.desktop
++++ b/u4.desktop
@@ -1,9 +1,8 @@
[Desktop Entry]
-Encoding=UTF-8
diff --git a/games-rpg/xu4/files/xu4-0.9-zip.patch b/games-rpg/xu4/files/xu4-0.9-zip.patch
index c2d2053cb3f8..a8d2c58971c9 100644
--- a/games-rpg/xu4/files/xu4-0.9-zip.patch
+++ b/games-rpg/xu4/files/xu4-0.9-zip.patch
@@ -1,5 +1,5 @@
---- src/unzip.c.orig
-+++ src/unzip.c
+--- a/src/unzip.c
++++ b/src/unzip.c
@@ -493,7 +493,7 @@
/*
Get Info about the current file in the zipfile, with internal only info
@@ -9,8 +9,8 @@
unz_file_info *pfile_info,
unz_file_info_internal
*pfile_info_internal,
---- src/unzip.h.orig
-+++ src/unzip.h
+--- a/src/unzip.h
++++ b/src/unzip.h
@@ -8,7 +8,7 @@
Encryption and multi volume ZipFile (span) are not supported.
Old compressions used by old PKZip 1.x are not supported
diff --git a/games-rpg/xu4/xu4-0.9-r1.ebuild b/games-rpg/xu4/xu4-0.9-r1.ebuild
new file mode 100644
index 000000000000..cc1652e36a00
--- /dev/null
+++ b/games-rpg/xu4/xu4-0.9-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit eutils
+
+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="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND="dev-libs/libxml2
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer[timidity]"
+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
+ cd "${WORKDIR}" || die
+ mv ultima4-1.01.zip ultima4.zip || die
+ mkdir u4-dos || die
+ cd u4-dos || die
+ unzip -q ../ultima4.zip || die
+}
+
+PATCHES=(
+ "${FILESDIR}/${P}-ldflags.patch"
+ "${FILESDIR}/${PV}-savegame.patch"
+ "${FILESDIR}/${P}-warnings.patch"
+ "${FILESDIR}/${P}-zip.patch"
+)
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s:/usr/local/lib/u4:/usr/$(get_libdir)/u4:" src/u4file.c \
+ || die
+ sed -i \
+ -e 's:-Wall:$(E_CFLAGS):' src/Makefile \
+ || die
+}
+
+src_compile() {
+ emake -C src \
+ DEBUGCFLAGS= \
+ E_CFLAGS="${CFLAGS}" \
+ bindir="/usr/bin" \
+ datadir="/usr/share" \
+ libdir="/usr/$(get_libdir)"
+}
+
+src_install() {
+ emake -C src \
+ DEBUGCFLAGS= \
+ E_CFLAGS="${CFLAGS}" \
+ bindir="${D}/usr/bin" \
+ datadir="${D}/usr/share" \
+ libdir="${D}/usr/$(get_libdir)" \
+ install
+ dodoc AUTHORS README doc/*txt "${WORKDIR}/u4-dos/ULTIMA4/"*TXT
+ insinto "/usr/$(get_libdir)/u4"
+ doins "${WORKDIR}/"*zip
+}