From 05a257d57ce71cf80fd45bd0d1d467bcbda32a8f Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Thu, 8 Jan 2026 08:09:27 -0500 Subject: [PATCH] new bblfs: x11-terms/kitty-0.44.0 --- x11-terms/kitty-0.44.0.PKGBUILD | 104 ++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 x11-terms/kitty-0.44.0.PKGBUILD diff --git a/x11-terms/kitty-0.44.0.PKGBUILD b/x11-terms/kitty-0.44.0.PKGBUILD new file mode 100644 index 0000000..04faedb --- /dev/null +++ b/x11-terms/kitty-0.44.0.PKGBUILD @@ -0,0 +1,104 @@ +pkgname=kitty +pkgbase=kitty +pkgver=0.44.0 +pkgdesc="A modern, hackable, featureful, OpenGL-based terminal emulator" +arch=('x86_64') +homepage="https://github.com/kovidgoyal/kitty" +license=('GPL-3.0-only') +depends=( + 'cairo' + 'dbus' + 'freetype' + 'fontconfig' + 'harfbuzz' + 'lcms' + 'libpng' + 'libxkbcommon' + 'openssl' + 'python3' + 'wayland' + 'xxhash' + 'zlib' +) +makedepends=( + 'go' + 'simde' + 'symbols-nerd-font' + 'wayland-protocols' +) +sources=("${pkgbase}-${pkgver}.tar.xz") +urls=("https://github.com/kovidgoyal/${pkgbase}/releases/download/v${pkgver}/${sources[0]}") +md5sums=("c3c31e13371c08166cc2bc4ea34cdc74") + +src_prepare() { + tar -xf ${distdir}/${sources[0]} --strip-components=1 + + # sed unfortunately feels easier on maintenance than patches here + local sedargs=( + -e "/num_workers =/s/=.*/= ${PARALLEL_JOBS}/" + -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//' + -e "s/cflags.append(fortify_source)/pass/" # use toolchain's _ + -e "s/ld_flags.append('-[sw]')/pass/" + ) + # kitty is often popular on wayland-only setups, try to allow this + sedargs+=( -e '/gl_libs =/s/=.*/= []/' ) #857918 + sedargs+=( -e "s/'x11 wayland'/'wayland'/" ) + sed -i setup.py "${sedargs[@]}" + + 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 + ) + rm "${skiptests[@]}" +} + +src_build() { + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw -p=${PARALLEL_JOBS} -v -x -buildvcs=false" + local conf=( + --disable-link-time-optimization + --ignore-compiler-warnings + --shell-integration="enabled no-sudo" + --update-check-interval=0 + --verbose + ) + python3 setup.py linux-package "${conf[@]}" + + rm -r linux-package/share/terminfo + mv -v linux-package/share/doc/{${pkgname},${pkgname}-${pkgver}} + + linux-package/bin/kitty +runpy \ + 'from kitty.config import *; print(commented_out_default_config())' \ + > linux-package/share/doc/${pkgname}-${pkgver}/kitty.conf + + # 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 > "${TEMPDIR}"/kitty + linux-package/bin/kitten __complete__ setup fish > "${TEMPDIR}"/kitty.fish + linux-package/bin/kitten __complete__ setup zsh > "${TEMPDIR}"/_kitty +} + +src_install() { + mv -v linux-package "${pkgdir}/usr" + + ln -svrf "${pkgdir}/usr/share/fonts/symbols-nerd-font/SymbolsNerdFontMono-Regular.ttf" \ + "${pkgdir}/usr/lib/kitty/fonts/SymbolsNerdFontMono-Regular.ttf" + + install -vDm644 "${TEMPDIR}/kitty" "${pkgdir}"/usr/share/bash-completion/completions/kitty + install -vDm644 "${TEMPDIR}/kitty.fish" "${pkgdir}"/usr/share/fish/vendor_completions.d/kitty.fish + install -vDm644 "${TEMPDIR}/_kitty" "${pkgdir}"/usr/share/zsh/site-functions/_kitty + for _f in edit-in-kitty clone-in-kitty kitten; do + ln -sv kitty "${pkgdir}"/usr/share/bash-completion/completions/${_f} + done +} + +# vim:ft=sh syn=sh et sw=2: