minazuki-overlay/games-engines/ioquake3/ioquake3-1.36.9999.ebuild
Shin'ya Minazuki 21782e92ea games-engines/ioquake3: add user/group for dedicated server USE flag
Signed-off-by: Shin'ya Minazuki <shinyoukai@chaotic.ninja>
2026-07-06 13:24:15 -03:00

86 lines
2 KiB
Bash

# Copyright 2026 Shin'ya Minazuki
EAPI=8
inherit cmake git-r3 wrapper
DESCRIPTION="Community effort to maintain and improve the id Tech 3 engine"
HOMEPAGE="https://www.ioquake3.org/"
EGIT_REPO_URI="https://github.com/ioquake/ioq3"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
curl? ( net-misc/curl )
freetype? ( media-libs/freetype )
mumble? ( net-voip/mumble )
ogg? (
media-libs/libogg
media-libs/libvorbis
)
openal? ( media-libs/openal )
opus? (
media-libs/opus
media-libs/opusfile
)
server? (
acct-group/ioq3ded
acct-user/ioq3ded
)
media-libs/libjpeg-turbo
media-libs/libsdl2
sys-libs/zlib
"
RDEPEND="${DEPEND}"
BDEPEND="
app-alternatives/yacc
virtual/pkgconfig
"
IUSE="+client curl freetype mumble ogg openal opus +renderer_gl1 +renderer_gl2 +server voip"
REQUIRED_USE="
voip? ( openal )
"
src_configure() {
local -a mycmakeargs=(
-DBUILD_CLIENT=$(usex client)
-DBUILD_SERVER=$(usex server)
-DBUILD_RENDERER_GL1=$(usex renderer_gl1)
-DBUILD_RENDERER_GL2=$(usex renderer_gl2)
-DBUILD_GAME_LIBRARIES=ON
-DBUILD_GAME_QVMS=ON
-DBUILD_STANDALONE=OFF
-DUSE_OPENAL=$(usex openal)
-DUSE_CODEC_VORBIS=$(usex ogg)
-DUSE_CODEC_OPUS=$(usex opus)
-DUSE_HTTP=$(usex curl)
-DUSE_VOIP=$(usex voip)
-DUSE_MUMBLE=$(usex mumble)
-DUSE_FREETYPE=$(usex freetype)
-DUSE_INTERNAL_LIBS=OFF
# Extra compilation time for yet unknown benefit
# Disable by default
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF
-DCMAKE_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/${PN}
)
cmake_src_configure
}
src_install() {
cmake_src_install
use client && make_wrapper ${PN} "/usr/$(get_libdir)/${PN}/${PN}"
if use server; then
make_wrapper ioq3ded "/usr/$(get_libdir)/${PN}/ioq3ded"
newinitd "${FILESDIR}/ioq3ded.initd-r0" ioq3ded
fi
}
pkg_postinst() {
elog "To play Quake III Arena (and Team Arena), please check out this page"
elog "for more information: https://ioquake3.org/buy/"
elog ""
elog "Alternatively, you can consider giving games-fps/openarena a shot"
elog ""
}