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: Mon, 28 Feb 2022 08:27:55
Message-Id: 1646036749.c1fd653b423d8a67d3b00525bdcdabff30838f55.ionen@gentoo
1 commit: c1fd653b423d8a67d3b00525bdcdabff30838f55
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 28 05:02:29 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 28 08:25:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1fd653b
7
8 x11-terms/kitty: add 0.24.3
9
10 no-rc option has changed meaning from "don't auto-modify user .bashrc"
11 to "don't use a hack'ish env-modifying method to load kitty.bash".
12
13 Method can make sense on some distros, but we have /etc/bash/bashrc.d
14 on Gentoo which x11-terms/kitty-shell-integration uses. It also has
15 less limitations by working for shells that kitty did not start as
16 well as remote ones if the stand-alone shell-integration package is
17 installed there. So, still keep no-rc.
18
19 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
20
21 x11-terms/kitty/Manifest | 2 +
22 x11-terms/kitty/kitty-0.24.3.ebuild | 128 ++++++++++++++++++++++++++++++++++++
23 2 files changed, 130 insertions(+)
24
25 diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
26 index bf3fb6efec20..e2ebe6adc9ca 100644
27 --- a/x11-terms/kitty/Manifest
28 +++ b/x11-terms/kitty/Manifest
29 @@ -1,3 +1,5 @@
30 DIST kitty-0.23.1.tar.xz 4444184 BLAKE2B f452e338fb72f723f2c028f90c20654cf80c5ee1aff924954f81f16445c9f4c10c77bd67d47ae5564b45496012dd1b7de447cdf3974b6913a39d170749878a73 SHA512 2d0c822e6bfca41b0a5e5e71e62f5073792b10c236287a509a6c790e19d098205c8719dbcb4aa630abbbaa3d44d6c9986c13efde7a9556772a89709383a0fe94
31 DIST kitty-0.24.2.tar.xz 4601672 BLAKE2B 6e253863d81f2ef04f5d185cfe4379fe08818992a12a06da2ce2b0958912c4a0dc164b2ac6e8e74e383716e7040b2390bd1123ab4d8d282ede602dfea5cc756f SHA512 6d49b20dbd96ed0a1ed49a4523b65593c547ea2fec46f4c2557e26cdb5048ebaadb2c2118c7a2dd346f83ecab2d0a341d2322ae37ebe49184e22055581c631e7
32 DIST kitty-0.24.2.tar.xz.sig 566 BLAKE2B f6f179a90acd2572549bc16e42ad637cb5d35e7488050e97fb285cc55b2cf04d1a5188949cc3172401090e2bcabcd239879f07acfef513090d5e1dd6688098a3 SHA512 6b415e87bf1f076e32da61cb7a64c3fd6e3a17ff8606cbfef8f92cfaa6b38123472a827ed4e8ff3cd54e8a74bd328e98b29104fdf18eca6e25bb1b170add3180
33 +DIST kitty-0.24.3.tar.xz 4614252 BLAKE2B 04c9904e20aae0ed12d41dc01ea4fbb5e36430e50087821845c0bd3e6d8dd0ab2a090f8ebff8fd66fe9f2b0a3efe52f0434008b4484cbe27a58b05c6e4f56d73 SHA512 2b1482164fb1aabfa2f775f24d0ffbbbd1e8a85cf114a2daa411379ea8dbcea6ae5f361997132fb4d773fed8adeec4c04ffb4e615a470cefeb794d8a39c94c0a
34 +DIST kitty-0.24.3.tar.xz.sig 566 BLAKE2B 1b1f99fef62a12863d7bda33f24e2273385b71653e90641b6ee1b3fd9543fe46fab5962751f30553dacf5b35e23334abbddb22ba1924fff6a878164f94bc9102 SHA512 1658bac350f92e9cdefe16ed1bffd61b5ba5e3ced82982ebfde34365095bf381fe5b0732388209688b6082e27f0b61e85e6f962d894e842994b47fdd64552026
35
36 diff --git a/x11-terms/kitty/kitty-0.24.3.ebuild b/x11-terms/kitty/kitty-0.24.3.ebuild
37 new file mode 100644
38 index 000000000000..f12b599aaa04
39 --- /dev/null
40 +++ b/x11-terms/kitty/kitty-0.24.3.ebuild
41 @@ -0,0 +1,128 @@
42 +# Copyright 1999-2022 Gentoo Authors
43 +# Distributed under the terms of the GNU General Public License v2
44 +
45 +EAPI=8
46 +
47 +PYTHON_COMPAT=( python3_{8..10} )
48 +inherit optfeature python-single-r1 toolchain-funcs xdg
49 +
50 +if [[ ${PV} == 9999 ]] ; then
51 + inherit git-r3
52 + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
53 +else
54 + inherit verify-sig
55 + SRC_URI="
56 + https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz
57 + verify-sig? ( https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz.sig )"
58 + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/kovidgoyal.gpg"
59 + KEYWORDS="~amd64 ~ppc64 ~x86"
60 +fi
61 +
62 +DESCRIPTION="Fast, feature-rich, GPU-based terminal"
63 +HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
64 +
65 +LICENSE="GPL-3"
66 +SLOT="0"
67 +IUSE="+X debug test transfer wayland"
68 +REQUIRED_USE="
69 + || ( X wayland )
70 + ${PYTHON_REQUIRED_USE}"
71 +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
72 +
73 +RDEPEND="
74 + ${PYTHON_DEPS}
75 + media-libs/fontconfig
76 + media-libs/freetype:2
77 + media-libs/harfbuzz:=
78 + media-libs/lcms:2
79 + media-libs/libglvnd[X?]
80 + media-libs/libpng:=
81 + sys-apps/dbus
82 + sys-libs/zlib:=
83 + x11-libs/libxkbcommon[X?]
84 + x11-misc/xkeyboard-config
85 + ~x11-terms/kitty-shell-integration-${PV}
86 + ~x11-terms/kitty-terminfo-${PV}
87 + X? ( x11-libs/libX11 )
88 + transfer? ( net-libs/librsync:= )
89 + wayland? ( dev-libs/wayland )"
90 +DEPEND="
91 + ${RDEPEND}
92 + X? (
93 + x11-base/xorg-proto
94 + x11-libs/libXcursor
95 + x11-libs/libXi
96 + x11-libs/libXinerama
97 + x11-libs/libXrandr
98 + )
99 + wayland? ( dev-libs/wayland-protocols )"
100 +BDEPEND="
101 + ${PYTHON_DEPS}
102 + sys-libs/ncurses
103 + virtual/pkgconfig
104 + test? ( $(python_gen_cond_dep 'dev-python/pillow[${PYTHON_USEDEP}]') )
105 + wayland? ( dev-util/wayland-scanner )"
106 +[[ ${PV} == 9999 ]] || BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )"
107 +
108 +PATCHES=(
109 + "${FILESDIR}"/${PN}-0.23.1-flags.patch
110 +)
111 +
112 +src_prepare() {
113 + default
114 +
115 + sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
116 +
117 + if use !transfer; then
118 + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
119 + rm -r kittens/transfer || die
120 + fi
121 +
122 + # test relies on 'who' command which doesn't detect users with pid-sandbox
123 + rm kitty_tests/utmp.py || die
124 +
125 + # skip docs for live version
126 + [[ ${PV} != 9999 ]] || sed -i '/exists.*_build/,/docs(ddir)/d' setup.py || die
127 +}
128 +
129 +src_compile() {
130 + tc-export CC
131 + export PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
132 +
133 + local setup=(
134 + ${EPYTHON} setup.py linux-package
135 + --disable-link-time-optimization
136 + --ignore-compiler-warnings
137 + --libdir-name=$(get_libdir)
138 + --shell-integration="enabled no-rc"
139 + --update-check-interval=0
140 + --verbose
141 + $(usev debug --debug)
142 + )
143 +
144 + echo "${setup[*]}"
145 + "${setup[@]}" || die "setup.py failed to compile ${PN}"
146 +
147 + [[ ${PV} == 9999 ]] || mv linux-package/share/doc/{${PN},${PF}} || die
148 + rm -r linux-package/share/terminfo || die
149 +}
150 +
151 +src_test() {
152 + PATH=linux-package/bin:${PATH} KITTY_CONFIG_DIRECTORY=${T} \
153 + ${EPYTHON} test.py || die
154 +}
155 +
156 +src_install() {
157 + insinto /usr
158 + doins -r linux-package/.
159 +
160 + fperms +x /usr/bin/kitty
161 +}
162 +
163 +pkg_postinst() {
164 + xdg_icon_cache_update
165 +
166 + optfeature "in-terminal image display with kitty icat" media-gfx/imagemagick
167 + optfeature "audio-based terminal bell support" media-libs/libcanberra
168 + optfeature "opening links from the terminal" x11-misc/xdg-utils
169 +}