commit:     17d8226c45d3b6810062329891b3fd08fd946599
Author:     spykyvenator <spykyvenator <AT> protonmail <DOT> com>
AuthorDate: Mon Jul 17 11:51:11 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Jul 20 11:59:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d8226c

games-fps/xonotic: add 0.8.6

Closes: https://github.com/gentoo/gentoo/pull/31925
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-fps/xonotic/Manifest             |   1 +
 games-fps/xonotic/xonotic-0.8.6.ebuild | 105 +++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git a/games-fps/xonotic/Manifest b/games-fps/xonotic/Manifest
index 1e1cdbcaa3e9..bb6cfce6cfc1 100644
--- a/games-fps/xonotic/Manifest
+++ b/games-fps/xonotic/Manifest
@@ -1 +1,2 @@
 DIST xonotic-0.8.5.zip 1228561792 BLAKE2B 
3f1391ff6522c8f6b7b4f717aecd6ffe852142d70e7cffff9cb5a602a69142c59850636cc1450aade5ae39088354170b819f696427ba8829bf7c375029f2430a
 SHA512 
4ffc4b73eeb5f580d178a98419d5b44cbff0c56e356a62baa729b5b7a6c3d43b2b425b123428c9b1bf3f4718eaf61bcf5d62914521cc061c7563a253440c807e
+DIST xonotic-0.8.6.zip 1238439495 BLAKE2B 
f9a9823a2ef8a1a8790c92fe898599938ff39fe9a32bb1f3595a4b451237f7fca29385feeaf8164216713a2cbe2db4d78cadeee91bb08093dae4a7ad1588e4d4
 SHA512 
cb39879e96f19abb2877588c2d50c5d3e64dd68153bec3dd1bebedf4d765e506afa419c28381d7005aed664cb1a042571c132b5b319e4308cab67745d996c2a6

diff --git a/games-fps/xonotic/xonotic-0.8.6.ebuild 
b/games-fps/xonotic/xonotic-0.8.6.ebuild
new file mode 100644
index 000000000000..dba043261a73
--- /dev/null
+++ b/games-fps/xonotic/xonotic-0.8.6.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop check-reqs toolchain-funcs xdg
+
+DESCRIPTION="Fork of Nexuiz, Deathmatch FPS based on DarkPlaces, an advanced 
Quake 1 engine"
+HOMEPAGE="https://xonotic.org/";
+SRC_URI="https://dl.xonotic.org/${P}.zip";
+S="${WORKDIR}/${PN^}"
+
+LICENSE="GPL-3+ GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="X +alsa ode +sdl"
+
+# note: many dependencies are used through dlopen()
+COMMON_UIDEPEND="
+       media-libs/libogg
+       media-libs/libtheora
+       media-libs/libvorbis"
+RDEPEND="
+       dev-libs/d0_blind_id
+       media-libs/libjpeg-turbo:=
+       media-libs/libpng
+       media-libs/freetype:2
+       net-misc/curl
+       sys-libs/zlib:=
+       X? (
+               ${COMMON_UIDEPEND}
+               media-libs/libglvnd[X]
+               x11-libs/libX11
+               x11-libs/libXext
+               x11-libs/libXpm
+               x11-libs/libXxf86vm
+               alsa? ( media-libs/alsa-lib )
+       )
+       ode? ( dev-games/ode:=[double-precision] )
+       sdl? (
+               ${COMMON_UIDEPEND}
+               media-libs/libsdl2[joystick,opengl,sound,video]
+       )"
+DEPEND="
+       ${RDEPEND}
+       X? ( x11-base/xorg-proto )"
+BDEPEND="app-arch/unzip"
+
+CHECKREQS_DISK_BUILD="1500M"
+CHECKREQS_DISK_USR="1200M"
+
+src_prepare() {
+       default
+
+       sed -e 's|-O3 ||' \
+               -e '/^LDFLAGS_RELEASE/s/$(OPTIM_RELEASE)/$(GENTOO_LDFLAGS)/' \
+               -i source/darkplaces/makefile.inc || die
+}
+
+src_compile() {
+       tc-export CC
+
+       local emakeargs=(
+               -C source/darkplaces
+               DEFAULT_SNDAPI=$(usex alsa ALSA OSS)
+               DP_FS_BASEDIR="${EPREFIX}"/usr/share/${PN}
+               DP_LINK_ODE=$(usex ode shared no)
+               STRIP=:
+               CPUOPTIMIZATIONS="${CFLAGS}"
+               GENTOO_LDFLAGS="${LDFLAGS}"
+       )
+
+       # split for bug 473352
+       emake "${emakeargs[@]}" sv-release
+       use X && emake "${emakeargs[@]}" cl-release
+       use sdl && emake "${emakeargs[@]}" sdl-release
+}
+
+src_install() {
+       newbin {source/darkplaces/darkplaces,${PN}}-dedicated
+
+       if use X || use sdl; then
+               if use X; then
+                       newbin {source/darkplaces/darkplaces,${PN}}-glx
+                       domenu misc/logos/${PN}-glx.desktop
+               fi
+               if use sdl; then
+                       newbin {source/darkplaces/darkplaces,${PN}}-sdl
+                       domenu misc/logos/${PN}.desktop
+               fi
+
+               local size
+               for size in 16 22 24 32 48 128 256 512; do
+                       newicon -s ${size} 
misc/logos/icons_png/${PN}_${size}.png ${PN}.png
+               done
+               newicon -s scalable misc/logos/${PN}_icon.svg ${PN}.svg
+       fi
+
+       dodoc Docs/*.{md,txt}
+
+       insinto /usr/share/${PN}
+       doins -r key_0.d0pk server data
+
+       rm "${ED}"/usr/share/${PN}/server/.gitattributes || die
+}

Reply via email to