x11-terms/kitty: add 0.46.2

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2026-03-20 21:45:47 -04:00
parent d7af10809d
commit b130e0054c
2 changed files with 210 additions and 0 deletions

View File

@@ -5,3 +5,6 @@ DIST kitty-0.45.0.tar.xz.sig 566 BLAKE2B 6e23d94ba115bd49c500ac9b2359b00279b6a2b
DIST kitty-0.46.1-vendor.tar.xz 2292732 BLAKE2B d090b830961731599e8ac83c5f424ea6070049973aae99c33e856e8d911fc00ddec5f4bec95822ccdc6534b5e4371675e60c951940f44b3638508e01ba423f98 SHA512 39f55cb2dab38d492da57e90a7d7aca769e50f70d7821700146a919216fba4e285111471e493f5c78f3c124b3961c3d7fb61baf796afb1fd38b88283673734dc
DIST kitty-0.46.1.tar.xz 10350256 BLAKE2B f05a462165125c59123f6f1d1b4cde4859d32773a48b263b681e13028c97945b077d39d42d11da8b7b41ce1b5776ed599f3dd074edf1a8810911ff456a1afdb8 SHA512 37d89156b8529943e1f6e437698a26b61887dbd778f40904320ea6e7b96b8c4d2ae50883bf386a5b68114342ad4a502703f040c6b95e445c01d7dce93ae8ff55
DIST kitty-0.46.1.tar.xz.sig 566 BLAKE2B 79902dcb3e7f08e8156e9ebc1141fb6641f1df67d6d9ca898d0c6093bf26999473f4bebf1f7d5a29681219bfa10e347bc20ffae17993a6f54aa6438f49d40c73 SHA512 30890e27bc0c99609ad5aed0ea71eefad0db975c49282c2cfeda77968a3816ce778d0b2a2ce211cfc77c66e5979b0fe4adc6f95de115643e63e518846eb6a0e5
DIST kitty-0.46.2-vendor.tar.xz 2292516 BLAKE2B 0c3365f216fea242aec5c70acea88d36b8ec8763ad3abda6e6f045db9ed0f5f57f4b4ed07b5a4e460c64d0e9959f74c8480b02f5f00ff5747db79d8f4fa5bd85 SHA512 f5cbbbe5f8e23104ed83d0e0ef4efbf4fd3805407e7ba46a6b989a4dfaaf5c9e6768ebafadea8d295029bc08d627ab7999333a1fad8aad1fe9379a262aaebd3a
DIST kitty-0.46.2.tar.xz 10352720 BLAKE2B b5e162436e92b19d36cb72a5a625efeec21be0377c7b9ce9788980a380fabc115ee07dd9917f7b4d767bfc3416dd99b34f57cdbf183eaac60ae14a9731a82a58 SHA512 e14ef4d7e522ac67dc3e485082ec0d13c3662bde6ba086aa41ed333cc23abb5cc1df0eeb325a72d2206fb06601b6092fe4d8b613222e8de819de856e6fcfe445
DIST kitty-0.46.2.tar.xz.sig 566 BLAKE2B a08212c37355578df9d6e3ca99a2a3126d11bc86a8f6a2ab16a90095d15386954744442c9f6e5f79450b2fc1b342da5171115290d6c41607278d3e1f81c97fc0 SHA512 bd85ea80eb7ae52e26922cf55bf35ede53f6ef1fbead69e8db53416ea1f7867b351263a2522cf885e878e9f337dd8beff38dce4eef83853b6eb1a7b8fd826ae4

View File

@@ -0,0 +1,207 @@
# 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://dev.gentoo.org/~ionen/distfiles/${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 ~loong ~ppc64 ~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:=
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)
mkdir fonts || die
:> fonts/SymbolsNerdFontMono-Regular.ttf || die
local skiptests=(
# 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
)
use !test || rm "${skiptests[@]}" || die
}
src_compile() {
tc-export CC
local -x PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
go-env_set_compile_environment
local -x GOFLAGS="-p=$(makeopts_jobs) -v -x -buildvcs=false"
use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie"
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 "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
}