1 |
commit: 5b07ce44694000acc828dc03eda53e284b2fc7ac |
2 |
Author: Stefan Strogin <stefan.strogin <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jan 17 19:37:22 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=5b07ce44 |
7 |
|
8 |
games-roguelike/tomenet: version bump to 4.7.2 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/674536 |
11 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
12 |
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/10856 |
14 |
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org> |
15 |
|
16 |
games-roguelike/tomenet/Manifest | 1 + |
17 |
.../tomenet/files/tomenet-4.7.2-makefile.patch | 65 ++++++++++++++ |
18 |
games-roguelike/tomenet/tomenet-4.7.2.ebuild | 99 ++++++++++++++++++++++ |
19 |
3 files changed, 165 insertions(+) |
20 |
|
21 |
diff --git a/games-roguelike/tomenet/Manifest b/games-roguelike/tomenet/Manifest |
22 |
index e83e3a90b42..cb2a3a96713 100644 |
23 |
--- a/games-roguelike/tomenet/Manifest |
24 |
+++ b/games-roguelike/tomenet/Manifest |
25 |
@@ -1 +1,2 @@ |
26 |
DIST tomenet-4.6.1a.tar.bz2 2990275 BLAKE2B 40d855e4f9e908a8802bba8fd95fcb8c69df026bdc9b891e14a79691e80f7caab48e7826066a761101d932116542d42240457d85998278f8a928dd64ed1ac522 SHA512 eb89cd2276a18947d55efcc745e0b0abc0d9ae8a8d922a4726632657f32657e762bd0530d721afcf9d4ab3eeed2da6e43a3822d1d8c2c3b630fdb4cde924ac9f |
27 |
+DIST tomenet-4.7.2.tar.bz2 3253873 BLAKE2B 4cba4827a64588c850691ae3b5c7ad0097a322ab1baca42492cbe42bc1e76615fb0084b7b8608e20adf303bded42a9cb80c4d09d0a29f1f68699ffa8e04240bb SHA512 284aa71374b726fd86bfa6b0d820301ec7e5004ddb140a1567c54c883c138cabd2ac55085c222aa057b234dc822f717489128b857ed527fff7d702092bdb51d5 |
28 |
|
29 |
diff --git a/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..474ebd370c2 |
32 |
--- /dev/null |
33 |
+++ b/games-roguelike/tomenet/files/tomenet-4.7.2-makefile.patch |
34 |
@@ -0,0 +1,65 @@ |
35 |
+diff --git a/src/makefile b/src/makefile |
36 |
+index ee56a33..7f3c81f 100644 |
37 |
+--- a/src/makefile |
38 |
++++ b/src/makefile |
39 |
+@@ -203,7 +203,7 @@ CLI_LUAOBJS = \ |
40 |
+ # |
41 |
+ # This is my compiler of choice, it seems to work most everywhere |
42 |
+ # |
43 |
+-CC = gcc |
44 |
++CC ?= gcc |
45 |
+ |
46 |
+ # For allowing #if..#else..#endif constructs in LUA files - C. Blue |
47 |
+ # Note: The flags must contain |
48 |
+@@ -215,16 +215,26 @@ CC = gcc |
49 |
+ # need to use the gcc invocation below instead. |
50 |
+ # |
51 |
+ # cpp variant: |
52 |
+-CPP = cpp |
53 |
+-CPPFLAGS = -C -P |
54 |
++#CPP = cpp |
55 |
++#CPPFLAGS = -C -P |
56 |
+ # gcc variant: |
57 |
+-#CPP = gcc |
58 |
+-#CPPFLAGS = -x c -E -Wp,-C,-P |
59 |
++CPP ?= gcc |
60 |
++CPPFLAGS = -x c -E -Wp,-C,-P |
61 |
+ |
62 |
+ |
63 |
+ # For variations with X11 |
64 |
+ X11BASE = /usr/X11R6 |
65 |
+ |
66 |
++# defines |
67 |
++ifdef USE_SDL |
68 |
++CFLAGS += -DSOUND_SDL $(shell sdl-config --cflags) |
69 |
++SDL_LIBS = $(shell sdl-config --libs) -lSDL_mixer |
70 |
++endif |
71 |
++ |
72 |
++ifdef USE_X |
73 |
++CFLAGS += -I${X11BASE}/include -DUSE_X11 |
74 |
++LIBS += -L${X11BASE}/lib -lX11 |
75 |
++endif |
76 |
+ |
77 |
+ ## |
78 |
+ ## Standard version -- supports X11 (main-x11.c) |
79 |
+@@ -236,6 +246,11 @@ X11BASE = /usr/X11R6 |
80 |
+ ## With SDL |
81 |
+ #CFLAGS = -O2 -g -pipe -Wall -DUSE_X11 -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -DSOUND_SDL `sdl-config --cflags` |
82 |
+ #LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lcrypt -lm `sdl-config --libs` -lSDL_mixer |
83 |
++ |
84 |
++CFLAGS += -Wall |
85 |
++CFLAGS += -DUSE_GCU -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 |
86 |
++LIBS += -L/usr/pkg/lib $(shell ${PKG_CONFIG} --libs ncurses) -lcrypt -lm ${SDL_LIBS} |
87 |
++ |
88 |
+ ## |
89 |
+ ## Without SDL |
90 |
+ #CFLAGS = -O2 -g -pipe -Wall -DUSE_X11 -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 |
91 |
+@@ -259,7 +274,7 @@ X11BASE = /usr/X11R6 |
92 |
+ #CFLAGS = -O2 -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -DSOUND_SDL `sdl-config --cflags` -D_DEFAULT_SOURCE -DACC32 -fPIC |
93 |
+ CFLAGS = -O2 -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -DSOUND_SDL `sdl-config --cflags` -D_DEFAULT_SOURCE -DACC32 -fPIC -Wno-format-truncation |
94 |
+ #LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lncurses -lcrypt -lm `sdl-config --libs` -lSDL_mixer |
95 |
+-LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lncurses -lcrypt -lm `sdl-config --libs` -lSDL_mixer |
96 |
++LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 $(shell ${PKG_CONFIG} --libs ncurses) -lcrypt -lm $(shell sdl-config --libs) -lSDL_mixer |
97 |
+ ACCEDIT_LIBS = -lcurses -lcrypt |
98 |
+ ## |
99 |
+ ## Without SDL |
100 |
|
101 |
diff --git a/games-roguelike/tomenet/tomenet-4.7.2.ebuild b/games-roguelike/tomenet/tomenet-4.7.2.ebuild |
102 |
new file mode 100644 |
103 |
index 00000000000..c51b641ecf4 |
104 |
--- /dev/null |
105 |
+++ b/games-roguelike/tomenet/tomenet-4.7.2.ebuild |
106 |
@@ -0,0 +1,99 @@ |
107 |
+# Copyright 1999-2019 Gentoo Authors |
108 |
+# Distributed under the terms of the GNU General Public License v2 |
109 |
+ |
110 |
+EAPI=5 |
111 |
+inherit eutils gnome2-utils toolchain-funcs games |
112 |
+ |
113 |
+DESCRIPTION="A MMORPG based on the works of J.R.R. Tolkien" |
114 |
+HOMEPAGE="https://www.tomenet.eu" |
115 |
+SRC_URI="https://www.tomenet.eu/downloads/${P}.tar.bz2" |
116 |
+ |
117 |
+LICENSE="Moria" |
118 |
+SLOT="0" |
119 |
+KEYWORDS="~amd64 ~x86" |
120 |
+IUSE="dedicated server +sound X" |
121 |
+ |
122 |
+RDEPEND="sys-libs/ncurses:0 |
123 |
+ !dedicated? ( |
124 |
+ X? ( |
125 |
+ x11-libs/libX11 |
126 |
+ ) |
127 |
+ sound? ( |
128 |
+ media-libs/libsdl[sound] |
129 |
+ media-libs/sdl-mixer[vorbis,smpeg,mp3] |
130 |
+ ) |
131 |
+ )" |
132 |
+DEPEND="${RDEPEND} |
133 |
+ virtual/pkgconfig |
134 |
+ !dedicated? ( sound? ( app-arch/p7zip[wxwidgets] ) )" |
135 |
+ |
136 |
+S=${WORKDIR}/${P}/src |
137 |
+ |
138 |
+src_prepare() { |
139 |
+ epatch "${FILESDIR}"/${P}-makefile.patch |
140 |
+ use server || use dedicated || { rm -r ../lib/{config,data,save} || die ;} |
141 |
+ |
142 |
+ sed \ |
143 |
+ -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \ |
144 |
+ "${FILESDIR}"/${PN}-wrapper > "${T}"/${PN} || die |
145 |
+ |
146 |
+ if use server || use dedicated ; then |
147 |
+ sed \ |
148 |
+ -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \ |
149 |
+ "${FILESDIR}"/${PN}-server-wrapper > "${T}"/${PN}.server || die |
150 |
+ fi |
151 |
+ |
152 |
+ tc-export PKG_CONFIG |
153 |
+} |
154 |
+ |
155 |
+src_compile() { |
156 |
+ local mytargets="$(usex dedicated "accedit tomenet.server" "$(usex server "all" "tomenet")")" |
157 |
+ emake \ |
158 |
+ $(usex dedicated "" "$(usex X "USE_X=1" "")") \ |
159 |
+ $(usex dedicated "" "$(usex sound "USE_SDL=1" "")") \ |
160 |
+ -f makefile \ |
161 |
+ ${mytargets[@]} |
162 |
+} |
163 |
+ |
164 |
+src_install() { |
165 |
+ dodoc ../TomeNET-Guide.txt |
166 |
+ |
167 |
+ if ! use dedicated ; then |
168 |
+ newgamesbin ${PN} ${PN}.bin |
169 |
+ dogamesbin "${T}"/${PN} |
170 |
+ |
171 |
+ doicon -s 48 client/tomenet4.png |
172 |
+ make_desktop_entry ${PN} ${PN} ${PN}4 |
173 |
+ fi |
174 |
+ |
175 |
+ if use server || use dedicated ; then |
176 |
+ newgamesbin tomenet.server tomenet.server.bin |
177 |
+ dogamesbin "${T}"/${PN}.server accedit |
178 |
+ fi |
179 |
+ |
180 |
+ insinto "${GAMES_DATADIR}/${PN}" |
181 |
+ doins -r ../lib/* |
182 |
+ doins ../.tomenetrc |
183 |
+ |
184 |
+ prepgamesdirs |
185 |
+} |
186 |
+ |
187 |
+pkg_preinst() { |
188 |
+ games_pkg_preinst |
189 |
+ gnome2_icon_savelist |
190 |
+} |
191 |
+ |
192 |
+pkg_postinst() { |
193 |
+ games_pkg_postinst |
194 |
+ gnome2_icon_cache_update |
195 |
+ |
196 |
+ if use sound; then |
197 |
+ elog "You can get soundpacks from here:" |
198 |
+ elog ' http://tomenet.net/downloads.php' |
199 |
+ elog "They must be placed inside ~/.tomenet directory." |
200 |
+ fi |
201 |
+} |
202 |
+ |
203 |
+pkg_postrm() { |
204 |
+ gnome2_icon_cache_update |
205 |
+} |