games-fps/worldofpadman: Set DEFAULT_BASEDIR, make_desktop_entry to --eapi9

- DEFAULT_BASEDIR=/usr/share/${PN} was set in 1.6, got lost in cmake port
  Game does not start without this set unless wop dir is copied to ~
- Remove unused bundled SDL2 libs to silence CMake QA Notice

See also:
https://github.com/gentoo/gentoo/pull/42805

Closes: https://bugs.gentoo.org/964479
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner 2025-12-08 21:22:55 +01:00
parent 263121ccb7
commit 67d5d8f966
No known key found for this signature in database
GPG Key ID: AE591BBC73E4DD5E

View File

@ -0,0 +1,92 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake desktop
DESCRIPTION="Cartoon style multiplayer first-person shooter"
HOMEPAGE="https://worldofpadman.net/"
SRC_URI="https://github.com/PadWorld-Entertainment/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/PadWorld-Entertainment/${PN}/releases/download/v${PV}/wop-${PV}-unified.zip"
LICENSE="GPL-2 worldofpadman"
SLOT="0"
KEYWORDS="~amd64"
IUSE="dedicated +opengl"
RDEPEND="
virtual/zlib:=
!dedicated? (
media-libs/libjpeg-turbo:=
media-libs/libsdl2[joystick,video,X]
media-libs/libtheora
media-libs/libogg
media-libs/libvorbis
media-libs/openal
net-misc/curl
virtual/glu
opengl? (
media-libs/libsdl2[opengl]
virtual/opengl
)
)
"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/unzip"
DOCS=( docs/id-readme.txt docs/ioq3-readme.md docs/voip-readme.txt CHANGELOG.md )
PATCHES=(
"${FILESDIR}"/${PN}-1.7-c23.patch # bug 944329, git main
)
src_prepare() {
rm -r libs/SDL2 || die # unused bundled lib, bug #964479
cmake_src_prepare
}
src_configure() {
local arch
if use amd64 ; then
arch=x86_64
elif use x86 ; then
arch=i386
fi
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX=/usr/share/${PN}
-DCMAKE_INSTALL_RPATH=/usr/share/${PN}
-DARCH=${arch}
-DBUILD_CLIENT=$(usex dedicated OFF ON)
-DBUILD_RENDERER_OPENGL2=$(usex opengl)
-DBUILD_RENDERER_VULKAN=OFF
-DUSE_CURL_DLOPEN=OFF
-DUSE_OPENAL_DLOPEN=OFF
-DUSE_RENDERER_DLOPEN=OFF
-DDEFAULT_BASEDIR=/usr/share/${PN}
)
cmake_src_configure
}
src_install() {
cmake_src_install
mkdir -p "${ED}"/usr/bin || die
mv "${ED}"/usr/share/${PN}/wopded.* "${ED}"/usr/bin/${PN}-ded || die
if ! use dedicated ; then
mv "${ED}"/usr/share/${PN}/wop.* "${ED}"/usr/bin/${PN} || die
newicon misc/wop.svg ${PN}.svg
make_desktop_entry --eapi9 ${PN} -n "World of Padman"
fi
insinto /usr/share/${PN}/wop
doins "${WORKDIR}"/wop/*.pk3
doins "${WORKDIR}"/wop/*.cfg
local HTML_DOCS=( XTRAS/{readme,readme.html} )
einstalldocs
}