[games-fps/urbanterror] Switch from dedicated to client USE.
This commit is contained in:
parent
a0dc3acb43
commit
daf6747f6e
@ -15,11 +15,11 @@
|
|||||||
</maintainer>
|
</maintainer>
|
||||||
<use>
|
<use>
|
||||||
<flag name="altgamma">Alternative way for gamma setting with modesetting driver</flag>
|
<flag name="altgamma">Alternative way for gamma setting with modesetting driver</flag>
|
||||||
<flag name="dedicated">Build only server target - dedicated to hosting a server</flag>
|
<flag name="client">Build binary for client (includes code for non-dedicated server)</flag>
|
||||||
<flag name="opus">Use opus as sound codec</flag>
|
<flag name="opus">Use opus as sound codec</flag>
|
||||||
<flag name="mumble">Use Mumble for in-game VoIP (experimental)</flag>
|
<flag name="mumble">Use Mumble for ingame VoIP (experimental)</flag>
|
||||||
<flag name="voip">Use ioq3 ingame VoIP (experimental)</flag>
|
<flag name="voip">Use ioq3 ingame VoIP (experimental)</flag>
|
||||||
<flag name="server">Build server target</flag>
|
<flag name="server">Build binary for dedicated server</flag>
|
||||||
</use>
|
</use>
|
||||||
<upstream>
|
<upstream>
|
||||||
<remote-id type="github">Barbatos/ioq3-for-UrbanTerror-4</remote-id>
|
<remote-id type="github">Barbatos/ioq3-for-UrbanTerror-4</remote-id>
|
||||||
|
@ -12,14 +12,15 @@ EGIT_BRANCH="urt"
|
|||||||
LICENSE="GPL-2"
|
LICENSE="GPL-2"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS=""
|
KEYWORDS=""
|
||||||
IUSE="+altgamma +curl debug dedicated mumble openal +opus server +sdl voip vorbis"
|
IUSE="+altgamma +client +curl debug mumble openal +opus server +sdl voip vorbis"
|
||||||
PATCHES=(
|
REQUIRED_USE=" || ( client server )"
|
||||||
"${FILESDIR}"/${P}-respect_CFLAGS.patch
|
|
||||||
)
|
PATCHES=( "${FILESDIR}"/${P}-respect_CFLAGS.patch )
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
!dedicated? (
|
curl? ( net-misc/curl )
|
||||||
|
client? (
|
||||||
virtual/opengl
|
virtual/opengl
|
||||||
curl? ( net-misc/curl )
|
|
||||||
openal? ( media-libs/openal )
|
openal? ( media-libs/openal )
|
||||||
sdl? ( media-libs/libsdl[X,sound,joystick,opengl,video] )
|
sdl? ( media-libs/libsdl[X,sound,joystick,opengl,video] )
|
||||||
!sdl? ( x11-libs/libX11
|
!sdl? ( x11-libs/libX11
|
||||||
@ -33,12 +34,11 @@ RDEPEND="
|
|||||||
)
|
)
|
||||||
~games-fps/urbanterror-data-4.3.2
|
~games-fps/urbanterror-data-4.3.2
|
||||||
sys-libs/zlib[minizip]"
|
sys-libs/zlib[minizip]"
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}"
|
||||||
dedicated? ( curl? ( net-misc/curl ) )"
|
|
||||||
|
|
||||||
pkg_pretend() {
|
pkg_pretend() {
|
||||||
if ! use dedicated ; then
|
if use client; then
|
||||||
if ! use openal && ! use opus && ! use vorbis ; then
|
if ! use openal && ! use opus && ! use vorbis; then
|
||||||
ewarn
|
ewarn
|
||||||
ewarn "Sound support disabled. Enable 'openal' or 'opus' or 'vorbis' useflag."
|
ewarn "Sound support disabled. Enable 'openal' or 'opus' or 'vorbis' useflag."
|
||||||
ewarn
|
ewarn
|
||||||
@ -54,8 +54,8 @@ src_compile() {
|
|||||||
emake \
|
emake \
|
||||||
ARCH=$(usex amd64 "x86_64" "i386") \
|
ARCH=$(usex amd64 "x86_64" "i386") \
|
||||||
DEFAULT_BASEDIR="/usr/share/urbanterror" \
|
DEFAULT_BASEDIR="/usr/share/urbanterror" \
|
||||||
BUILD_CLIENT=$(nobuildit dedicated) \
|
BUILD_CLIENT=$(buildit client) \
|
||||||
BUILD_SERVER=$(usex dedicated "1" "$(buildit server)") \
|
BUILD_SERVER=$(buildit server) \
|
||||||
BUILD_BASEGAME=1 \
|
BUILD_BASEGAME=1 \
|
||||||
BUILD_MISSIONPACK=0 \
|
BUILD_MISSIONPACK=0 \
|
||||||
BUILD_GAME_SO=0 \
|
BUILD_GAME_SO=0 \
|
||||||
@ -87,25 +87,26 @@ src_install() {
|
|||||||
# docs from ioq3, not from UrbanTerror ZIP file
|
# docs from ioq3, not from UrbanTerror ZIP file
|
||||||
dodoc ChangeLog README.md README.ioq3.md md4-readme.txt
|
dodoc ChangeLog README.md README.ioq3.md md4-readme.txt
|
||||||
|
|
||||||
if use !dedicated ; then
|
if use client; then
|
||||||
newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN}
|
newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN}
|
||||||
# Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html
|
# Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html
|
||||||
make_desktop_entry ${PN} "UrbanTerror" ${PN} Games;Shooter
|
make_desktop_entry ${PN} "UrbanTerror" ${PN} Games;Shooter
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use dedicated || use server ; then
|
# means: dedicated server only
|
||||||
newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-dedicated
|
if use server && ! use client; then
|
||||||
|
newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-ded
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
pkg_preinst() {
|
pkg_preinst() {
|
||||||
use dedicated || gnome2_icon_savelist
|
use client && gnome2_icon_savelist
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postinst() {
|
pkg_postinst() {
|
||||||
use dedicated || gnome2_icon_cache_update
|
use client && gnome2_icon_cache_update
|
||||||
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
if [[ -z "${REPLACING_VERSIONS}" ]]; then
|
||||||
# This is a new installation
|
# This is a new installation
|
||||||
if use openal && ! use dedicated ; then
|
if use openal; then
|
||||||
einfo
|
einfo
|
||||||
elog "You might need to set:"
|
elog "You might need to set:"
|
||||||
elog " seta s_useopenal \"1\""
|
elog " seta s_useopenal \"1\""
|
||||||
@ -127,9 +128,16 @@ pkg_postinst() {
|
|||||||
elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222"
|
elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222"
|
||||||
einfo
|
einfo
|
||||||
fi
|
fi
|
||||||
|
if ! use client; then
|
||||||
|
einfo
|
||||||
|
elog "You disabled client support. You won't be able to connect"
|
||||||
|
elog "to any servers and play. If you want to do so, enable"
|
||||||
|
elog "USE=\"client\"."
|
||||||
|
einfo
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_postrm() {
|
pkg_postrm() {
|
||||||
use dedicated || gnome2_icon_cache_update
|
use client && gnome2_icon_cache_update
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user