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: Thu, 06 Jan 2022 09:10:34
Message-Id: 1641460203.35eb6f8888db57b737c584d31e8bf237a381d67a.ionen@gentoo
1 commit: 35eb6f8888db57b737c584d31e8bf237a381d67a
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 6 08:55:26 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 6 09:10:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35eb6f88
7
8 x11-terms/kitty: add 0.24.1
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 x11-terms/kitty/Manifest | 1 +
13 x11-terms/kitty/kitty-0.24.1.ebuild | 122 ++++++++++++++++++++++++++++++++++++
14 2 files changed, 123 insertions(+)
15
16 diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
17 index 409432b0ab98..d6b6c5386c31 100644
18 --- a/x11-terms/kitty/Manifest
19 +++ b/x11-terms/kitty/Manifest
20 @@ -1,2 +1,3 @@
21 DIST kitty-0.23.1.tar.xz 4444184 BLAKE2B f452e338fb72f723f2c028f90c20654cf80c5ee1aff924954f81f16445c9f4c10c77bd67d47ae5564b45496012dd1b7de447cdf3974b6913a39d170749878a73 SHA512 2d0c822e6bfca41b0a5e5e71e62f5073792b10c236287a509a6c790e19d098205c8719dbcb4aa630abbbaa3d44d6c9986c13efde7a9556772a89709383a0fe94
22 DIST kitty-0.24.0.tar.xz 4503616 BLAKE2B 5a42b4815d25ff9e3a1f9fb6673e4e58ec3b59b5f81dc4098ef24408580d070e92a181e84167f5a343ffc3a9af33556823153d463eaa8e406f31c032ed8bab37 SHA512 b851ed56d16f9a39d47810bf27c2bc8cbb52d476376c4090045db90c1ad0bc7db6fd9e97edd6ce50a6d69e716671e1e909aab889ecac368857ad5c07f68a76af
23 +DIST kitty-0.24.1.tar.xz 4512652 BLAKE2B ea1bf4911a744fb5aaa5fe3d9fc4821880e78c60a0a89ecba12c73623b9b537c2d9d4e494da125669f2fc36f273f49a00cc5825f56184c1b0c69f4c570b2226d SHA512 e590a3abd4ed38ce956ee1e1b9d3679150c83b80df5ed9daf9773d7a278f63dc8a3a563058906d322f9186bece7d479036a502864fd80f45593c4970c056f389
24
25 diff --git a/x11-terms/kitty/kitty-0.24.1.ebuild b/x11-terms/kitty/kitty-0.24.1.ebuild
26 new file mode 100644
27 index 000000000000..99fe4de04235
28 --- /dev/null
29 +++ b/x11-terms/kitty/kitty-0.24.1.ebuild
30 @@ -0,0 +1,122 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +inherit optfeature python-single-r1 toolchain-funcs xdg
38 +
39 +if [[ ${PV} == 9999 ]] ; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
42 +else
43 + SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz"
44 + KEYWORDS="~amd64 ~x86"
45 +fi
46 +
47 +DESCRIPTION="Fast, feature-rich, GPU-based terminal"
48 +HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
49 +
50 +LICENSE="GPL-3"
51 +SLOT="0"
52 +IUSE="+X debug test transfer wayland"
53 +REQUIRED_USE="
54 + || ( X wayland )
55 + ${PYTHON_REQUIRED_USE}"
56 +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )"
57 +
58 +RDEPEND="
59 + ${PYTHON_DEPS}
60 + media-libs/fontconfig
61 + media-libs/freetype:2
62 + media-libs/harfbuzz:=
63 + media-libs/lcms:2
64 + media-libs/libglvnd[X?]
65 + media-libs/libpng:=
66 + sys-apps/dbus
67 + sys-libs/zlib:=
68 + x11-libs/libxkbcommon[X?]
69 + x11-misc/xkeyboard-config
70 + ~x11-terms/kitty-shell-integration-${PV}
71 + ~x11-terms/kitty-terminfo-${PV}
72 + X? ( x11-libs/libX11 )
73 + transfer? ( net-libs/librsync:= )
74 + wayland? ( dev-libs/wayland )"
75 +DEPEND="
76 + ${RDEPEND}
77 + X? (
78 + x11-base/xorg-proto
79 + x11-libs/libXcursor
80 + x11-libs/libXi
81 + x11-libs/libXinerama
82 + x11-libs/libXrandr
83 + )
84 + wayland? ( dev-libs/wayland-protocols )"
85 +BDEPEND="
86 + ${PYTHON_DEPS}
87 + sys-libs/ncurses
88 + virtual/pkgconfig
89 + test? ( $(python_gen_cond_dep 'dev-python/pillow[${PYTHON_USEDEP}]') )
90 + wayland? ( dev-util/wayland-scanner )"
91 +
92 +PATCHES=(
93 + "${FILESDIR}"/${PN}-0.23.1-flags.patch
94 +)
95 +
96 +src_prepare() {
97 + default
98 +
99 + sed -i "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" setup.py || die
100 +
101 + if use !transfer; then
102 + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die
103 + rm -r kittens/transfer || die
104 + fi
105 +
106 + # test relies on 'who' command which doesn't detect users with pid-sandbox
107 + rm kitty_tests/utmp.py || die
108 +
109 + # skip docs for live version
110 + [[ ${PV} != 9999 ]] || sed -i '/exists.*_build/,/docs(ddir)/d' setup.py || die
111 +}
112 +
113 +src_compile() {
114 + tc-export CC
115 + export PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
116 +
117 + local setup=(
118 + ${EPYTHON} setup.py linux-package
119 + --disable-link-time-optimization
120 + --ignore-compiler-warnings
121 + --libdir-name=$(get_libdir)
122 + --shell-integration="enabled no-rc"
123 + --update-check-interval=0
124 + --verbose
125 + $(usev debug --debug)
126 + )
127 +
128 + echo "${setup[*]}"
129 + "${setup[@]}" || die "setup.py failed to compile ${PN}"
130 +
131 + [[ ${PV} == 9999 ]] || mv linux-package/share/doc/{${PN},${PF}} || die
132 + rm -r linux-package/share/terminfo || die
133 +}
134 +
135 +src_test() {
136 + PATH=linux-package/bin:${PATH} KITTY_CONFIG_DIRECTORY=${T} \
137 + ${EPYTHON} test.py || die
138 +}
139 +
140 +src_install() {
141 + insinto /usr
142 + doins -r linux-package/.
143 +
144 + fperms +x /usr/bin/kitty
145 +}
146 +
147 +pkg_postinst() {
148 + xdg_icon_cache_update
149 +
150 + optfeature "in-terminal image display with kitty icat" media-gfx/imagemagick
151 + optfeature "audio-based terminal bell support" media-libs/libcanberra
152 +}