summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-01-04 16:17:43 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-01-04 16:47:34 -0500
commit5ab5d2999cb504df3136977702e28ef4649b4cb0 (patch)
treec848e427cf9794f8df1be3dcaa37b4daac34dbea
parentdev-python/ubelt: add 0.11.0 (diff)
downloadgentoo-5ab5d299.tar.gz
gentoo-5ab5d299.tar.bz2
gentoo-5ab5d299.zip
x11-terms/kitty: make transfer kitten optional and simplify tests
Feel only a handful of users will want this extra dependency used to transfer files over the terminal itself (e.g. serial link too, albeit kitty must exist on other end), but unfortunately upstream doesn't offer build-time options to exclude features. Given these seds are getting heavy (needed 1 more sed + rm to disable transfer tests), require every USE beside debug to run tests rather than try to exclude them. Doesn't make a difference for self-testing albeit tinderboxes may end up skipping. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r--x11-terms/kitty/kitty-0.24.0-r1.ebuild (renamed from x11-terms/kitty/kitty-0.24.0.ebuild)16
-rw-r--r--x11-terms/kitty/kitty-9999.ebuild22
-rw-r--r--x11-terms/kitty/metadata.xml3
3 files changed, 26 insertions, 15 deletions
diff --git a/x11-terms/kitty/kitty-0.24.0.ebuild b/x11-terms/kitty/kitty-0.24.0-r1.ebuild
index e110c82bbd0b..5b83c19b7dda 100644
--- a/x11-terms/kitty/kitty-0.24.0.ebuild
+++ b/x11-terms/kitty/kitty-0.24.0-r1.ebuild
@@ -19,11 +19,11 @@ HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
LICENSE="GPL-3"
SLOT="0"
-IUSE="+X debug test wayland"
+IUSE="+X debug test transfer wayland"
REQUIRED_USE="
|| ( X wayland )
${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
+RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
RDEPEND="
${PYTHON_DEPS}
@@ -33,7 +33,6 @@ RDEPEND="
media-libs/lcms:2
media-libs/libglvnd[X?]
media-libs/libpng:=
- net-libs/librsync:=
sys-apps/dbus
sys-libs/zlib:=
x11-libs/libxkbcommon[X?]
@@ -41,6 +40,7 @@ RDEPEND="
~x11-terms/kitty-shell-integration-${PV}
~x11-terms/kitty-terminfo-${PV}
X? ( x11-libs/libX11 )
+ transfer? ( net-libs/librsync:= )
wayland? ( dev-libs/wayland )"
DEPEND="
${RDEPEND}
@@ -66,10 +66,12 @@ PATCHES=(
src_prepare() {
default
- sed "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" -i setup.py || die
- sed "s/else linux_backends/else [$(usev X "'x11',")$(usev wayland "'wayland'")]/" \
- -i kitty_tests/check_build.py || die
- use X || sed "/glfw_path('x11')/s/x11/wayland/" -i kitty_tests/glfw.py || die
+ sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
+
+ if use !transfer; then
+ sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
+ rm -r kittens/transfer || die
+ fi
# --shell-integration="enabled no-rc" is the intended way to set
# no-rc by default, but setup.py's replacer currently fails
diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild
index a0d732aca31a..5b83c19b7dda 100644
--- a/x11-terms/kitty/kitty-9999.ebuild
+++ b/x11-terms/kitty/kitty-9999.ebuild
@@ -19,11 +19,11 @@ HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
LICENSE="GPL-3"
SLOT="0"
-IUSE="+X debug test wayland"
+IUSE="+X debug test transfer wayland"
REQUIRED_USE="
|| ( X wayland )
${PYTHON_REQUIRED_USE}"
-RESTRICT="!test? ( test )"
+RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
RDEPEND="
${PYTHON_DEPS}
@@ -33,7 +33,6 @@ RDEPEND="
media-libs/lcms:2
media-libs/libglvnd[X?]
media-libs/libpng:=
- net-libs/librsync:=
sys-apps/dbus
sys-libs/zlib:=
x11-libs/libxkbcommon[X?]
@@ -41,6 +40,7 @@ RDEPEND="
~x11-terms/kitty-shell-integration-${PV}
~x11-terms/kitty-terminfo-${PV}
X? ( x11-libs/libX11 )
+ transfer? ( net-libs/librsync:= )
wayland? ( dev-libs/wayland )"
DEPEND="
${RDEPEND}
@@ -66,10 +66,17 @@ PATCHES=(
src_prepare() {
default
- sed "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" -i setup.py || die
- sed "s/else linux_backends/else [$(usev X "'x11',")$(usev wayland "'wayland'")]/" \
- -i kitty_tests/check_build.py || die
- use X || sed "/glfw_path('x11')/s/x11/wayland/" -i kitty_tests/glfw.py || die
+ sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
+
+ if use !transfer; then
+ sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
+ rm -r kittens/transfer || die
+ fi
+
+ # --shell-integration="enabled no-rc" is the intended way to set
+ # no-rc by default, but setup.py's replacer currently fails
+ # https://github.com/kovidgoyal/kitty/issues/4434
+ sed -i "/shell_integration:/s/'enabled'/&,'no-rc'/" kitty/options/types.py || die
# test relies on 'who' command which typically works but have 1 VM
# where it didn't only under portage/sandbox, needs investigation but
@@ -89,7 +96,6 @@ src_compile() {
--disable-link-time-optimization
--ignore-compiler-warnings
--libdir-name=$(get_libdir)
- --shell-integration="enabled no-rc"
--update-check-interval=0
--verbose
$(usev debug --debug)
diff --git a/x11-terms/kitty/metadata.xml b/x11-terms/kitty/metadata.xml
index c4f584c5169f..6bb38d37be8c 100644
--- a/x11-terms/kitty/metadata.xml
+++ b/x11-terms/kitty/metadata.xml
@@ -13,6 +13,9 @@
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
+ <use>
+ <flag name="transfer">Enable transfer kitten using <pkg>net-libs/librsync</pkg></flag>
+ </use>
<upstream>
<remote-id type="github">kovidgoyal/kitty</remote-id>
<changelog>https://sw.kovidgoyal.net/kitty/changelog</changelog>