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