summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <stefan.strogin@gmail.com>2019-01-18 00:17:28 +0200
committerAaron Bauman <bman@gentoo.org>2019-02-09 22:18:21 -0500
commit26d81c98d89ae5875cba71a8b8bccee40f879f16 (patch)
tree920cedfdaea8b940e2778344025397ed38ccf0d6 /games-roguelike
parentgames-roguelike/tomenet: version bump to 4.7.2 (diff)
downloadgentoo-26d81c98d89ae5875cba71a8b8bccee40f879f16.tar.gz
gentoo-26d81c98d89ae5875cba71a8b8bccee40f879f16.tar.bz2
gentoo-26d81c98d89ae5875cba71a8b8bccee40f879f16.zip
games-roguelike/tomenet: drop games eclass, EAPI=6
Let tomenet-wrapper check symlinks in ~/.tomenet/. Recreate them if they target to nowhere (e.g. /usr/share/games/tomenet/...). Package-Manager: Portage-2.3.56, Repoman-2.3.12 Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com> Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch6
-rw-r--r--games-roguelike/tomenet/files/tomenet-wrapper6
-rw-r--r--games-roguelike/tomenet/tomenet-4.7.2.ebuild30
3 files changed, 21 insertions, 21 deletions
diff --git a/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch
index 474ebd370c2..1b89c2bc987 100644
--- a/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch
+++ b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch
@@ -1,7 +1,7 @@
-diff --git a/src/makefile b/src/makefile
+diff --git a/makefile b/makefile
index ee56a33..7f3c81f 100644
---- a/src/makefile
-+++ b/src/makefile
+--- a/makefile
++++ b/makefile
@@ -203,7 +203,7 @@ CLI_LUAOBJS = \
#
# This is my compiler of choice, it seems to work most everywhere
diff --git a/games-roguelike/tomenet/files/tomenet-wrapper b/games-roguelike/tomenet/files/tomenet-wrapper
index 2ca29b86217..71abcb79cf2 100644
--- a/games-roguelike/tomenet/files/tomenet-wrapper
+++ b/games-roguelike/tomenet/files/tomenet-wrapper
@@ -1,11 +1,11 @@
#!/bin/sh
-if [ ! -e ~/.tomenet/.gentoo ]; then
+if [ ! -e ~/.tomenet/.gentoo ] || [ ! -e ~/.tomenet/game ] || [ ! -e ~/.tomenet/text ] ; then
LIBDIR="@LIBDIR@"
[ -e ~/.tomenet ] || mkdir ~/.tomenet
- ln -s "${LIBDIR}"/game ~/.tomenet/game
- ln -s "${LIBDIR}"/text ~/.tomenet/text
+ [ -e ~/.tomenet/game ] || ln -sf "${LIBDIR}"/game ~/.tomenet/game
+ [ -e ~/.tomenet/text ] || ln -sf "${LIBDIR}"/text ~/.tomenet/text
cp -R "${LIBDIR}"/user "${LIBDIR}"/scpt "${LIBDIR}"/xtra ~/.tomenet/
[ -e ~/.tomenetrc ] || cp "${LIBDIR}"/.tomenetrc ~/.tomenetrc
diff --git a/games-roguelike/tomenet/tomenet-4.7.2.ebuild b/games-roguelike/tomenet/tomenet-4.7.2.ebuild
index c51b641ecf4..5da772d9c22 100644
--- a/games-roguelike/tomenet/tomenet-4.7.2.ebuild
+++ b/games-roguelike/tomenet/tomenet-4.7.2.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils gnome2-utils toolchain-funcs games
+EAPI=6
+inherit eutils gnome2-utils toolchain-funcs
DESCRIPTION="A MMORPG based on the works of J.R.R. Tolkien"
HOMEPAGE="https://www.tomenet.eu"
@@ -29,17 +29,21 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${P}/src
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-makefile.patch
+ default
use server || use dedicated || { rm -r ../lib/{config,data,save} || die ;}
sed \
- -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \
+ -e "s#@LIBDIR@#/usr/share/${PN}#" \
"${FILESDIR}"/${PN}-wrapper > "${T}"/${PN} || die
if use server || use dedicated ; then
sed \
- -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \
+ -e "s#@LIBDIR@#/usr/share/${PN}#" \
"${FILESDIR}"/${PN}-server-wrapper > "${T}"/${PN}.server || die
fi
@@ -59,37 +63,33 @@ src_install() {
dodoc ../TomeNET-Guide.txt
if ! use dedicated ; then
- newgamesbin ${PN} ${PN}.bin
- dogamesbin "${T}"/${PN}
+ newbin ${PN} ${PN}.bin
+ dobin "${T}"/${PN}
doicon -s 48 client/tomenet4.png
make_desktop_entry ${PN} ${PN} ${PN}4
fi
if use server || use dedicated ; then
- newgamesbin tomenet.server tomenet.server.bin
- dogamesbin "${T}"/${PN}.server accedit
+ newbin tomenet.server tomenet.server.bin
+ dobin "${T}"/${PN}.server accedit
fi
- insinto "${GAMES_DATADIR}/${PN}"
+ insinto "/usr/share/${PN}"
doins -r ../lib/*
doins ../.tomenetrc
-
- prepgamesdirs
}
pkg_preinst() {
- games_pkg_preinst
gnome2_icon_savelist
}
pkg_postinst() {
- games_pkg_postinst
gnome2_icon_cache_update
if use sound; then
elog "You can get soundpacks from here:"
- elog ' http://tomenet.net/downloads.php'
+ elog ' https://tomenet.net/downloads.php'
elog "They must be placed inside ~/.tomenet directory."
fi
}