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/, games-fps/yamagi-quake2/files/
Date: Sat, 20 Apr 2019 23:25:12
Message-Id: 1555743117.79371c6073162a55dd76cfd218c1b080da342aea.mgorny@gentoo
1 commit: 79371c6073162a55dd76cfd218c1b080da342aea
2 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
3 AuthorDate: Sun Apr 7 22:54:36 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 06:51:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79371c60
7
8 games-fps/yamagi-quake2: version bump to 7.40
9
10 Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
11 Package-Manager: Portage-2.3.62, Repoman-2.3.11
12 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
13
14 games-fps/yamagi-quake2/Manifest | 4 +
15 .../yamagi-quake2-addon-respect-flags-r2.patch | 33 +++++
16 games-fps/yamagi-quake2/yamagi-quake2-7.40.ebuild | 149 +++++++++++++++++++++
17 3 files changed, 186 insertions(+)
18
19 diff --git a/games-fps/yamagi-quake2/Manifest b/games-fps/yamagi-quake2/Manifest
20 index 068b82c3215..8a129d523fa 100644
21 --- a/games-fps/yamagi-quake2/Manifest
22 +++ b/games-fps/yamagi-quake2/Manifest
23 @@ -1,5 +1,9 @@
24 DIST quake2-7.21.tar.xz 1854928 BLAKE2B c8a97503b5304d6f02d562495970e49b7cb7db41ff4a5c726f69c3f6df145e9dccd4d66e217176ae9bcc31fed16c8d595bc969b4bf32e3e12aced2875c857847 SHA512 ddd0811b9c3b55dd5df9fa028951882d5aa40769ba518f42c8f37643bb7a397c125a8897d9dc10306d466d4aeb927ea685b29470cbde29e6fbd6d2d0aafa7c1a
25 DIST quake2-7.30.tar.xz 1939836 BLAKE2B 3e952c65cc535f8e1cbe69953c302e681d15f4227fce8bf4a2a0fdadefc8ceb7137e5427cd969ad55b9c2aa994131a0dec71611957f71dbcc9559b9cbc9f4322 SHA512 ea352353c8d6f2c396534208c2f287a06cd6c9d9e60248a6a7f26a84c0cc8b21ab890e06591e470ceea09a1234f5c2dbc1b171f4dbca62d91b2ac33812fdf2e7
26 +DIST quake2-7.40.tar.xz 1972020 BLAKE2B be5c01dbcb226f343d18f9d318022edff56bac6f953a0b85cbe3c108451c51020339a12b63fd82803cb9cfbbc26f5dfc230b4cad870ab116cb0333baa0160173 SHA512 23ac94b3b5aa28ad7d36e585f00af4aa285db3f93044175c9f65169fb2f89f5d721a3833a386146cf278c4db47846a442ebd8acd98c97ffa6f149d5949dcd5b1
27 DIST quake2-ctf-1.05.tar.xz 134872 BLAKE2B eb987004b1c1b1743ec532b6bea96a257957377cbdb0571d6c6e7b2dae6c1b7abc154233d4f9d3af6fb546d7810e5c041b8e9293de2e409a7cace88aa455f526 SHA512 9eb951f4a9d7abc5f9a2ca53d886f68b745c1efdf3fea14db2e071b8d1592d33579c5fa56326aa583269a4810e16a7eda8dcd8930e36782cb4fcb8578c44951b
28 +DIST quake2-ctf-1.06.tar.xz 135464 BLAKE2B 457ab883ba9ecfb723d890f5c9e3da710aae4ed5fa4e530c8028b0fa93186350e6ed1b483b89ddf98cbb3f3b1992a15c33af5d181073395b61e5b9a7c9987d88 SHA512 24c58f895d4056127e6f714c618d53b80bd75968758d8aa729deba750297efd5d6c40bd69afd98ebbf0d231bd59909e6438ec64b258883d8cfd33d33e928b2f9
29 DIST quake2-rogue-2.04.tar.xz 240436 BLAKE2B e7c3660378fe40b3f514b6e1de8714e3d3550baa244897b98bb81f362fa2b0aa57e3abceb5a38ea77cfec7621e2fcfab342a45bf9b66ccd0e44cc70292888fc2 SHA512 546deb74175c60ed7e5600a3d4b1c983fc0b1fae5922ebdb8fc3cdc5584931a0a5e34914ec2cd4ef9815323ba82cb56d427986d5c91dc040d6b68baff68ca5a8
30 +DIST quake2-rogue-2.05.tar.xz 241120 BLAKE2B 58be655bfcba9c6ee66616dbedaf01c4329d656c205ad99910dccb095981a8f29b09d557e76f9e43df21f36eebeb5ad0c0f2788d2bee2bc1cfe68dda824df5d1 SHA512 521860cc3c46e8679f0dee2b9bc6c3a643439f560ad2437e2961e746285a95fa118201d516eefefdd8b5fe7da8ec5ea0c9fae8910751256a0d986300497631ff
31 DIST quake2-xatrix-2.05.tar.xz 189888 BLAKE2B 9d884af6033d529ce8cca7a70a36608e45db47dab74ab0d88c04f4d928425cf22901b1299a69330bfa83810034c9f1eff2d9618b222db68564d81d569f0596cd SHA512 f7e14bb870eaf4515405f5f1162057669351a334993410101973b75e52d6d576c35c91112911f961ad122ebe664b294649e94e88a2f62b79f51e28d02f50487a
32 +DIST quake2-xatrix-2.06.tar.xz 190560 BLAKE2B 945e80159cd7630280290f6930e1343fdf9dccdbd44d14cd5b36eccae9499d2cd6eddb1a3967721b61349fa60e48c720e4db66fdc1d8930628864c7fe2cd4ada SHA512 98557ed3fc4fddcd36d47dab207b8101b82f40bd976b11195b229a1073ec04216c06dc119269f287fbd9da0418671521ab6393008f2486ab113940d5fec6bfdc
33
34 diff --git a/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags-r2.patch b/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags-r2.patch
35 new file mode 100644
36 index 00000000000..bb800aeaf3c
37 --- /dev/null
38 +++ b/games-fps/yamagi-quake2/files/yamagi-quake2-addon-respect-flags-r2.patch
39 @@ -0,0 +1,33 @@
40 +--- quake2-xatrix-2.06.orig/Makefile 2019-02-05 10:56:06.000000000 +0300
41 ++++ quake2-xatrix-2.06/Makefile 2019-04-08 01:24:04.124176498 +0300
42 +@@ -75,11 +75,11 @@
43 + #
44 + # -MMD to generate header dependencies.
45 + ifeq ($(OSTYPE), Darwin)
46 +-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
47 +- -Wall -pipe -g -fwrapv -arch i386 -arch x86_64
48 ++CFLAGS += -fno-strict-aliasing -fomit-frame-pointer \
49 ++ -Wall -fwrapv -arch i386 -arch x86_64
50 + else
51 +-CFLAGS := -O2 -fno-strict-aliasing -fomit-frame-pointer \
52 +- -Wall -pipe -g -MMD -fwrapv
53 ++CFLAGS += -fno-strict-aliasing -fomit-frame-pointer \
54 ++ -Wall -MMD -fwrapv
55 + endif
56 +
57 + # ----------
58 +@@ -107,11 +107,11 @@
59 +
60 + # Base LDFLAGS.
61 + ifeq ($(OSTYPE), Darwin)
62 +-LDFLAGS := -shared -arch i386 -arch x86_64
63 ++LDFLAGS += -shared -arch i386 -arch x86_64
64 + else ifeq ($(OSTYPE), Windows)
65 +-LDFLAGS := -shared -static-libgcc
66 ++LDFLAGS += -shared -static-libgcc
67 + else
68 +-LDFLAGS := -shared
69 ++LDFLAGS += -shared
70 + endif
71 +
72 + # ----------
73
74 diff --git a/games-fps/yamagi-quake2/yamagi-quake2-7.40.ebuild b/games-fps/yamagi-quake2/yamagi-quake2-7.40.ebuild
75 new file mode 100644
76 index 00000000000..5e8aa0b53d2
77 --- /dev/null
78 +++ b/games-fps/yamagi-quake2/yamagi-quake2-7.40.ebuild
79 @@ -0,0 +1,149 @@
80 +# Copyright 1999-2019 Gentoo Authors
81 +# Distributed under the terms of the GNU General Public License v2
82 +
83 +EAPI=7
84 +
85 +inherit desktop eutils
86 +
87 +CTF_V=1.06
88 +ROGUE_V=2.05
89 +XATRIX_V=2.06
90 +
91 +DESCRIPTION="Quake 2 engine focused on single player"
92 +HOMEPAGE="https://www.yamagi.org/quake2/"
93 +SRC_URI="https://deponie.yamagi.org/quake2/quake2-${PV}.tar.xz
94 + ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-${CTF_V}.tar.xz )
95 + rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-${ROGUE_V}.tar.xz )
96 + xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-${XATRIX_V}.tar.xz )"
97 +
98 +LICENSE="GPL-2"
99 +SLOT="0"
100 +KEYWORDS="~amd64 ~x86"
101 +IUSE="+client ctf dedicated openal +opengl rogue softrender xatrix"
102 +REQUIRED_USE="|| ( client dedicated ) client? ( || ( opengl softrender ) )"
103 +
104 +COMMON_DEPEND="
105 + client? (
106 + media-libs/libsdl2[video]
107 + openal? ( media-libs/openal )
108 + !openal? ( media-libs/libsdl2[sound] )
109 + opengl? (
110 + media-libs/libsdl2[opengl]
111 + virtual/opengl
112 + )
113 + )
114 +"
115 +RDEPEND="${COMMON_DEPEND}
116 + client? ( openal? ( media-libs/openal ) )
117 +"
118 +
119 +DEPEND="${COMMON_DEPEND}"
120 +
121 +S="${WORKDIR}/quake2-${PV}"
122 +
123 +PATCHES=(
124 + "${FILESDIR}"/${PN}-respect-flags.patch
125 +)
126 +DOCS=( CHANGELOG README.md doc/. )
127 +
128 +mymake() {
129 + emake \
130 + VERBOSE=1 \
131 + WITH_SYSTEMWIDE=yes \
132 + WITH_SYSTEMDIR="${EPREFIX}"/usr/share/games/quake2 \
133 + WITH_OPENAL=$(usex openal) \
134 + "$@"
135 +}
136 +
137 +src_prepare() {
138 + local addon
139 + for addon in ctf rogue xatrix; do
140 + use ${addon} || continue
141 +
142 + pushd "${WORKDIR}"/quake2-${addon}-* >/dev/null || die
143 + eapply -l -- "${FILESDIR}"/${PN}-addon-respect-flags-r2.patch
144 + popd >/dev/null || die
145 + done
146 +
147 + default
148 +}
149 +
150 +src_compile() {
151 + local targets=( game )
152 + if use client; then
153 + targets+=( client )
154 + use opengl && targets+=( ref_gl1 ref_gl3 )
155 + use softrender && targets+=( ref_soft )
156 + fi
157 + use dedicated && targets+=( server )
158 +
159 + mymake config
160 + mymake "${targets[@]}"
161 +
162 + local addon
163 + for addon in ctf rogue xatrix; do
164 + use ${addon} || continue
165 + emake -C "${WORKDIR}"/quake2-${addon}-* VERBOSE=1
166 + done
167 +}
168 +
169 +src_install() {
170 + insinto /usr/lib/yamagi-quake2
171 + # Yamagi Quake II expects all binaries to be in the same directory
172 + # See stuff/packaging.md for more info
173 + exeinto /usr/lib/yamagi-quake2
174 + doins -r release/.
175 +
176 + if use client; then
177 + doexe release/quake2
178 + dosym ../lib/yamagi-quake2/quake2 /usr/bin/yquake2
179 +
180 + newicon stuff/icon/Quake2.svg "yamagi-quake2.svg"
181 + make_desktop_entry "yquake2" "Yamagi Quake II"
182 + fi
183 +
184 + if use dedicated; then
185 + doexe release/q2ded
186 + dosym ../lib/yamagi-quake2/q2ded /usr/bin/yq2ded
187 + fi
188 +
189 + insinto /usr/lib/yamagi-quake2/baseq2
190 + doins stuff/yq2.cfg
191 +
192 + local addon
193 + for addon in ctf rogue xatrix; do
194 + use ${addon} || continue
195 +
196 + insinto /usr/lib/yamagi-quake2/${addon}
197 + doins "${WORKDIR}"/quake2-${addon}-*/release/game.so
198 +
199 + if use client; then
200 + local addon_name
201 + case ${addon} in
202 + ctf) addon_name="CTF" ;;
203 + rogue) addon_name="Ground Zero" ;;
204 + xatrix) addon_name="The Reckoning" ;;
205 + esac
206 +
207 + make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
208 + make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
209 + fi
210 + done
211 +
212 + einstalldocs
213 + if use client; then
214 + docinto examples
215 + dodoc stuff/cdripper.sh
216 + fi
217 +}
218 +
219 +pkg_postinst() {
220 + if [[ -z ${REPLACING_VERSIONS} ]]; then
221 + elog
222 + elog "In order to play, you must at least install:"
223 + elog "games-fps/quake2-data or games-fps/quake2-demodata or copy game"
224 + elog "data files to ~/.yq2/ or ${EPREFIX}/usr/share/games/quake2/ manually."
225 + elog "Read ${EPREFIX}/usr/share/doc/${PF}/README.md* for more information."
226 + elog
227 + fi
228 +}