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, 05 Sep 2022 06:59:23
Message-Id: 1662361116.26e4741f77fb5a51daf4f54e234bd3d29cb27616.ionen@gentoo
1 commit: 26e4741f77fb5a51daf4f54e234bd3d29cb27616
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 5 06:55:15 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 5 06:58:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26e4741f
7
8 x11-terms/kitty: add 0.26.2
9
10 Bug: https://bugs.gentoo.org/868543
11 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
12
13 x11-terms/kitty/Manifest | 2 +
14 x11-terms/kitty/kitty-0.26.2.ebuild | 131 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 133 insertions(+)
16
17 diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
18 index a16afe85dea0..ea0aa009806a 100644
19 --- a/x11-terms/kitty/Manifest
20 +++ b/x11-terms/kitty/Manifest
21 @@ -2,3 +2,5 @@ DIST kitty-0.25.2.tar.xz 4681940 BLAKE2B 9aa43711c833541f364100465dfd1c13251ed59
22 DIST kitty-0.25.2.tar.xz.sig 566 BLAKE2B 38435c7c418b421321ad29e1935f2280b1df215cb95b1025b3c85a0cc7e3279f1a0f79b05af9c698d4121a4f2e23a81774406a3ba77d0b5e669a36e1e58621b6 SHA512 cc16d4d22c043a30d9712cee211b4560873aa3e6ddc799881c791c72c6a4bfb7822a01683c62afcf67814889dfbc312d9f8b1f2200ab7f89a937addbf76c99b9
23 DIST kitty-0.26.1.tar.xz 4716836 BLAKE2B 1369fe3bb13fc5fb134c5b45f179ddd60b4edb61243d88aa08d8b414b4153b17e5c739859c9ed2db366e096db1b07e207cbef715d95787722037ddf5854582e1 SHA512 ed270c84078acb33921506296c476ada5f19fb33344047c7dad5b2d7b697c2111e2925dc391eb4927a05ef82ae583b35db5eee53e148e3e4d71ce942a1deade2
24 DIST kitty-0.26.1.tar.xz.sig 566 BLAKE2B 9cc653d0bb5fb2d46b82d1320a4273402af371783cc6469bd2a8f472dd03a25fa3d6cd0e9b47fedbd733713f422b73106069c66368a4b4a8c07c848050cc4e31 SHA512 2cb03e74e7c8a02a8aca8006662a174bff9ef511140340988dd0a079504e1ca665c927a78f5ddc59c243e92df9cf68d0a531b388ecf148901a855bdef2489ded
25 +DIST kitty-0.26.2.tar.xz 4716932 BLAKE2B fbbd1bbeb42bfb5be1348ead4605d45f93a90e31e707444c901b9f4c20b42d470c1e3cec9e0f135f04ad49bb472824fb7445932403127e8cbc639b5dac6ee982 SHA512 4bfb3d9438bb018dc10503be610df4e6e8bb1f9459b5131f46fde6279ba5423e44dbbcb86a2dc2602ee208266edc78074f6496e99761cf43f7081ea9e88175f7
26 +DIST kitty-0.26.2.tar.xz.sig 566 BLAKE2B 4f36d131143ad4c1ea3dbdd7b094cbfd7ece133e573ec95714d5b778a80cb58b3b89ab02f575442aaf1618985e37528285009bb724721e5d48b1ffc611175672 SHA512 8ec0f237eb0b9f868ea703ab8b5cb85405f9360ad8e7402a0e5a3c4f3268a5a127359a9444c0e7cf05f364ea5dfeb31f9657a110fadc34bb6ed870ef939a4ada
27
28 diff --git a/x11-terms/kitty/kitty-0.26.2.ebuild b/x11-terms/kitty/kitty-0.26.2.ebuild
29 new file mode 100644
30 index 000000000000..3ee9cbb30121
31 --- /dev/null
32 +++ b/x11-terms/kitty/kitty-0.26.2.ebuild
33 @@ -0,0 +1,131 @@
34 +# Copyright 1999-2022 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=8
38 +
39 +PYTHON_COMPAT=( python3_{8..10} )
40 +inherit edo optfeature multiprocessing python-single-r1 toolchain-funcs xdg
41 +
42 +if [[ ${PV} == 9999 ]] ; then
43 + inherit git-r3
44 + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
45 +else
46 + inherit verify-sig
47 + SRC_URI="
48 + https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz
49 + verify-sig? ( https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz.sig )"
50 + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/kovidgoyal.gpg"
51 + KEYWORDS="~amd64 ~ppc64 ~x86"
52 +fi
53 +
54 +DESCRIPTION="Fast, feature-rich, GPU-based terminal"
55 +HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
56 +
57 +LICENSE="GPL-3"
58 +SLOT="0"
59 +IUSE="+X test transfer wayland"
60 +REQUIRED_USE="
61 + || ( X wayland )
62 + ${PYTHON_REQUIRED_USE}"
63 +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
64 +
65 +# dlopen: fontconfig,libglvnd
66 +RDEPEND="
67 + ${PYTHON_DEPS}
68 + dev-libs/openssl:=
69 + media-libs/fontconfig
70 + media-libs/harfbuzz:=
71 + media-libs/lcms:2
72 + media-libs/libglvnd[X?]
73 + media-libs/libpng:=
74 + sys-apps/dbus
75 + sys-libs/zlib:=
76 + x11-libs/libxkbcommon[X?]
77 + x11-misc/xkeyboard-config
78 + ~x11-terms/kitty-shell-integration-${PV}
79 + ~x11-terms/kitty-terminfo-${PV}
80 + X? ( x11-libs/libX11 )
81 + transfer? ( net-libs/librsync:= )
82 + wayland? ( dev-libs/wayland )"
83 +DEPEND="
84 + ${RDEPEND}
85 + X? (
86 + x11-base/xorg-proto
87 + x11-libs/libXcursor
88 + x11-libs/libXi
89 + x11-libs/libXinerama
90 + x11-libs/libXrandr
91 + )
92 + wayland? ( dev-libs/wayland-protocols )"
93 +BDEPEND="
94 + ${PYTHON_DEPS}
95 + sys-libs/ncurses
96 + virtual/pkgconfig
97 + test? ( $(python_gen_cond_dep 'dev-python/pillow[${PYTHON_USEDEP}]') )
98 + wayland? ( dev-util/wayland-scanner )"
99 +[[ ${PV} == 9999 ]] || BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )"
100 +
101 +src_prepare() {
102 + default
103 +
104 + # seds unfortunately feel easier on maintainenance than patches here
105 + sed -e "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" \
106 + -e "$(usev !X '/gl_libs =/s/=.*/= []/')" \
107 + -e "/num_workers =/s/=.*/= $(makeopts_jobs)/" \
108 + -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//' \
109 + -i setup.py || die
110 +
111 + if use !transfer; then
112 + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
113 + rm -r kittens/transfer || die
114 + fi
115 +
116 + # test relies on 'who' command which doesn't detect users with pid-sandbox
117 + rm kitty_tests/utmp.py || die
118 +
119 + # test may fail/hang depending on environment and shell initialization scripts
120 + rm kitty_tests/{shell_integration,ssh}.py || die
121 +
122 + # skip docs for live version
123 + [[ ${PV} != 9999 ]] || sed -i '/exists.*_build/,/docs(ddir)/d' setup.py || die
124 +}
125 +
126 +src_compile() {
127 + tc-export CC
128 + export PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
129 +
130 + local conf=(
131 + --disable-link-time-optimization
132 + --ignore-compiler-warnings
133 + --libdir-name=$(get_libdir)
134 + --shell-integration="enabled no-rc"
135 + --update-check-interval=0
136 + --verbose
137 + )
138 +
139 + edo ${EPYTHON} setup.py linux-package "${conf[@]}"
140 + use test && edo ${EPYTHON} setup.py build-launcher "${conf[@]}"
141 +
142 + [[ ${PV} == 9999 ]] || mv linux-package/share/doc/{${PN},${PF}} || die
143 + rm -r linux-package/share/terminfo || die
144 +}
145 +
146 +src_test() {
147 + KITTY_CONFIG_DIRECTORY=${T} ./test.py || die # shebang is kitty
148 +}
149 +
150 +src_install() {
151 + insinto /usr
152 + doins -r linux-package/.
153 +
154 + fperms +x /usr/bin/kitty \
155 + /usr/$(get_libdir)/kitty/shell-integration/ssh/{askpass.py,kitty}
156 +}
157 +
158 +pkg_postinst() {
159 + xdg_pkg_postinst
160 +
161 + optfeature "in-terminal image display with kitty icat" media-gfx/imagemagick
162 + optfeature "audio-based terminal bell support" media-libs/libcanberra
163 + optfeature "opening links from the terminal" x11-misc/xdg-utils
164 +}