1 |
commit: 7f3f4b56a08fd671b02ea6ffc3062d416b665ad7 |
2 |
Author: Florian Schmaus <flow <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 29 13:05:12 2022 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 29 13:07:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f3f4b56 |
7 |
|
8 |
games-fps/urbanterror: add 4.3.4_p20211208 |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/24768 |
11 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
12 |
|
13 |
games-fps/urbanterror/Manifest | 1 + |
14 |
...urbanterror-4.3.4_p20211208-respect-flags.patch | 79 ++++++++++ |
15 |
.../urbanterror/urbanterror-4.3.4_p20211208.ebuild | 172 +++++++++++++++++++++ |
16 |
3 files changed, 252 insertions(+) |
17 |
|
18 |
diff --git a/games-fps/urbanterror/Manifest b/games-fps/urbanterror/Manifest |
19 |
index d0d24bf966d5..ef2a679e0116 100644 |
20 |
--- a/games-fps/urbanterror/Manifest |
21 |
+++ b/games-fps/urbanterror/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST urbanterror-4.3.4_p20210304.tar.gz 6189619 BLAKE2B 2a92674372c1d6c988f19179b4514926b171bc7e3e027242d261971c8ed40eca159fd33584ea869562b3002f721c31efd6d3e65c4f96ce2df1b61bcba19a8cbd SHA512 ccdfa55ded774f19028250e6c8fcd371a5934284d85e265879193fab8f50c5026366f68c0bb359003f67528f2e2cb896dc6f3a3da5b5ea144d6e235e864d34e2 |
24 |
+DIST urbanterror-4.3.4_p20211208.tar.gz 6187667 BLAKE2B 7901ad0d23d9b80634a3e4e68973227f302bb7004bdb1f450f7ab520f1a3243821aa49712a486d1e577e5bb055504d4005555fa273e64a2e2b57a75661044370 SHA512 24c0fe6775a165ddcc6b919bc46872fdcfff7e471c6ff88b635e6926bce051cc034e7ef8a5145996d67c79632cef763e4cc6c5c988d36088de0f69bb5626ff86 |
25 |
|
26 |
diff --git a/games-fps/urbanterror/files/urbanterror-4.3.4_p20211208-respect-flags.patch b/games-fps/urbanterror/files/urbanterror-4.3.4_p20211208-respect-flags.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..d6938f3a4609 |
29 |
--- /dev/null |
30 |
+++ b/games-fps/urbanterror/files/urbanterror-4.3.4_p20211208-respect-flags.patch |
31 |
@@ -0,0 +1,79 @@ |
32 |
+--- a/Makefile |
33 |
++++ b/Makefile |
34 |
+@@ -322,30 +322,30 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu") |
35 |
+ -pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" |
36 |
+ CLIENT_CFLAGS += $(SDL_CFLAGS) |
37 |
+ |
38 |
+- OPTIMIZEVM = -O3 |
39 |
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math |
40 |
++ OPTIMIZEVM = |
41 |
++ OPTIMIZE = $(OPTIMIZEVM) |
42 |
+ |
43 |
+ ifeq ($(ARCH),x86_64) |
44 |
+- OPTIMIZEVM = -O3 |
45 |
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math |
46 |
++ OPTIMIZEVM = |
47 |
++ OPTIMIZE = $(OPTIMIZEVM) |
48 |
+ HAVE_VM_COMPILED = true |
49 |
+ else |
50 |
+ ifeq ($(ARCH),x86) |
51 |
+- OPTIMIZEVM = -O3 -march=i586 |
52 |
+- OPTIMIZE = $(OPTIMIZEVM) -ffast-math |
53 |
++ OPTIMIZEVM = |
54 |
++ OPTIMIZE = $(OPTIMIZEVM) |
55 |
+ HAVE_VM_COMPILED=true |
56 |
+ else |
57 |
+ ifeq ($(ARCH),ppc) |
58 |
+- ALTIVEC_CFLAGS = -maltivec |
59 |
++ ALTIVEC_CFLAGS = |
60 |
+ HAVE_VM_COMPILED=true |
61 |
+ endif |
62 |
+ ifeq ($(ARCH),ppc64) |
63 |
+- ALTIVEC_CFLAGS = -maltivec |
64 |
++ ALTIVEC_CFLAGS = |
65 |
+ HAVE_VM_COMPILED=true |
66 |
+ endif |
67 |
+ ifeq ($(ARCH),sparc) |
68 |
+- OPTIMIZE += -mtune=ultrasparc3 -mv8plus |
69 |
+- OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus |
70 |
++ OPTIMIZE += |
71 |
++ OPTIMIZEVM += |
72 |
+ HAVE_VM_COMPILED=true |
73 |
+ endif |
74 |
+ ifeq ($(ARCH),armv7l) |
75 |
+@@ -1153,7 +1153,7 @@ endif |
76 |
+ |
77 |
+ define DO_CC |
78 |
+ $(echo_cmd) "CC $<" |
79 |
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
80 |
++$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
81 |
+ endef |
82 |
+ |
83 |
+ define DO_CC_ALTIVEC |
84 |
+@@ -1163,7 +1163,7 @@ endef |
85 |
+ |
86 |
+ define DO_REF_CC |
87 |
+ $(echo_cmd) "REF_CC $<" |
88 |
+-$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
89 |
++$(Q)$(CC) $(SHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(CLIENT_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
90 |
+ endef |
91 |
+ |
92 |
+ define DO_REF_CC_ALTIVEC |
93 |
+@@ -1181,7 +1181,7 @@ endef |
94 |
+ |
95 |
+ define DO_BOT_CC |
96 |
+ $(echo_cmd) "BOT_CC $<" |
97 |
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $< |
98 |
++$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(CPPFLAGS) $(BOTCFLAGS) $(OPTIMIZE) -DBOTLIB -o $@ -c $< |
99 |
+ endef |
100 |
+ |
101 |
+ ifeq ($(GENERATE_DEPENDENCIES),1) |
102 |
+@@ -1195,7 +1195,7 @@ endef |
103 |
+ |
104 |
+ define DO_DED_CC |
105 |
+ $(echo_cmd) "DED_CC $<" |
106 |
+-$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
107 |
++$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) $(CPPFLAGS) $(SERVER_CFLAGS) $(OPTIMIZE) -o $@ -c $< |
108 |
+ endef |
109 |
+ |
110 |
+ define DO_WINDRES |
111 |
|
112 |
diff --git a/games-fps/urbanterror/urbanterror-4.3.4_p20211208.ebuild b/games-fps/urbanterror/urbanterror-4.3.4_p20211208.ebuild |
113 |
new file mode 100644 |
114 |
index 000000000000..5a8e0c3737e8 |
115 |
--- /dev/null |
116 |
+++ b/games-fps/urbanterror/urbanterror-4.3.4_p20211208.ebuild |
117 |
@@ -0,0 +1,172 @@ |
118 |
+# Copyright 1999-2022 Gentoo Authors |
119 |
+# Distributed under the terms of the GNU General Public License v2 |
120 |
+ |
121 |
+EAPI=8 |
122 |
+ |
123 |
+inherit desktop flag-o-matic toolchain-funcs xdg-utils |
124 |
+ |
125 |
+DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine" |
126 |
+HOMEPAGE="https://urbanterror.info https://github.com/mickael9/ioq3" |
127 |
+ |
128 |
+if [[ ${PV} == *9999 ]]; then |
129 |
+ inherit git-r3 |
130 |
+ EGIT_REPO_URI="https://github.com/mickael9/ioq3.git" |
131 |
+ EGIT_BRANCH="urt" |
132 |
+else |
133 |
+ COMMIT_ID="c988f7669bd70b59beb384563d4c8304062ae011" |
134 |
+ SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" |
135 |
+ S="${WORKDIR}/ioq3-${COMMIT_ID}" |
136 |
+ KEYWORDS="~amd64 ~x86" |
137 |
+fi |
138 |
+ |
139 |
+LICENSE="GPL-2" |
140 |
+SLOT="0" |
141 |
+IUSE="+altgamma +client +curl debug mumble openal +opus server +skeetshootmod voip vorbis" |
142 |
+REQUIRED_USE=" |
143 |
+ || ( client server ) |
144 |
+ voip? ( opus ) |
145 |
+" |
146 |
+ |
147 |
+DOCS=( ChangeLog README.md README.ioq3.md md4-readme.txt ) |
148 |
+ |
149 |
+PATCHES=( |
150 |
+ "${FILESDIR}"/${PN}-4.3.4_p20211208-respect-flags.patch |
151 |
+) |
152 |
+ |
153 |
+RDEPEND=" |
154 |
+ client? ( |
155 |
+ media-libs/libsdl2[X,sound,joystick,opengl,video] |
156 |
+ mumble? ( media-sound/mumble:= ) |
157 |
+ openal? ( media-libs/openal:= ) |
158 |
+ opus? ( media-libs/opusfile ) |
159 |
+ vorbis? ( media-libs/libvorbis ) |
160 |
+ ) |
161 |
+ curl? ( net-misc/curl ) |
162 |
+ ~games-fps/urbanterror-data-4.3.4 |
163 |
+ sys-libs/zlib:=[minizip] |
164 |
+ virtual/jpeg:0 |
165 |
+ x11-libs/libX11 |
166 |
+ x11-libs/libXxf86vm |
167 |
+" |
168 |
+ |
169 |
+DEPEND="${RDEPEND}" |
170 |
+ |
171 |
+pkg_pretend() { |
172 |
+ if use client; then |
173 |
+ if ! use openal && ! use opus && ! use vorbis; then |
174 |
+ ewarn |
175 |
+ ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!" |
176 |
+ fi |
177 |
+ fi |
178 |
+} |
179 |
+ |
180 |
+src_configure() { |
181 |
+ tc-export CC |
182 |
+ default |
183 |
+} |
184 |
+ |
185 |
+src_compile() { |
186 |
+ # Workaround for used zlib macro, which got renamed in Gentoo |
187 |
+ # wrt bug #449510 |
188 |
+ append-cppflags "-DOF=_Z_OF" |
189 |
+ |
190 |
+ local myemakeargs=( |
191 |
+ ARCH=$(usex amd64 "x86_64" "i686" ) |
192 |
+ DEFAULT_BASEDIR="/usr/share/urbanterror" |
193 |
+ BUILD_CLIENT=$(usex "client" 1 0) |
194 |
+ BUILD_SERVER=$(usex "server" 1 0) |
195 |
+ BUILD_BASEGAME=1 |
196 |
+ BUILD_MISSIONPACK=0 |
197 |
+ BUILD_GAME_SO=0 |
198 |
+ BUILD_GAME_QVM=0 |
199 |
+ BUILD_STANDALONE=1 |
200 |
+ SERVERBIN="Quake3-UrT-Ded" |
201 |
+ CLIENTBIN="Quake3-UrT" |
202 |
+ USE_RENDERER_DLOPEN=0 |
203 |
+ USE_YACC=0 |
204 |
+ BASEGAME="q3ut4" |
205 |
+ BASEGAME_CFLAGS="${CFLAGS}" |
206 |
+ USE_OPENAL=$(usex "openal" 1 0) |
207 |
+ USE_OPENAL_DLOPEN=$(usex "openal" 1 0) |
208 |
+ USE_CURL=$(usex "curl" 1 0) |
209 |
+ USE_CURL_DLOPEN=$(usex "curl" 1 0) |
210 |
+ USE_CODEC_VORBIS=$(usex "vorbis" 1 0) |
211 |
+ USE_CODEC_OPUS=$(usex "opus" 1 0) |
212 |
+ USE_MUMBLE=$(usex "mumble" 1 0) |
213 |
+ USE_SKEETMOD=$(usex "skeetshootmod" 1 0) |
214 |
+ USE_VOIP=$(usex "mumble" 1 0) |
215 |
+ USE_INTERNAL_LIBS=0 |
216 |
+ USE_LOCAL_HEADERS=0 |
217 |
+ USE_ALTGAMMA=$(usex "altgamma" 1 0) |
218 |
+ $(usex "debug" "debug" "release") |
219 |
+ ) |
220 |
+ emake "${myemakeargs[@]}" |
221 |
+} |
222 |
+ |
223 |
+src_install() { |
224 |
+ local myarch=$(usex amd64 "x86_64" "i386") |
225 |
+ local myreleasetype=$(usex debug "debug" "release") |
226 |
+ |
227 |
+ if use client; then |
228 |
+ newbin build/${myreleasetype}-linux-${myarch}/Quake3-UrT.${myarch} ${PN} |
229 |
+ # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html |
230 |
+ make_desktop_entry ${PN} "UrbanTerror" ${PN} |
231 |
+ fi |
232 |
+ |
233 |
+ if use server && ! use client; then |
234 |
+ # dedicated server only |
235 |
+ newbin build/${myreleasetype}-linux-${myarch}/Quake3-UrT-Ded.${myarch} ${PN}-ded |
236 |
+ fi |
237 |
+ |
238 |
+ einstalldocs |
239 |
+} |
240 |
+ |
241 |
+pkg_postinst() { |
242 |
+ use client && xdg_desktop_database_update |
243 |
+ |
244 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
245 |
+ # ^this is a new installation, so: |
246 |
+ if use openal; then |
247 |
+ elog "" |
248 |
+ elog "You might need to set:" |
249 |
+ elog " seta s_useopenal \"1\"" |
250 |
+ elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work." |
251 |
+ fi |
252 |
+ |
253 |
+ if use altgamma; then |
254 |
+ elog "" |
255 |
+ elog "You might need to set:" |
256 |
+ elog " seta r_altgamma \"1\"" |
257 |
+ elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work." |
258 |
+ elog "Be aware that altgamme works on a global scale, so external" |
259 |
+ elog "applications like redshift can cause trouble. Disabling" |
260 |
+ elog "these while playing is a usable workaround." |
261 |
+ fi |
262 |
+ |
263 |
+ if ! use altgamma; then |
264 |
+ elog "" |
265 |
+ elog "If you are using a modesetting graphics driver you might" |
266 |
+ elog "consider setting USE=\"altgamma\"." |
267 |
+ elog "For details take a look at:" |
268 |
+ elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222" |
269 |
+ fi |
270 |
+ |
271 |
+ if ! use client; then |
272 |
+ elog "" |
273 |
+ elog "You disabled client support. You won't be able to connect" |
274 |
+ elog "to any servers and play. If you want to do so, enable" |
275 |
+ elog "USE=\"client\"." |
276 |
+ fi |
277 |
+ |
278 |
+ if use skeetshootmod; then |
279 |
+ elog "" |
280 |
+ elog "You might need to set:" |
281 |
+ elog " seta sv_skeetshoot \"1\"" |
282 |
+ elog "in your ~/.q3a/q3ut4/q3config.cfg to use the skeetshoot mod." |
283 |
+ fi |
284 |
+ fi |
285 |
+} |
286 |
+ |
287 |
+pkg_postrm() { |
288 |
+ use client && xdg_desktop_database_update |
289 |
+} |