Gentoo Archives: gentoo-commits

From: Michael Sterrett <mr_bones_@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-roguelike/tomenet/files/, games-roguelike/tomenet/
Date: Wed, 02 Dec 2015 06:48:02
Message-Id: 1449037627.e534fe40e953496a42efa84d0f7829f2a08b81b0.mr_bones_@gentoo
1 commit: e534fe40e953496a42efa84d0f7829f2a08b81b0
2 Author: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 2 06:26:47 2015 +0000
4 Commit: Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 2 06:27:07 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e534fe40
7
8 version bump
9
10 Package-Manager: portage-2.2.20.1
11
12 games-roguelike/tomenet/Manifest | 1 +
13 .../tomenet/files/tomenet-4.6.0-makefile.patch | 75 ++++++++++++++++
14 games-roguelike/tomenet/tomenet-4.6.0.ebuild | 100 +++++++++++++++++++++
15 3 files changed, 176 insertions(+)
16
17 diff --git a/games-roguelike/tomenet/Manifest b/games-roguelike/tomenet/Manifest
18 index 8575209..11ce735 100644
19 --- a/games-roguelike/tomenet/Manifest
20 +++ b/games-roguelike/tomenet/Manifest
21 @@ -1 +1,2 @@
22 DIST tomenet-4.5.9.tar.bz2 3012187 SHA256 40ce5068e2ee10ad051241d5c44423bb74a9ef4054260ee692adeccc9b46d4c7 SHA512 1e13e37b209ab274fb6aeafeb270cff0590ffa352b91b61970194e968826bed3fd365c210238a48b067d0882bac737c70250d8846acc816e3c3ac0b3b843ee1d WHIRLPOOL c9106d27be0e9f173eae24d12f79b75818b1dd23d2c1c93dd4a1a707de6ddaf7538de0dce73216d4a32a290245cd4c09dd26bbc3b54e811484a3a44bb2945fa6
23 +DIST tomenet-4.6.0.tar.bz2 3039894 SHA256 bd1cbf05fe8cb4c8af5e658ede622cf12b54aae42c640af12677e4067902673f SHA512 73dd682158b09ede8b78ca604891eebe6534ca3e8979187ac8b938deb3b37e5fde3424122fac6fce392e0e38cc70e40ae6bb07ce7e7192a8cd43d7d8057ab9b3 WHIRLPOOL 8f03ed1b1bc962403d8ff7611857ce40daa5436fa540da96aa142bdf70d6c4dd134238b582e7c6be2e52b63ce1c92f33bef1d21799d1ff4f29684256404831f6
24
25 diff --git a/games-roguelike/tomenet/files/tomenet-4.6.0-makefile.patch b/games-roguelike/tomenet/files/tomenet-4.6.0-makefile.patch
26 new file mode 100644
27 index 0000000..0dc9fb8
28 --- /dev/null
29 +++ b/games-roguelike/tomenet/files/tomenet-4.6.0-makefile.patch
30 @@ -0,0 +1,75 @@
31 +--- tomenet-4.5.9.orig/src/makefile
32 ++++ tomenet-4.5.9/src/makefile
33 +@@ -203,7 +203,7 @@
34 + #
35 + # This is my compiler of choice, it seems to work most everywhere
36 + #
37 +-CC = gcc
38 ++CC ?= gcc
39 +
40 + # For allowing #if..#else..#endif constructs in LUA files - C. Blue
41 + # Note: The flags must contain
42 +@@ -215,16 +215,26 @@
43 + # need to use the gcc invocation below instead.
44 + #
45 + # cpp variant:
46 +-CPP = cpp
47 +-CPPFLAGS = -C -P
48 ++#CPP = cpp
49 ++#CPPFLAGS = -C -P
50 + # gcc variant:
51 +-#CPP = gcc
52 +-#CPPFLAGS = -x c -E -Wp,-C,-P
53 ++CPP ?= gcc
54 ++CPPFLAGS = -x c -E -Wp,-C,-P
55 +
56 +
57 + # For variations with X11
58 + X11BASE = /usr/X11R6
59 +
60 ++# defines
61 ++ifdef USE_SDL
62 ++CFLAGS += -DSOUND_SDL $(shell sdl-config --cflags)
63 ++SDL_LIBS = $(shell sdl-config --libs) -lSDL_mixer
64 ++endif
65 ++
66 ++ifdef USE_X
67 ++CFLAGS += -I${X11BASE}/include -DUSE_X11
68 ++LIBS += -L${X11BASE}/lib -lX11
69 ++endif
70 +
71 + ##
72 + ## Standard version -- supports X11 (main-x11.c)
73 +@@ -234,8 +244,11 @@
74 + # "CFLAGS", if your machine places files in a weird location.
75 + #
76 + ## With SDL
77 +-#CFLAGS = -g -pipe -Wall -DUSE_X11 -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -DSOUND_SDL `sdl-config --cflags`
78 +-#LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lcrypt -lm `sdl-config --libs` -lSDL_mixer
79 ++
80 ++CFLAGS += -Wall
81 ++CFLAGS += -DUSE_GCU -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937
82 ++LIBS += -L/usr/pkg/lib $(shell ${PKG_CONFIG} --libs ncurses) -lcrypt -lm ${SDL_LIBS}
83 ++
84 + ##
85 + ## Without SDL
86 + #CFLAGS = -g -pipe -Wall -DUSE_X11 -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937
87 +@@ -257,7 +270,7 @@
88 + #
89 + ## With SDL
90 + CFLAGS = -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -DSOUND_SDL `sdl-config --cflags` -D_DEFAULT_SOURCE -DACC32
91 +-LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 -lncurses -lcrypt -lm `sdl-config --libs` -lSDL_mixer
92 ++LIBS = -L${X11BASE}/lib -L/usr/pkg/lib -lX11 $(shell ${PKG_CONFIG} --libs ncurses) -lcrypt -lm $(shell sdl-config --libs) -lSDL_mixer
93 + ##
94 + ## Without SDL
95 + #CFLAGS = -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I${X11BASE}/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937
96 +@@ -357,9 +370,6 @@
97 + # Compile a client with 'test client' version/tag
98 + tomenet.test: CFLAGS += -DTEST_CLIENT -O0
99 +
100 +-# Normal release build
101 +-tomenet: CFLAGS += -O2
102 +-
103 +
104 + # Lua
105 + SRCS += $(LUASRCS)
106
107 diff --git a/games-roguelike/tomenet/tomenet-4.6.0.ebuild b/games-roguelike/tomenet/tomenet-4.6.0.ebuild
108 new file mode 100644
109 index 0000000..79d9b8a
110 --- /dev/null
111 +++ b/games-roguelike/tomenet/tomenet-4.6.0.ebuild
112 @@ -0,0 +1,100 @@
113 +# Copyright 1999-2015 Gentoo Foundation
114 +# Distributed under the terms of the GNU General Public License v2
115 +# $Id$
116 +
117 +EAPI=5
118 +inherit eutils gnome2-utils toolchain-funcs games
119 +
120 +DESCRIPTION="A MMORPG based on the works of J.R.R. Tolkien"
121 +HOMEPAGE="http://www.tomenet.eu/"
122 +SRC_URI="http://www.tomenet.eu/downloads/${P}.tar.bz2"
123 +
124 +LICENSE="Moria"
125 +SLOT="0"
126 +KEYWORDS="~amd64 ~x86"
127 +IUSE="dedicated server +sound X"
128 +
129 +RDEPEND="sys-libs/ncurses:0
130 + !dedicated? (
131 + X? (
132 + x11-libs/libX11
133 + )
134 + sound? (
135 + media-libs/libsdl[sound]
136 + media-libs/sdl-mixer[vorbis,smpeg,mp3]
137 + )
138 + )"
139 +DEPEND="${RDEPEND}
140 + virtual/pkgconfig
141 + !dedicated? ( sound? ( app-arch/p7zip[wxwidgets] ) )"
142 +
143 +S=${WORKDIR}/${P}/src
144 +
145 +src_prepare() {
146 + epatch "${FILESDIR}"/${P}-makefile.patch
147 + use server || use dedicated || { rm -r ../lib/{config,data,save} || die ;}
148 +
149 + sed \
150 + -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \
151 + "${FILESDIR}"/${PN}-wrapper > "${T}"/${PN} || die
152 +
153 + if use server || use dedicated ; then
154 + sed \
155 + -e "s#@LIBDIR@#${GAMES_DATADIR}/${PN}#" \
156 + "${FILESDIR}"/${PN}-server-wrapper > "${T}"/${PN}.server || die
157 + fi
158 +
159 + tc-export PKG_CONFIG
160 +}
161 +
162 +src_compile() {
163 + local mytargets="$(usex dedicated "accedit tomenet.server evilmeta" "$(usex server "all" "tomenet")")"
164 + emake \
165 + $(usex dedicated "" "$(usex X "USE_X=1" "")") \
166 + $(usex dedicated "" "$(usex sound "USE_SDL=1" "")") \
167 + -f makefile \
168 + ${mytargets[@]}
169 +}
170 +
171 +src_install() {
172 + dodoc ../TomeNET-Guide.txt
173 +
174 + if ! use dedicated ; then
175 + newgamesbin ${PN} ${PN}.bin
176 + dogamesbin "${T}"/${PN}
177 +
178 + doicon -s 48 client/tomenet4.png
179 + make_desktop_entry ${PN} ${PN} ${PN}4
180 + fi
181 +
182 + if use server || use dedicated ; then
183 + newgamesbin tomenet.server tomenet.server.bin
184 + dogamesbin "${T}"/${PN}.server accedit evilmeta
185 + fi
186 +
187 + insinto "${GAMES_DATADIR}/${PN}"
188 + doins -r ../lib/*
189 + doins ../.tomenetrc
190 +
191 + prepgamesdirs
192 +}
193 +
194 +pkg_preinst() {
195 + games_pkg_preinst
196 + gnome2_icon_savelist
197 +}
198 +
199 +pkg_postinst() {
200 + games_pkg_postinst
201 + gnome2_icon_cache_update
202 +
203 + if use sound; then
204 + elog "You can get soundpacks from here:"
205 + elog ' http://tomenet.net/downloads.php'
206 + elog "They must be placed inside ~/.tomenet directory."
207 + fi
208 +}
209 +
210 +pkg_postrm() {
211 + gnome2_icon_cache_update
212 +}