Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/kitty/
Date: Tue, 04 Jan 2022 21:48:00
Message-Id: 1641332854.5ab5d2999cb504df3136977702e28ef4649b4cb0.ionen@gentoo
1 commit: 5ab5d2999cb504df3136977702e28ef4649b4cb0
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 4 21:17:43 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 4 21:47:34 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ab5d299
7
8 x11-terms/kitty: make transfer kitten optional and simplify tests
9
10 Feel only a handful of users will want this extra dependency
11 used to transfer files over the terminal itself (e.g. serial
12 link too, albeit kitty must exist on other end), but unfortunately
13 upstream doesn't offer build-time options to exclude features.
14
15 Given these seds are getting heavy (needed 1 more sed + rm to
16 disable transfer tests), require every USE beside debug to run
17 tests rather than try to exclude them. Doesn't make a difference
18 for self-testing albeit tinderboxes may end up skipping.
19
20 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
21
22 ...{kitty-0.24.0.ebuild => kitty-0.24.0-r1.ebuild} | 16 +++++++++-------
23 x11-terms/kitty/kitty-9999.ebuild | 22 ++++++++++++++--------
24 x11-terms/kitty/metadata.xml | 3 +++
25 3 files changed, 26 insertions(+), 15 deletions(-)
26
27 diff --git a/x11-terms/kitty/kitty-0.24.0.ebuild b/x11-terms/kitty/kitty-0.24.0-r1.ebuild
28 similarity index 89%
29 rename from x11-terms/kitty/kitty-0.24.0.ebuild
30 rename to x11-terms/kitty/kitty-0.24.0-r1.ebuild
31 index e110c82bbd0b..5b83c19b7dda 100644
32 --- a/x11-terms/kitty/kitty-0.24.0.ebuild
33 +++ b/x11-terms/kitty/kitty-0.24.0-r1.ebuild
34 @@ -19,11 +19,11 @@ HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
35
36 LICENSE="GPL-3"
37 SLOT="0"
38 -IUSE="+X debug test wayland"
39 +IUSE="+X debug test transfer wayland"
40 REQUIRED_USE="
41 || ( X wayland )
42 ${PYTHON_REQUIRED_USE}"
43 -RESTRICT="!test? ( test )"
44 +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
45
46 RDEPEND="
47 ${PYTHON_DEPS}
48 @@ -33,7 +33,6 @@ RDEPEND="
49 media-libs/lcms:2
50 media-libs/libglvnd[X?]
51 media-libs/libpng:=
52 - net-libs/librsync:=
53 sys-apps/dbus
54 sys-libs/zlib:=
55 x11-libs/libxkbcommon[X?]
56 @@ -41,6 +40,7 @@ RDEPEND="
57 ~x11-terms/kitty-shell-integration-${PV}
58 ~x11-terms/kitty-terminfo-${PV}
59 X? ( x11-libs/libX11 )
60 + transfer? ( net-libs/librsync:= )
61 wayland? ( dev-libs/wayland )"
62 DEPEND="
63 ${RDEPEND}
64 @@ -66,10 +66,12 @@ PATCHES=(
65 src_prepare() {
66 default
67
68 - sed "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" -i setup.py || die
69 - sed "s/else linux_backends/else [$(usev X "'x11',")$(usev wayland "'wayland'")]/" \
70 - -i kitty_tests/check_build.py || die
71 - use X || sed "/glfw_path('x11')/s/x11/wayland/" -i kitty_tests/glfw.py || die
72 + sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
73 +
74 + if use !transfer; then
75 + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
76 + rm -r kittens/transfer || die
77 + fi
78
79 # --shell-integration="enabled no-rc" is the intended way to set
80 # no-rc by default, but setup.py's replacer currently fails
81
82 diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild
83 index a0d732aca31a..5b83c19b7dda 100644
84 --- a/x11-terms/kitty/kitty-9999.ebuild
85 +++ b/x11-terms/kitty/kitty-9999.ebuild
86 @@ -19,11 +19,11 @@ HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
87
88 LICENSE="GPL-3"
89 SLOT="0"
90 -IUSE="+X debug test wayland"
91 +IUSE="+X debug test transfer wayland"
92 REQUIRED_USE="
93 || ( X wayland )
94 ${PYTHON_REQUIRED_USE}"
95 -RESTRICT="!test? ( test )"
96 +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
97
98 RDEPEND="
99 ${PYTHON_DEPS}
100 @@ -33,7 +33,6 @@ RDEPEND="
101 media-libs/lcms:2
102 media-libs/libglvnd[X?]
103 media-libs/libpng:=
104 - net-libs/librsync:=
105 sys-apps/dbus
106 sys-libs/zlib:=
107 x11-libs/libxkbcommon[X?]
108 @@ -41,6 +40,7 @@ RDEPEND="
109 ~x11-terms/kitty-shell-integration-${PV}
110 ~x11-terms/kitty-terminfo-${PV}
111 X? ( x11-libs/libX11 )
112 + transfer? ( net-libs/librsync:= )
113 wayland? ( dev-libs/wayland )"
114 DEPEND="
115 ${RDEPEND}
116 @@ -66,10 +66,17 @@ PATCHES=(
117 src_prepare() {
118 default
119
120 - sed "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" -i setup.py || die
121 - sed "s/else linux_backends/else [$(usev X "'x11',")$(usev wayland "'wayland'")]/" \
122 - -i kitty_tests/check_build.py || die
123 - use X || sed "/glfw_path('x11')/s/x11/wayland/" -i kitty_tests/glfw.py || die
124 + sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
125 +
126 + if use !transfer; then
127 + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
128 + rm -r kittens/transfer || die
129 + fi
130 +
131 + # --shell-integration="enabled no-rc" is the intended way to set
132 + # no-rc by default, but setup.py's replacer currently fails
133 + # https://github.com/kovidgoyal/kitty/issues/4434
134 + sed -i "/shell_integration:/s/'enabled'/&,'no-rc'/" kitty/options/types.py || die
135
136 # test relies on 'who' command which typically works but have 1 VM
137 # where it didn't only under portage/sandbox, needs investigation but
138 @@ -89,7 +96,6 @@ src_compile() {
139 --disable-link-time-optimization
140 --ignore-compiler-warnings
141 --libdir-name=$(get_libdir)
142 - --shell-integration="enabled no-rc"
143 --update-check-interval=0
144 --verbose
145 $(usev debug --debug)
146
147 diff --git a/x11-terms/kitty/metadata.xml b/x11-terms/kitty/metadata.xml
148 index c4f584c5169f..6bb38d37be8c 100644
149 --- a/x11-terms/kitty/metadata.xml
150 +++ b/x11-terms/kitty/metadata.xml
151 @@ -13,6 +13,9 @@
152 <email>proxy-maint@g.o</email>
153 <name>Proxy Maintainers</name>
154 </maintainer>
155 + <use>
156 + <flag name="transfer">Enable transfer kitten using <pkg>net-libs/librsync</pkg></flag>
157 + </use>
158 <upstream>
159 <remote-id type="github">kovidgoyal/kitty</remote-id>
160 <changelog>https://sw.kovidgoyal.net/kitty/changelog</changelog>