diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-07-04 11:38:27 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-07-04 11:56:02 -0400 |
commit | 0879cdd7c0900fd821a40296e7f362ff43079b92 (patch) | |
tree | 3c088b8e128c3802f8d3cff0e4af77f7ec4c8597 /games-fps | |
parent | dev-libs/d0_blind_id: add 1.0_p20201124 (diff) | |
download | gentoo-0879cdd7c0900fd821a40296e7f362ff43079b92.tar.gz gentoo-0879cdd7c0900fd821a40296e7f362ff43079b92.tar.bz2 gentoo-0879cdd7c0900fd821a40296e7f362ff43079b92.zip |
games-fps/xonotic: add 0.8.5
- add USE=X to make GLX variant optional (can build without X libs)
- enable sdl by default as it should make more sense than GLX nowadays,
and seems to be preferred upstream wrt xonotic.desktop
- drop USE=dedicated, disable X and sdl to get server-only
- drop USE=debug, all this does I can see is add -g -ggdb to CFLAGS
- drop USE=doc, upstream has deprecated the AFT docs in favor
of the markdown ones (install unconditionally)
- bump checkreqs
- install more icons and use upstream's .desktop files
- reduce reliance on the sed a bit and pass make args instead
- depend on dev-games/ode even if server-only wrt bug #801220
- bug #830499 and bug #830500 would only trigger when setting up
a clang toolchain for some reason, but is fixed with current layout
This could likely use more work (darkplaces does all sort of stuff
that could use more attention), but should work as expected albeit
not tested much (hopefully not missing anything).
Closes: https://bugs.gentoo.org/801220
Closes: https://bugs.gentoo.org/830499
Closes: https://bugs.gentoo.org/830500
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/xonotic/Manifest | 1 | ||||
-rw-r--r-- | games-fps/xonotic/xonotic-0.8.5.ebuild | 105 |
2 files changed, 106 insertions, 0 deletions
diff --git a/games-fps/xonotic/Manifest b/games-fps/xonotic/Manifest index aa9efcbb4121..e854cb4d25f8 100644 --- a/games-fps/xonotic/Manifest +++ b/games-fps/xonotic/Manifest @@ -1 +1,2 @@ DIST xonotic-0.8.2.zip 991045679 BLAKE2B 3005473da954492bb7387f9e0e13c2415e638877fa8b83e14872f3b04ed0fc21b82e18f51aa6c68e8bf02d09d4a73f290cbcaebdfa8c0a12ceb6582309baee8a SHA512 0787fcf326827ae0292e5917c7ff2c7fd79947209d4b62e7f83b8b828bec15b575da304e0631f9f163c9b0bd93bed13616e142398ff08cbdaaea890a939dfca5 +DIST xonotic-0.8.5.zip 1228561792 BLAKE2B 3f1391ff6522c8f6b7b4f717aecd6ffe852142d70e7cffff9cb5a602a69142c59850636cc1450aade5ae39088354170b819f696427ba8829bf7c375029f2430a SHA512 4ffc4b73eeb5f580d178a98419d5b44cbff0c56e356a62baa729b5b7a6c3d43b2b425b123428c9b1bf3f4718eaf61bcf5d62914521cc061c7563a253440c807e diff --git a/games-fps/xonotic/xonotic-0.8.5.ebuild b/games-fps/xonotic/xonotic-0.8.5.ebuild new file mode 100644 index 000000000000..de5cb5d5a726 --- /dev/null +++ b/games-fps/xonotic/xonotic-0.8.5.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2022 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 +} |