summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-11-22 09:04:15 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-11-22 09:35:49 -0500
commitc49ea4647556e0f547d203b66472ac8498a95867 (patch)
tree2dbf2897cd13da0fb8092f42e15cbb8cecef2760 /x11-terms
parentx11-terms/kitty: avoid using go-module.eclass after all (diff)
downloadgentoo-c49ea4647556e0f547d203b66472ac8498a95867.tar.gz
gentoo-c49ea4647556e0f547d203b66472ac8498a95867.tar.bz2
gentoo-c49ea4647556e0f547d203b66472ac8498a95867.zip
x11-terms/kitty: revamp seds in live
Not that much clearer, but makes iwdevtools' qa-sed happier by not doing seds that are expected to do nothing (and so easier to track if these need updates). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r--x11-terms/kitty/kitty-9999.ebuild25
1 files changed, 16 insertions, 9 deletions
diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild
index 06e7d84c2b81..66de305b3f00 100644
--- a/x11-terms/kitty/kitty-9999.ebuild
+++ b/x11-terms/kitty/kitty-9999.ebuild
@@ -82,13 +82,22 @@ src_unpack() {
src_prepare() {
default
- # seds unfortunately feel easier on maintainenance than patches here
- sed -e "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" \
- -e "$(usev !X '/gl_libs =/s/=.*/= []/')" \
- -e "/num_workers =/s/=.*/= $(makeopts_jobs)/" \
- -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//' \
- -e "s/ld_flags.append('-s')/pass/" \
- -i setup.py || die
+ # sed unfortunately feels easier on maintainenance than patches here
+ local sedargs=(
+ -e "/num_workers =/s/=.*/= $(makeopts_jobs)/"
+ -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//'
+ -e "s/ld_flags.append('-s')/pass/"
+ )
+
+ # kitty is often popular on wayland-only setups, try to allow this
+ use !X && sedargs+=( -e '/gl_libs =/s/=.*/= []/' ) #857918
+ use !X || use !wayland &&
+ sedargs+=( -e "s/'x11 wayland'/'$(usex X x11 wayland)'/" )
+
+ # skip docs for live version, missing dependencies
+ [[ ${PV} == 9999 ]] && sedargs+=( -e '/exists.*_build/,/docs(ddir)/d' )
+
+ sed -i setup.py "${sedargs[@]}" || die
# test relies on 'who' command which doesn't detect users with pid-sandbox
rm kitty_tests/utmp.py || die
@@ -96,8 +105,6 @@ src_prepare() {
# test may fail/hang depending on environment and shell initialization scripts
rm kitty_tests/{shell_integration,ssh}.py || die
- # skip docs for live version
- [[ ${PV} != 9999 ]] || sed -i '/exists.*_build/,/docs(ddir)/d' setup.py || die
}
src_compile() {