mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-23 16:49:10 -07:00
dev-games/godot: remove slotting support and USE=runner
Mostly to be easier to maintain, see also bug #938658. Few notes: - use SLOT=0 to avoid looking inconsistent when godot5 exists - not doing slotmove given if a package in an overlay (none in-tree) depended on godot:4 and has a game invoke godot with "4" it'll be broken with this version - no !blocker given all this does is drop the 4 suffix, so no files conflict (essentially a new slot, except the old ones were dropped), users that didn't want a specific slot and using .desktop to start it won't notice a thing after depclean the old - USE=runner was intended for packaging games with system godot but that never really been used and games would be break too frequently even if we did without doing major.minor slots (dropping it also allows to build faster), could revisit if we really want this possibly with a separate godot-runner slotted package (aka a simplified build without much work to adapt to slots) Closes: https://bugs.gentoo.org/938658 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -20,13 +20,13 @@ LICENSE="
|
||||
Apache-2.0 BSD Boost-1.0 CC0-1.0 Unlicense ZLIB
|
||||
gui? ( CC-BY-4.0 ) tools? ( OFL-1.1 )
|
||||
"
|
||||
SLOT="4"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
# Enable roughly same as upstream by default so it works as expected,
|
||||
# except raycast (tools-only heavy dependency), and deprecated.
|
||||
IUSE="
|
||||
alsa +dbus debug deprecated +fontconfig +gui pulseaudio raycast
|
||||
+runner speech test +theora +tools +udev +upnp +vulkan wayland +webp
|
||||
speech test +theora +tools +udev +upnp +vulkan wayland +webp
|
||||
"
|
||||
REQUIRED_USE="wayland? ( gui )"
|
||||
# TODO: tests still need more figuring out
|
||||
@@ -96,14 +96,6 @@ PATCHES=(
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# handle slotting
|
||||
sed -i "1,5s/ godot/&${SLOT}/i" misc/dist/linux/godot.6 || die
|
||||
sed -i "/id/s/Godot/&${SLOT}/" misc/dist/linux/org.godotengine.Godot.appdata.xml || die
|
||||
sed -e "s/=godot/&${SLOT}/" -e "/^Name=/s/$/ ${SLOT}/" \
|
||||
-i misc/dist/linux/org.godotengine.Godot.desktop || die
|
||||
sed -e "s/godot/&${SLOT}/g" \
|
||||
-i misc/dist/shell/{godot.bash-completion,godot.fish,_godot.zsh-completion} || die
|
||||
|
||||
sed -i "s|pkg-config |$(tc-getPKG_CONFIG) |" platform/linuxbsd/detect.py || die
|
||||
|
||||
# use of builtin_ switches can be messy (see below), delete to be sure
|
||||
@@ -198,12 +190,6 @@ src_compile() {
|
||||
use_static_cpp=no
|
||||
)
|
||||
|
||||
if use runner && use tools; then
|
||||
# build alternate faster + ~60% smaller binary for running
|
||||
# games or servers without game development debug paths
|
||||
escons extra_suffix=runner target=template_release "${esconsargs[@]}"
|
||||
fi
|
||||
|
||||
esconsargs+=(
|
||||
target=$(usex tools editor template_$(usex debug{,} release))
|
||||
dev_build=$(usex debug)
|
||||
@@ -212,43 +198,45 @@ src_compile() {
|
||||
tests=$(usex tools $(usex test))
|
||||
)
|
||||
|
||||
escons extra_suffix=main "${esconsargs[@]}"
|
||||
escons "${esconsargs[@]}"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
xdg_environment_reset
|
||||
bin/godot*.main --headless --test || die
|
||||
|
||||
bin/godot* --headless --test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local s=godot${SLOT}
|
||||
# suffix varies depending on arch/features, use wildcard to simplify
|
||||
newbin bin/godot* godot
|
||||
|
||||
newbin bin/godot*.main ${s}
|
||||
if use runner && use tools; then
|
||||
newbin bin/godot*.runner ${s}-runner
|
||||
else
|
||||
# always available, revdeps shouldn't depend on [runner]
|
||||
dosym ${s} /usr/bin/${s}-runner
|
||||
fi
|
||||
|
||||
newman misc/dist/linux/godot.6 ${s}.6
|
||||
doman misc/dist/linux/godot.6
|
||||
dodoc AUTHORS.md CHANGELOG.md DONORS.md README.md
|
||||
|
||||
if use gui; then
|
||||
newicon icon.svg ${s}.svg
|
||||
newmenu misc/dist/linux/org.godotengine.Godot.desktop \
|
||||
org.godotengine.${s^}.desktop
|
||||
newicon icon.svg godot.svg
|
||||
domenu misc/dist/linux/org.godotengine.Godot.desktop
|
||||
|
||||
insinto /usr/share/metainfo
|
||||
newins misc/dist/linux/org.godotengine.Godot.appdata.xml \
|
||||
org.godotengine.${s^}.appdata.xml
|
||||
doins misc/dist/linux/org.godotengine.Godot.appdata.xml
|
||||
|
||||
insinto /usr/share/mime/application
|
||||
newins misc/dist/linux/org.godotengine.Godot.xml \
|
||||
org.godotengine.${s^}.xml
|
||||
doins misc/dist/linux/org.godotengine.Godot.xml
|
||||
fi
|
||||
|
||||
newbashcomp misc/dist/shell/godot.bash-completion ${s}
|
||||
newfishcomp misc/dist/shell/godot.fish ${s}.fish
|
||||
newzshcomp misc/dist/shell/_godot.zsh-completion _${s}
|
||||
newbashcomp misc/dist/shell/godot.bash-completion godot
|
||||
newfishcomp misc/dist/shell/godot.fish godot.fish
|
||||
newzshcomp misc/dist/shell/_godot.zsh-completion _godot
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
|
||||
if has_version dev-games/godot:3 || has_version dev-games/godot:4; then
|
||||
elog
|
||||
elog "Gentoo's godot ebuild has removed slotting support meaning that godot"
|
||||
elog "is now invoked with 'godot' rather than 'godot4', and godot3 has been"
|
||||
elog "removed. USE=runner and 'godot*-runner' were also removed."
|
||||
fi
|
||||
}
|
||||
@@ -22,7 +22,6 @@
|
||||
<use>
|
||||
<flag name="deprecated">Enable support for deprecated features</flag>
|
||||
<flag name="raycast">Enable the raycast Editor module using <pkg>media-libs/embree</pkg></flag>
|
||||
<flag name="runner">Build an additional binary optimized for running games (only relevant with USE=tools)</flag>
|
||||
<flag name="tools">Enable the Godot Editor for game development</flag>
|
||||
</use>
|
||||
<upstream>
|
||||
|
||||
Reference in New Issue
Block a user