1 |
commit: 26d81c98d89ae5875cba71a8b8bccee40f879f16 |
2 |
Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jan 17 22:17:28 2019 +0000 |
4 |
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 10 03:18:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26d81c98 |
7 |
|
8 |
games-roguelike/tomenet: drop games eclass, EAPI=6 |
9 |
|
10 |
Let tomenet-wrapper check symlinks in ~/.tomenet/. Recreate them if they |
11 |
target to nowhere (e.g. /usr/share/games/tomenet/...). |
12 |
|
13 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
14 |
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com> |
15 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
16 |
|
17 |
.../tomenet/files/tomenet-4.7.2-makefile.patch | 6 ++--- |
18 |
games-roguelike/tomenet/files/tomenet-wrapper | 6 ++--- |
19 |
games-roguelike/tomenet/tomenet-4.7.2.ebuild | 30 +++++++++++----------- |
20 |
3 files changed, 21 insertions(+), 21 deletions(-) |
21 |
|
22 |
diff --git a/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch |
23 |
index 474ebd370c2..1b89c2bc987 100644 |
24 |
--- a/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch |
25 |
+++ b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch |
26 |
@@ -1,7 +1,7 @@ |
27 |
-diff --git a/src/makefile b/src/makefile |
28 |
+diff --git a/makefile b/makefile |
29 |
index ee56a33..7f3c81f 100644 |
30 |
---- a/src/makefile |
31 |
-+++ b/src/makefile |
32 |
+--- a/makefile |
33 |
++++ b/makefile |
34 |
@@ -203,7 +203,7 @@ CLI_LUAOBJS = \ |
35 |
# |
36 |
# This is my compiler of choice, it seems to work most everywhere |
37 |
|
38 |
diff --git a/games-roguelike/tomenet/files/tomenet-wrapper b/games-roguelike/tomenet/files/tomenet-wrapper |
39 |
index 2ca29b86217..71abcb79cf2 100644 |
40 |
--- a/games-roguelike/tomenet/files/tomenet-wrapper |
41 |
+++ b/games-roguelike/tomenet/files/tomenet-wrapper |
42 |
@@ -1,11 +1,11 @@ |
43 |
#!/bin/sh |
44 |
|
45 |
-if [ ! -e ~/.tomenet/.gentoo ]; then |
46 |
+if [ ! -e ~/.tomenet/.gentoo ] || [ ! -e ~/.tomenet/game ] || [ ! -e ~/.tomenet/text ] ; then |
47 |
LIBDIR="@LIBDIR@" |
48 |
[ -e ~/.tomenet ] || mkdir ~/.tomenet |
49 |
|
50 |
- ln -s "${LIBDIR}"/game ~/.tomenet/game |
51 |
- ln -s "${LIBDIR}"/text ~/.tomenet/text |
52 |
+ [ -e ~/.tomenet/game ] || ln -sf "${LIBDIR}"/game ~/.tomenet/game |
53 |
+ [ -e ~/.tomenet/text ] || ln -sf "${LIBDIR}"/text ~/.tomenet/text |
54 |
cp -R "${LIBDIR}"/user "${LIBDIR}"/scpt "${LIBDIR}"/xtra ~/.tomenet/ |
55 |
[ -e ~/.tomenetrc ] || cp "${LIBDIR}"/.tomenetrc ~/.tomenetrc |
56 |
|
57 |
|
58 |
diff --git a/games-roguelike/tomenet/tomenet-4.7.2.ebuild b/games-roguelike/tomenet/tomenet-4.7.2.ebuild |
59 |
index c51b641ecf4..5da772d9c22 100644 |
60 |
--- a/games-roguelike/tomenet/tomenet-4.7.2.ebuild |
61 |
+++ b/games-roguelike/tomenet/tomenet-4.7.2.ebuild |
62 |
@@ -1,8 +1,8 @@ |
63 |
# Copyright 1999-2019 Gentoo Authors |
64 |
# Distributed under the terms of the GNU General Public License v2 |
65 |
|
66 |
-EAPI=5 |
67 |
-inherit eutils gnome2-utils toolchain-funcs games |
68 |
+EAPI=6 |
69 |
+inherit eutils gnome2-utils toolchain-funcs |
70 |
|
71 |
DESCRIPTION="A MMORPG based on the works of J.R.R. Tolkien" |
72 |
HOMEPAGE="https://www.tomenet.eu" |
73 |
@@ -29,17 +29,21 @@ DEPEND="${RDEPEND} |
74 |
|
75 |
S=${WORKDIR}/${P}/src |
76 |
|
77 |
+PATCHES=( |
78 |
+ "${FILESDIR}"/${P}-makefile.patch |
79 |
+) |
80 |
+ |
81 |
src_prepare() { |
82 |
- epatch "${FILESDIR}"/${P}-makefile.patch |
83 |
+ default |
84 |
use server || use dedicated || { rm -r ../lib/{config,data,save} || die ;} |
85 |
|
86 |
sed \ |
87 |
- -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \ |
88 |
+ -e "s#@LIBDIR@#/usr/share/${PN}#" \ |
89 |
"${FILESDIR}"/${PN}-wrapper > "${T}"/${PN} || die |
90 |
|
91 |
if use server || use dedicated ; then |
92 |
sed \ |
93 |
- -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \ |
94 |
+ -e "s#@LIBDIR@#/usr/share/${PN}#" \ |
95 |
"${FILESDIR}"/${PN}-server-wrapper > "${T}"/${PN}.server || die |
96 |
fi |
97 |
|
98 |
@@ -59,37 +63,33 @@ src_install() { |
99 |
dodoc ../TomeNET-Guide.txt |
100 |
|
101 |
if ! use dedicated ; then |
102 |
- newgamesbin ${PN} ${PN}.bin |
103 |
- dogamesbin "${T}"/${PN} |
104 |
+ newbin ${PN} ${PN}.bin |
105 |
+ dobin "${T}"/${PN} |
106 |
|
107 |
doicon -s 48 client/tomenet4.png |
108 |
make_desktop_entry ${PN} ${PN} ${PN}4 |
109 |
fi |
110 |
|
111 |
if use server || use dedicated ; then |
112 |
- newgamesbin tomenet.server tomenet.server.bin |
113 |
- dogamesbin "${T}"/${PN}.server accedit |
114 |
+ newbin tomenet.server tomenet.server.bin |
115 |
+ dobin "${T}"/${PN}.server accedit |
116 |
fi |
117 |
|
118 |
- insinto "${GAMES_DATADIR}/${PN}" |
119 |
+ insinto "/usr/share/${PN}" |
120 |
doins -r ../lib/* |
121 |
doins ../.tomenetrc |
122 |
- |
123 |
- prepgamesdirs |
124 |
} |
125 |
|
126 |
pkg_preinst() { |
127 |
- games_pkg_preinst |
128 |
gnome2_icon_savelist |
129 |
} |
130 |
|
131 |
pkg_postinst() { |
132 |
- games_pkg_postinst |
133 |
gnome2_icon_cache_update |
134 |
|
135 |
if use sound; then |
136 |
elog "You can get soundpacks from here:" |
137 |
- elog ' http://tomenet.net/downloads.php' |
138 |
+ elog ' https://tomenet.net/downloads.php' |
139 |
elog "They must be placed inside ~/.tomenet directory." |
140 |
fi |
141 |
} |