Skip to content

Commit

Permalink
games-fps/yamagi-quake2: version bump to 8.20
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Tsoy <[email protected]>
Closes: gentoo#29946
Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
puleglot authored and ionenwks committed Mar 9, 2023
1 parent 52ff205 commit 55f0de1
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 0 deletions.
5 changes: 5 additions & 0 deletions games-fps/yamagi-quake2/Manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
DIST quake2-8.10.tar.xz 2138064 BLAKE2B 80fbb467977d365aa19015eade8d6cb6004895f8f5a605cdbd840ac41ad2d8a51da1ef3653f401bd1e597c39185f273a5f9720570ad9899815e6bc064a323027 SHA512 390a3971d5473166e4c24ef93b1866ae4ca05d17f6c5906d0b7a5bd81d3fbfbff6756b8222af5e3bf2a2f738215375a9eb2947b8690aceb99ac2bf4125d19d25
DIST quake2-8.20.tar.xz 2152184 BLAKE2B 6616666bcc48f7d97d06e71744f6ebdd3ef6a2701b628fe6d7c26293f8b62586bd03037877a77c3c56660e6e11704e6149e8bd7aad3c5fe28964ee25278cd16f SHA512 5dbdbbf582494d16d00b9880ddea6de4b098a307dbe4ddf6bc90aa6b2bd2928c10fab40cf5dd63861e7a37f9c75b9afae6f43f8bfff3ee6704ca94f78ff9b7d2
DIST quake2-ctf-1.08.tar.xz 136468 BLAKE2B cce9f75333c03494dccc1a693c3c0a62194457673c17c59cd5d08a06a11daa769dabaf787c04d9de291c7cc255b4decef06ae5f045c5bc7bc3f4008f0e6babdb SHA512 3d3343ae5287c5f01efd3363ede19f2e41cc8d083691c928afd9e4a81c0b46f6002eb2ed99d11742b7c04f8ea728a1dbb3b5d26ce4fd1066b4f49e3fb664317e
DIST quake2-ctf-1.09.tar.xz 136564 BLAKE2B 352dd4a8a7a10b28ecff49bf61517fa39f4836e3f40fc41f234d5bb845467e1e87a385d4f4786d61228e2d9bcbb8647b660f054ea72af826b7fefb052f946d7d SHA512 2ba40ef7c973cc57aa632e3a102784f5819109019dc5e614ff376e69ba85a21a85171c713c1c55a023f17ba2f2f8f888acbf37e103e39d4f21cc498d167a0aa6
DIST quake2-ref_vk-1.0.2.tar.gz 295693 BLAKE2B 422fa9f406302140c0cad4994f4e33a6b145dd954417635a73406fd5d888ed8884d335a15e13069881d8102aa87157f0061553c3c3dc253b5fdb40b389b0027f SHA512 5b6d72a6a769cd9171a6ac2776f9c637e527800b3214e1799041e0c19c9b258130b6fb67812e5c889a1b1f593edd14c23ea4aa00cbfec06e68ef8aeb132a7102
DIST quake2-ref_vk-1.0.4.tar.gz 301286 BLAKE2B f5b03e451a5e341fcce4db353d71dd80f579326e7d7d6db899e17490f74d4d2b74b6186a57a614bb82b8460f59d3b0ad0f60f8045ff6ad35bbc14ebb54cb8e1e SHA512 9db1b75c2676d22e10fe0d9954349585d055eb29a58d63e04a023670d1a60f8bc8fc0b8ecfc854edd1f464d6200a58d56dd8fdd3489389047e2e5198fdf756a3
DIST quake2-rogue-2.09.tar.xz 305548 BLAKE2B d0623a68b52faf87caa974ba9bcf511e24b132b3fb371dea312c8ff8edab943fcdcfd0bf4278cb996c9b8b85da5c61a1b276e3f0d4493d2e69615908c4f6c01e SHA512 f69fe00c1d3484280231b4ec625aff5f3135f013398014d01ed3823834f17bcbc8930911843b00b088a8247e42ce5074f5b2a029ff2a695ed65e8561ed563de5
DIST quake2-rogue-2.10.tar.xz 306052 BLAKE2B 3b77949857014dd0fa96ad14eabe9548f18cdc47a7620c2dba89709d5d0747e05a22a5b50fe6ee7599ae61969572fa4b26334615947991008b8187df6eb1d19a SHA512 52929c3d483b569a90f4e3183ffe0525ee5f73cd50ef12148e9c3894ee5e9ec73b3458677fcdeae4df4a93bd49ef9e43d6ff3c4ab989e982018d3e76a76e4fc0
DIST quake2-xatrix-2.10.tar.xz 214664 BLAKE2B 858a33c10ad3378449cf96cf4cec45bbbeb0680eb7296a6ab9a266dcb83053a1ea784f171b3b163426583ce2bd4b5631daa0b327a9c4ab1c13ab469a62a3d85d SHA512 fa6c008fba766e0ec159ab0a9ea72fb4bcf33c428f5b5c37a0611c9f2052f147d14af9872bbccdfdf4ab485bf523398c32dfa91a767b715a2dc84355b7e1d204
DIST quake2-xatrix-2.11.tar.xz 215284 BLAKE2B d763005e33d4d5db7c8ca9c93597e6a2d207cb9fb6f3fdbc758c148833226006caa7ebdb23865a6aa434e367d2259e630da177033a6760c7b1e51044cff4cb0b SHA512 a9f668804feb942a65eae1a537a4c26c079511d9dc7bf339fb9e1dff1de4dce8d0795813387e15947d0906044a75de7411d1c84f290b64e37f417d3fdf2fa5b0
151 changes: 151 additions & 0 deletions games-fps/yamagi-quake2/yamagi-quake2-8.20.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit desktop toolchain-funcs wrapper

CTF_V="1.09"
ROGUE_V="2.10"
XATRIX_V="2.11"
REF_VK_V="1.0.4"

DESCRIPTION="Quake 2 engine focused on single player"
HOMEPAGE="https://www.yamagi.org/quake2/"
SRC_URI="https://deponie.yamagi.org/quake2/quake2-${PV}.tar.xz
ctf? ( https://deponie.yamagi.org/quake2/quake2-ctf-${CTF_V}.tar.xz )
rogue? ( https://deponie.yamagi.org/quake2/quake2-rogue-${ROGUE_V}.tar.xz )
xatrix? ( https://deponie.yamagi.org/quake2/quake2-xatrix-${XATRIX_V}.tar.xz )
vulkan? ( https://github.com/yquake2/ref_vk/archive/refs/tags/v${REF_VK_V}.tar.gz ->
quake2-ref_vk-${REF_VK_V}.tar.gz )
"
S="${WORKDIR}/quake2-${PV}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
IUSE="+client ctf dedicated gles openal +opengl rogue softrender vulkan xatrix"
REQUIRED_USE="
|| ( client dedicated )
client? ( || ( opengl gles softrender vulkan ) )
"

RDEPEND="
client? (
media-libs/libsdl2[opengl?,video,vulkan?]
net-misc/curl
gles? (
media-libs/libglvnd
media-libs/libsdl2[gles2]
)
openal? ( media-libs/openal )
!openal? ( media-libs/libsdl2[sound] )
opengl? ( media-libs/libglvnd[X] )
)
"
DEPEND="${RDEPEND}
client? ( vulkan? ( dev-util/vulkan-headers ) )
"

PATCHES=( "${FILESDIR}"/${PN}-8.01-execinfo.patch )

DOCS=( CHANGELOG README.md doc )

src_compile() {
tc-export CC

local targets=( game )
local emakeargs=(
VERBOSE=1
WITH_EXECINFO=$(usex elibc_musl no yes)
WITH_SYSTEMWIDE=yes
WITH_SYSTEMDIR="${EPREFIX}"/usr/share/quake2
WITH_OPENAL=$(usex openal)
)

if use client; then
targets+=( client )
use gles && targets+=( ref_gles3 )
use opengl && targets+=( ref_gl1 ref_gl3 )
use softrender && targets+=( ref_soft )
fi
use dedicated && targets+=( server )

emake "${emakeargs[@]}" config
emake "${emakeargs[@]}" "${targets[@]}"

if use client && use vulkan; then
emake -C "${WORKDIR}"/ref_vk-${REF_VK_V} VERBOSE=1
fi

local addon
for addon in $(usev ctf) $(usev rogue) $(usev xatrix); do
emake -C "${WORKDIR}"/quake2-${addon}-* VERBOSE=1
done
}

src_install() {
insinto /usr/lib/yamagi-quake2
# Yamagi Quake II expects all binaries to be in the same directory
# See doc/070_packaging.md for more info
exeinto /usr/lib/yamagi-quake2
doins -r release/.

if use client; then
doexe release/quake2
dosym ../lib/yamagi-quake2/quake2 /usr/bin/yquake2

newicon stuff/icon/Quake2.svg "yamagi-quake2.svg"
make_desktop_entry "yquake2" "Yamagi Quake II"

if use vulkan; then
doins "${WORKDIR}"/ref_vk-${REF_VK_V}/release/ref_vk.so
fi
fi

if use dedicated; then
doexe release/q2ded
dosym ../lib/yamagi-quake2/q2ded /usr/bin/yq2ded
fi

insinto /usr/lib/yamagi-quake2/baseq2
doins stuff/yq2.cfg

local addon
for addon in $(usev ctf) $(usev rogue) $(usev xatrix); do
insinto /usr/lib/yamagi-quake2/${addon}
doins "${WORKDIR}"/quake2-${addon}-*/release/game.so

if use client; then
local addon_name
case ${addon} in
ctf) addon_name="CTF" ;;
rogue) addon_name="Ground Zero" ;;
xatrix) addon_name="The Reckoning" ;;
esac

make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
fi
done

keepdir /usr/share/quake2

einstalldocs
if use client; then
docinto examples
dodoc stuff/cdripper.sh
fi
}

pkg_postinst() {
if [[ -z ${REPLACING_VERSIONS} ]]; then
elog
elog "In order to play, you should do one of the following things:"
elog " - install games-fps/quake2-data or games-fps/quake2-demodata;"
elog " - manually copy game data files into ~/.yq2/ or"
elog " ${EROOT}/usr/share/quake2/."
elog "Read ${EROOT}/usr/share/doc/${PF}/README.md* for more information."
elog
fi
}

0 comments on commit 55f0de1

Please sign in to comment.