Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-fps/urbanterror/
Date: Tue, 13 Feb 2018 16:01:09
Message-Id: 1518537651.88fc306fb88e417d4bf0e8828df233a368c4abea.mgorny@gentoo
1 commit: 88fc306fb88e417d4bf0e8828df233a368c4abea
2 Author: Nils Freydank <holgersson <AT> posteo <DOT> de>
3 AuthorDate: Tue Feb 13 15:34:52 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 13 16:00:51 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88fc306f
7
8 games-fps/urbanterror: Version bump to 4.3.2_p20180211.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 games-fps/urbanterror/Manifest | 1 +
13 .../urbanterror/urbanterror-4.3.2_p20180211.ebuild | 166 +++++++++++++++++++++
14 2 files changed, 167 insertions(+)
15
16 diff --git a/games-fps/urbanterror/Manifest b/games-fps/urbanterror/Manifest
17 index e00fb4d8e24..624b5bf0267 100644
18 --- a/games-fps/urbanterror/Manifest
19 +++ b/games-fps/urbanterror/Manifest
20 @@ -1 +1,2 @@
21 DIST urbanterror-4.3.2_p20180206.tar.gz 10071986 BLAKE2B b809793f8bc1d878a97d882f60eef80124cff63ca5754f9178cdf9067acc2c6b52478362b8799c7b3718484d1a680ca932df8d97ebb34e35fc90eb2ae17582d6 SHA512 e4fcc53f9a7b8db1f5bc069acce5265db7009acc0588b29fff2a2b19b05d09f42cdb2c3f1811920221c75b6d3fc5f2e67fbb0f8476ee50644d8db9dd4f0b7c63
22 +DIST urbanterror-4.3.2_p20180211.tar.gz 10071334 BLAKE2B 43bdbb59c7f4d7a02e87035d446d4e9dc91a2b8d2299afb97b09aa91f4062b732a71e9d624058d947dc5005f911b60f5ad7242b75b96d7e6fe750a01bc4a5494 SHA512 f55052f3fe5984af7d75aad95dc0673398839f8f79ed9d2a74865072f700712c9968c51e13e8e12d5b4c6b508a0a51b830d8c0afa159b88dba8200f7854f3da6
23
24 diff --git a/games-fps/urbanterror/urbanterror-4.3.2_p20180211.ebuild b/games-fps/urbanterror/urbanterror-4.3.2_p20180211.ebuild
25 new file mode 100644
26 index 00000000000..d96a973d082
27 --- /dev/null
28 +++ b/games-fps/urbanterror/urbanterror-4.3.2_p20180211.ebuild
29 @@ -0,0 +1,166 @@
30 +# Copyright 1999-2018 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI="6"
34 +inherit eapi7-ver flag-o-matic toolchain-funcs xdg-utils
35 +
36 +DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine"
37 +HOMEPAGE="http://urbanterror.info https://github.com/mickael9/ioq3"
38 +
39 +if [[ ${PV} == *9999 ]]; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/mickael9/ioq3.git"
42 + EGIT_BRANCH="urt"
43 +else
44 + COMMIT_ID="41425855eba78b31dde895116c4db2e8ce77a2b8"
45 + SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
46 + S="${WORKDIR}/ioq3-${COMMIT_ID}"
47 + KEYWORDS="~amd64 ~x86"
48 +fi
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0"
52 +IUSE="+altgamma +client +curl debug mumble openal +opus server +skeetshootmod voip vorbis"
53 +REQUIRED_USE=" || ( client server )"
54 +
55 +PATCHES=( "${FILESDIR}"/${PN}-4.3-fix-build_system.patch )
56 +RDEPEND="
57 + client? (
58 + media-libs/libsdl2:=[X,sound,joystick,opengl,video]
59 + mumble? ( media-sound/mumble:= )
60 + openal? ( media-libs/openal:= )
61 + opus? ( media-libs/opusfile:= )
62 + vorbis? (
63 + media-libs/libogg:=
64 + media-libs/libvorbis:=
65 + )
66 + )
67 + curl? ( net-misc/curl )
68 + ~games-fps/urbanterror-data-4.3.2
69 + sys-libs/zlib:=[minizip]
70 + virtual/jpeg:0
71 +"
72 +
73 +DEPEND="${RDEPEND}"
74 +
75 +pkg_pretend() {
76 + if use client; then
77 + if ! use openal && ! use opus && ! use vorbis; then
78 + ewarn
79 + ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!"
80 + fi
81 + fi
82 +}
83 +
84 +src_configure() {
85 + default
86 +
87 + tc-export CC
88 +}
89 +
90 +src_compile() {
91 + # Workaround for used zlib macro, which got renamed in Gentoo
92 + # wrt bug #449510
93 + append-cppflags "-DOF=_Z_OF"
94 +
95 + local my_arch=$(usex amd64 "x86_64" "i386")
96 +
97 + emake \
98 + ARCH=${my_arch} \
99 + DEFAULT_BASEDIR="/usr/share/urbanterror" \
100 + BUILD_CLIENT=$(usex "client" 1 0) \
101 + BUILD_SERVER=$(usex "server" 1 0) \
102 + BUILD_BASEGAME=1 \
103 + BUILD_MISSIONPACK=0 \
104 + BUILD_GAME_SO=0 \
105 + BUILD_GAME_QVM=0 \
106 + BUILD_STANDALONE=1 \
107 + SERVERBIN="Quake3-UrT-Ded" \
108 + CLIENTBIN="Quake3-UrT" \
109 + USE_RENDERER_DLOPEN=0 \
110 + USE_YACC=0 \
111 + BASEGAME="q3ut4"\
112 + BASEGAME_CFLAGS="${CFLAGS}" \
113 + USE_OPENAL=$(usex "openal" 1 0) \
114 + USE_OPENAL_DLOPEN=$(usex "openal" 1 0) \
115 + USE_CURL=$(usex "curl" 1 0) \
116 + USE_CURL_DLOPEN=$(usex "curl" 1 0) \
117 + USE_CODEC_VORBIS=$(usex "vorbis" 1 0) \
118 + USE_CODEC_OPUS=$(usex "opus" 1 0) \
119 + USE_MUMBLE=$(usex "mumble" 1 0) \
120 + USE_SKEETMOD=$(usex "skeetshootmod" 1 0) \
121 + USE_VOIP=$(usex "mumble" 1 0) \
122 + USE_INTERNAL_LIBS=0 \
123 + USE_LOCAL_HEADERS=0 \
124 + USE_ALTGAMMA=$(usex "altgamma" 1 0)
125 +}
126 +
127 +src_install() {
128 + local my_arch=$(usex amd64 "x86_64" "i386")
129 + # docs from ioq3, not from UrbanTerror ZIP file
130 + dodoc ChangeLog README.md README.ioq3.md md4-readme.txt
131 +
132 + if use client; then
133 + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN}
134 + # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html
135 + make_desktop_entry ${PN} "UrbanTerror" ${PN}
136 + fi
137 +
138 + if use server && ! use client; then
139 + # dedicated server only
140 + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-ded
141 + fi
142 +}
143 +
144 +pkg_postinst() {
145 + use client && xdg_desktop_database_update
146 +
147 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
148 + # This is a new installation
149 + if use openal; then
150 + elog ""
151 + elog "You might need to set:"
152 + elog " seta s_useopenal \"1\""
153 + elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work."
154 + fi
155 +
156 + if use altgamma; then
157 + elog ""
158 + elog "You might need to set:"
159 + elog " seta r_altgamma \"1\""
160 + elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work."
161 + elog "Be aware that altgamme works on a global scale, so external"
162 + elog "applications like redshift can cause trouble. Disabling"
163 + elog "these while playing is a usable workaround."
164 + fi
165 +
166 + if ! use altgamma; then
167 + elog ""
168 + elog "If you are using a modesetting graphics driver you might"
169 + elog "consider setting USE=\"altgamma\"."
170 + elog "For details take a look at:"
171 + elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222"
172 + fi
173 +
174 + if ! use client; then
175 + elog ""
176 + elog "You disabled client support. You won't be able to connect"
177 + elog "to any servers and play. If you want to do so, enable"
178 + elog "USE=\"client\"."
179 + fi
180 + fi
181 +
182 + if ver_test -ge 4.3.2_p20171105; then
183 + # Yippee, new features!
184 + if use skeetshootmod; then
185 + elog ""
186 + elog "You might need to set:"
187 + elog " seta sv_skeetshoot \"1\""
188 + elog "in your ~/.q3a/q3ut4/q3config.cfg to use the skeetshoot mod."
189 + fi
190 + fi
191 +}
192 +
193 +pkg_postrm() {
194 + use client && xdg_desktop_database_update
195 +}