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/yamagi-quake2/
Date: Mon, 17 Sep 2018 15:46:46
Message-Id: 1537198670.01dfab5cfc481506b0af4e468d2528dc543a8a4c.mgorny@gentoo
1 commit: 01dfab5cfc481506b0af4e468d2528dc543a8a4c
2 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
3 AuthorDate: Sun Sep 9 13:33:31 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 17 15:37:50 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01dfab5c
7
8 games-fps/yamagi-quake2: version bump to 7.30
9
10 Changes in ebuild reflects the following upstream changes:
11 - external dependencies on libvorbis/libogg and libz are gone;
12 - libopenal cannot be linked at compile time anymore;
13 - support for SDL 1.2 and CD-audio playback is gone.
14
15 games-fps/yamagi-quake2/Manifest | 1 +
16 games-fps/yamagi-quake2/yamagi-quake2-7.30.ebuild | 149 ++++++++++++++++++++++
17 2 files changed, 150 insertions(+)
18
19 diff --git a/games-fps/yamagi-quake2/Manifest b/games-fps/yamagi-quake2/Manifest
20 index d7bff3d4fa9..677801d4605 100644
21 --- a/games-fps/yamagi-quake2/Manifest
22 +++ b/games-fps/yamagi-quake2/Manifest
23 @@ -1,5 +1,6 @@
24 DIST quake2-7.20.tar.xz 1852212 BLAKE2B 87a19be70680866b8b697ea4632239d33fe196dc648553d4a113025d9dc7996a27db2ec0178b28c04ad77854400d9f159bd800681a2bdf5a0121ef764e163ecb SHA512 466c21777e07da6aaec29cf9d3c9246a23d2157398a7e5ff1ad006f0fa7fd89e379b109936780361f03722f896ac34a188d12fc0a51cb543079e07aa6c9240df
25 DIST quake2-7.21.tar.xz 1854928 BLAKE2B c8a97503b5304d6f02d562495970e49b7cb7db41ff4a5c726f69c3f6df145e9dccd4d66e217176ae9bcc31fed16c8d595bc969b4bf32e3e12aced2875c857847 SHA512 ddd0811b9c3b55dd5df9fa028951882d5aa40769ba518f42c8f37643bb7a397c125a8897d9dc10306d466d4aeb927ea685b29470cbde29e6fbd6d2d0aafa7c1a
26 +DIST quake2-7.30.tar.xz 1939836 BLAKE2B 3e952c65cc535f8e1cbe69953c302e681d15f4227fce8bf4a2a0fdadefc8ceb7137e5427cd969ad55b9c2aa994131a0dec71611957f71dbcc9559b9cbc9f4322 SHA512 ea352353c8d6f2c396534208c2f287a06cd6c9d9e60248a6a7f26a84c0cc8b21ab890e06591e470ceea09a1234f5c2dbc1b171f4dbca62d91b2ac33812fdf2e7
27 DIST quake2-ctf-1.05.tar.xz 134872 BLAKE2B eb987004b1c1b1743ec532b6bea96a257957377cbdb0571d6c6e7b2dae6c1b7abc154233d4f9d3af6fb546d7810e5c041b8e9293de2e409a7cace88aa455f526 SHA512 9eb951f4a9d7abc5f9a2ca53d886f68b745c1efdf3fea14db2e071b8d1592d33579c5fa56326aa583269a4810e16a7eda8dcd8930e36782cb4fcb8578c44951b
28 DIST quake2-rogue-2.04.tar.xz 240436 BLAKE2B e7c3660378fe40b3f514b6e1de8714e3d3550baa244897b98bb81f362fa2b0aa57e3abceb5a38ea77cfec7621e2fcfab342a45bf9b66ccd0e44cc70292888fc2 SHA512 546deb74175c60ed7e5600a3d4b1c983fc0b1fae5922ebdb8fc3cdc5584931a0a5e34914ec2cd4ef9815323ba82cb56d427986d5c91dc040d6b68baff68ca5a8
29 DIST quake2-xatrix-2.05.tar.xz 189888 BLAKE2B 9d884af6033d529ce8cca7a70a36608e45db47dab74ab0d88c04f4d928425cf22901b1299a69330bfa83810034c9f1eff2d9618b222db68564d81d569f0596cd SHA512 f7e14bb870eaf4515405f5f1162057669351a334993410101973b75e52d6d576c35c91112911f961ad122ebe664b294649e94e88a2f62b79f51e28d02f50487a
30
31 diff --git a/games-fps/yamagi-quake2/yamagi-quake2-7.30.ebuild b/games-fps/yamagi-quake2/yamagi-quake2-7.30.ebuild
32 new file mode 100644
33 index 00000000000..f8c0f14af23
34 --- /dev/null
35 +++ b/games-fps/yamagi-quake2/yamagi-quake2-7.30.ebuild
36 @@ -0,0 +1,149 @@
37 +# Copyright 1999-2018 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +inherit desktop eutils
43 +
44 +CTF_V=1.05
45 +ROGUE_V=2.04
46 +XATRIX_V=2.05
47 +
48 +DESCRIPTION="Quake 2 engine focused on single player"
49 +HOMEPAGE="https://www.yamagi.org/quake2/"
50 +SRC_URI="https://deponie.yamagi.org/quake2/quake2-${PV}.tar.xz
51 + ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-${CTF_V}.tar.xz )
52 + rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-${ROGUE_V}.tar.xz )
53 + xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-${XATRIX_V}.tar.xz )"
54 +
55 +LICENSE="GPL-2"
56 +SLOT="0"
57 +KEYWORDS="~amd64 ~x86"
58 +IUSE="+client ctf dedicated openal +opengl rogue softrender xatrix"
59 +REQUIRED_USE="|| ( client dedicated ) client? ( || ( opengl softrender ) )"
60 +
61 +COMMON_DEPEND="
62 + client? (
63 + media-libs/libsdl2[video]
64 + openal? ( media-libs/openal )
65 + !openal? ( media-libs/libsdl2[sound] )
66 + opengl? (
67 + media-libs/libsdl2[opengl]
68 + virtual/opengl
69 + )
70 + )
71 +"
72 +RDEPEND="${COMMON_DEPEND}
73 + client? ( openal? ( media-libs/openal ) )
74 +"
75 +
76 +DEPEND="${COMMON_DEPEND}"
77 +
78 +S="${WORKDIR}/quake2-${PV}"
79 +
80 +PATCHES=(
81 + "${FILESDIR}"/${PN}-respect-flags.patch
82 +)
83 +DOCS=( CHANGELOG CONTRIBUTE README.md )
84 +
85 +mymake() {
86 + emake \
87 + VERBOSE=1 \
88 + WITH_SYSTEMWIDE=yes \
89 + WITH_SYSTEMDIR="${EPREFIX}"/usr/share/games/quake2 \
90 + WITH_OPENAL=$(usex openal) \
91 + "$@"
92 +}
93 +
94 +src_prepare() {
95 + local addon
96 + for addon in ctf rogue xatrix; do
97 + use ${addon} || continue
98 +
99 + pushd "${WORKDIR}"/quake2-${addon}-* >/dev/null || die
100 + eapply -l -- "${FILESDIR}"/${PN}-addon-respect-flags.patch
101 + popd >/dev/null || die
102 + done
103 +
104 + default
105 +}
106 +
107 +src_compile() {
108 + local targets=( game )
109 + if use client; then
110 + targets+=( client )
111 + use opengl && targets+=( ref_gl1 ref_gl3 )
112 + use softrender && targets+=( ref_soft )
113 + fi
114 + use dedicated && targets+=( server )
115 +
116 + mymake config
117 + mymake "${targets[@]}"
118 +
119 + local addon
120 + for addon in ctf rogue xatrix; do
121 + use ${addon} || continue
122 + emake -C "${WORKDIR}"/quake2-${addon}-* VERBOSE=1
123 + done
124 +}
125 +
126 +src_install() {
127 + insinto /usr/lib/yamagi-quake2
128 + # Yamagi Quake II expects all binaries to be in the same directory
129 + # See stuff/packaging.md for more info
130 + exeinto /usr/lib/yamagi-quake2
131 + doins -r release/.
132 +
133 + if use client; then
134 + doexe release/quake2
135 + dosym ../lib/yamagi-quake2/quake2 /usr/bin/yquake2
136 +
137 + newicon stuff/icon/Quake2.svg "yamagi-quake2.svg"
138 + make_desktop_entry "yquake2" "Yamagi Quake II"
139 + fi
140 +
141 + if use dedicated; then
142 + doexe release/q2ded
143 + dosym ../lib/yamagi-quake2/q2ded /usr/bin/yq2ded
144 + fi
145 +
146 + insinto /usr/lib/yamagi-quake2/baseq2
147 + doins stuff/yq2.cfg
148 +
149 + local addon
150 + for addon in ctf rogue xatrix; do
151 + use ${addon} || continue
152 +
153 + insinto /usr/lib/yamagi-quake2/${addon}
154 + doins "${WORKDIR}"/quake2-${addon}-*/release/game.so
155 +
156 + if use client; then
157 + local addon_name
158 + case ${addon} in
159 + ctf) addon_name="CTF" ;;
160 + rogue) addon_name="Ground Zero" ;;
161 + xatrix) addon_name="The Reckoning" ;;
162 + esac
163 +
164 + make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
165 + make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
166 + fi
167 + done
168 +
169 + einstalldocs
170 + if use client; then
171 + docinto examples
172 + dodoc stuff/cdripper.sh
173 + fi
174 +}
175 +
176 +pkg_postinst() {
177 + if [[ -z ${REPLACING_VERSIONS} ]]; then
178 + elog
179 + elog "In order to play, you must at least install:"
180 + elog "games-fps/quake2-data or games-fps/quake2-demodata or copy game"
181 + elog "data files to ~/.yq2/ or ${EPREFIX}/usr/share/games/quake2/ manually."
182 + elog "Read ${EPREFIX}/usr/share/doc/${PF}/README.md* for more information."
183 + elog
184 + fi
185 +}