x11-terms/kitty: add 0.49.1

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2026-09-24 09:05:37 -04:00
parent dce4164a2a
commit aaffa839b0
2 changed files with 214 additions and 0 deletions
+3
View File
@@ -4,3 +4,6 @@ DIST kitty-0.48.2.tar.xz.sig 566 BLAKE2B b59dd7b5986fc696fd29028b56e9ddcac79954b
DIST kitty-0.49.0-vendor.tar.xz 2509204 BLAKE2B 613d8fd6aa2451382252cf38282d3f2926583968f9fcf6624106ed48e0e08325ba13d593b5bece241144faee6118c04338fc40623c8991e97efeb1d32065966e SHA512 7946e0f4d4254c5ce42d10d2c1ce34642b52da9c9f0558a69091573544f3089466c0c1ea486f62cc2401b4710195ba26be3a11d9abeb2ebf1dfda4844d61901e
DIST kitty-0.49.0.tar.xz 11985144 BLAKE2B 0831e0ac57f669b982572a0ff742ae4c173fecb24f12f3c1a227a8675735a9ece6843b3c3a79f2fa28e3aa1e7a620a8ab3aa460640c991c01bfd2d43074fe685 SHA512 480a53612247bafb4c156810f84a45f6d1d9dfb6be88a759092930e2011335651b2c92c05c4d2f493b3abc8c9d237ac5d5811bf8a8b178cb56ec0420c8ef8672
DIST kitty-0.49.0.tar.xz.sig 566 BLAKE2B 8da71a7aedf5de49075ae54809beaf241627f97adb6db877b01c2854ebe478775f243ec65a97c6eb8ed8b1f05bcd3ce1fdbee77ceed876f15714ab85ccad4289 SHA512 d244bc0757134144a3cb39352c4e02565550489561e864b8f374ba5cbe7f906c780ccd73cdac7cbf8bbec3aed0e62df016d74de54886e7d1b6c5d73428aae392
DIST kitty-0.49.1-vendor.tar.xz 2510772 BLAKE2B 8b97de473b098383fcc3cbaa50905f94b67ec257875b5ebc86808625be68eaf07909d3bff72eceeff8c0a66685bee31fb577d407bd2b01450e72279e9351607c SHA512 3bbf30975901dc691ee5ef3afe9e382c73cfe44569f6ee8262b20771b70755806adfb247e92973c489cfeafe08903054d20de5c3cfdb0e1ef1b3b70d434eb719
DIST kitty-0.49.1.tar.xz 11992368 BLAKE2B 5a3e46276c5295f47438bd9cde9d05a5d9d61a189776390c1b92c23cb8a86c46bdf04df318952ac31f9ec891616db1df60b219894189e4cd0202015ba779cf28 SHA512 243be7c47d27b1345efb34019f791549c2c0c211cfc51ab7b209d96563694327ccf14f9ff2bd8e990424299c89a8a007f20768c463601b59aece74ce94c8f51b
DIST kitty-0.49.1.tar.xz.sig 566 BLAKE2B 86cb237c0f0a27897e21e948eb5e94901fa7fe1f27948d09e359c6a64b265add6854ebcfe26d997b3ccf69ac6c3ad77d243fbabdf8544cd3eb8d5738ff49eb30 SHA512 0f7f8e0920152d6cbc40aecc931232f4d9bdb8d184fe81bb6c204038399a3413823228dfaf142df15956c99e750d893ad4692b8ea71b6729866702f3254d7f6d
+211
View File
@@ -0,0 +1,211 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit edo go-env optfeature multiprocessing python-single-r1
inherit shell-completion toolchain-funcs xdg
if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
else
inherit verify-sig
SRC_URI="
https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz
https://distfiles.gentoo.org/pub/dev/ionen@gentoo.org/${P}-vendor.tar.xz
verify-sig? ( https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz.sig )
"
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
fi
DESCRIPTION="Fast, feature-rich, GPU-based terminal"
HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
LICENSE="GPL-3 ZLIB"
LICENSE+=" Apache-2.0 BSD BSD-2 MIT" # go
SLOT="0"
IUSE="+X test wayland"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
|| ( X wayland )
test? ( X wayland )
"
RESTRICT="!test? ( test )"
# dlopen: fontconfig,libglvnd
RDEPEND="
${PYTHON_DEPS}
dev-libs/openssl:=
dev-libs/xxhash
media-fonts/symbols-nerd-font
media-libs/freetype
media-libs/harfbuzz:=[truetype]
media-libs/lcms:2
media-libs/libglvnd[X?]
media-libs/libpng:=
sys-apps/dbus
virtual/zlib:=
x11-libs/cairo
x11-libs/libxkbcommon[X?]
x11-misc/xkeyboard-config
~x11-terms/kitty-shell-integration-${PV}
~x11-terms/kitty-terminfo-${PV}
X? (
x11-libs/libX11
x11-libs/libXcursor
)
wayland? ( dev-libs/wayland )
!sci-mathematics/kissat
"
DEPEND="
${RDEPEND}
amd64? ( >=dev-libs/simde-0.8.0-r1 )
arm64? ( dev-libs/simde )
x86? ( dev-libs/simde )
X? (
x11-base/xorg-proto
x11-libs/libXi
x11-libs/libXinerama
x11-libs/libXrandr
)
wayland? ( dev-libs/wayland-protocols )
"
# bug #919751 wrt go subslot
BDEPEND="
${PYTHON_DEPS}
>=dev-lang/go-1.26:=
dev-util/shader-slang
sys-libs/ncurses
virtual/pkgconfig
test? ( $(python_gen_cond_dep 'dev-python/pillow[zlib,${PYTHON_USEDEP}]') )
wayland? ( dev-util/wayland-scanner )
"
[[ ${PV} == 9999 ]] || BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )"
QA_FLAGS_IGNORED="usr/bin/kitten" # written in Go
src_unpack() {
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
cd "${S}" || die
edo go mod vendor
else
use verify-sig &&
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
default
fi
}
src_prepare() {
default
# sed unfortunately feels easier on maintenance than patches here
local sedargs=(
-e "/num_workers =/s/=.*/= $(makeopts_jobs)/"
-e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//'
-e "s/cflags.append(fortify_source)/pass/" # use toolchain's _f_s
-e "s/ld_flags.append('-[sw]')/pass/"
)
# kitty is often popular on wayland-only setups, try to allow this
use !X && sedargs+=( -e '/gl_libs =/s/=.*/= []/' ) #857918
use !X || use !wayland &&
sedargs+=( -e "s/'x11 wayland'/'$(usex X x11 wayland)'/" )
# skip docs for live version, missing dependencies
[[ ${PV} == 9999 ]] && sedargs+=( -e '/exists.*_build/,/docs(ddir)/d' )
sed -i setup.py "${sedargs[@]}" || die
# skip flaky font search, file is replaced in src_install (bug #971276),
# without this the font + fontconfig would also be needed in BDEPEND
mkdir fonts || die
:> fonts/SymbolsNerdFontMono-Regular.ttf || die
local skiptests=(
# needs cgroups and may not work right with portage sandbox
kitty_tests/child.py
# broken with nspawn defaults, skip for convenience (bug #954176)
kitty_tests/crypto.py
# relies on 'who' command which doesn't detect users with pid-sandbox
kitty_tests/utmp.py
# may fail/hang depending on environment and shell initialization
kitty_tests/{shell_integration,ssh}.py
# relies on /proc/self/fd and gets confused when ran from here
tools/utils/tpmfile_test.go
# seems to randomly fail depending on timing (bug #977046)
tools/watch/api_test.go
)
use !test || rm "${skiptests[@]}" || die
}
src_compile() {
tc-export CC
local -x PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
go-env_set_compile_environment
local conf=(
--disable-link-time-optimization
--ignore-compiler-warnings
--libdir-name="$(get_libdir)"
--shell-integration="enabled no-sudo"
--update-check-interval=0
--verbose
)
edo "${EPYTHON}" setup.py linux-package "${conf[@]}"
use test && edo "${EPYTHON}" setup.py build-launcher "${conf[@]}"
rm -r linux-package/share/terminfo || die # provided by kitty-terminfo
if [[ ${PV} == 9999 ]]; then
mkdir -p linux-package/share/doc/${PF} || die
else
mv linux-package/share/doc/{${PN},${PF}} || die
fi
if ! tc-is-cross-compiler; then
# generate default config reference, command taken from docs/conf.rst
linux-package/bin/kitty +runpy \
'from kitty.config import *; print(commented_out_default_config())' \
> linux-package/share/doc/${PF}/kitty.conf || die
# generate shell completions, shell-integration/ has some "old" pre-gen
# ones that currently miss things (no bash, no kitten for zsh, etc...)
linux-package/bin/kitten __complete__ setup bash > "${T}"/kitty || die
linux-package/bin/kitten __complete__ setup fish > "${T}"/kitty.fish || die
linux-package/bin/kitten __complete__ setup zsh > "${T}"/_kitty || die
fi
}
src_test() {
KITTY_CONFIG_DIRECTORY=${T} ./test.py || die # shebang is kitty
}
src_install() {
edo mv linux-package "${ED}"/usr
# kitty currently detects and copies the system's nerd font at build
# time, then uses that rather than the system's at runtime
dosym -r /usr/share/fonts/symbols-nerd-font/SymbolsNerdFontMono-Regular.ttf \
/usr/"$(get_libdir)"/kitty/fonts/SymbolsNerdFontMono-Regular.ttf
if ! tc-is-cross-compiler; then
dobashcomp "${T}"/kitty
bashcomp_alias kitty edit-in-kitty clone-in-kitty kitten
dofishcomp "${T}"/kitty.fish
dozshcomp "${T}"/_kitty
fi
}
pkg_postinst() {
xdg_pkg_postinst
optfeature "custom shaders support" dev-util/shader-slang
optfeature "audio-based terminal bell support" media-libs/libcanberra
use X && optfeature "X11 startup notification support" x11-libs/startup-notification
optfeature "opening links from the terminal" x11-misc/xdg-utils
}