# Contributor: Francesco Colista # Contributor: Jakub Jirutka # Maintainer: Francesco Colista pkgname=kitty pkgver=0.27.1 pkgrel=1 pkgdesc="Modern, hackable, featureful, OpenGL based terminal emulator" url="https://sw.kovidgoyal.net/kitty/" arch="all" license="GPL-3.0-only" depends="less ncurses ncurses-terminfo-base py3-pygments" checkdepends="font-dejavu py3-pytest" makedepends=" dbus-dev fontconfig-dev freetype-dev go harfbuzz-dev lcms2-dev libcanberra-dev libpng-dev librsync-dev libxcursor-dev libxi-dev libxinerama-dev libxkbcommon-dev libxrandr-dev mesa-dev openssl-dev py3-setuptools python3-dev wayland-dev wayland-protocols zlib-dev " install="$pkgname.post-install $pkgname.post-upgrade" subpackages="$pkgname-wayland $pkgname-x11 $pkgname-kitten" source="$pkgname-$pkgver.tar.gz::https://github.com/kovidgoyal/kitty/archive/v$pkgver.tar.gz disable-docs.patch " build() { # See https://github.com/void-linux/void-packages/issues/7975. export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=2097152" export CFLAGS="$CFLAGS -Wno-error=overflow" python3 setup.py linux-package \ --ignore-compiler-warnings \ --update-check-interval=0 } check() { pytest -v --ignore kitty_tests/file_transmission.py kitty_tests/crypto.py } package() { mkdir -p "$pkgdir" cp -r linux-package "$pkgdir"/usr/ # This is now included in ncurses-terminfo-base. rm "$pkgdir"/usr/share/terminfo/x/xterm-kitty rmdir -p "$pkgdir"/usr/share/terminfo/x 2>/dev/null || true # remove useless "optimised" python find "$pkgdir" \( -name "*.opt-1.pyc" -o -name "*.opt-2.pyc" \) -delete } wayland() { pkgdesc="Kitty GLFW backend for Wayland" depends="$pkgname=$pkgver-r$pkgrel wayland-libs-egl" install_if="$pkgname=$pkgver-r$pkgrel wayland-libs-server" amove usr/lib/kitty/kitty/glfw-wayland.so } x11() { pkgdesc="Kitty GLFW backend for X11" depends="$pkgname=$pkgver-r$pkgrel" install_if="$pkgname=$pkgver-r$pkgrel xorg-server" amove usr/lib/kitty/kitty/glfw-x11.so } kitten() { pkgdesc="Kitty Kitten client" amove usr/bin/kitten } sha512sums=" d18e035a80eb9f20fe97106d69aa8de86dca83f1e552142a1ffc8694f4384b70d140e331729e830af727e42c87d3c0eeca423b1a4975ffd7ceddb05a7a2357dd kitty-0.27.1.tar.gz 1676b3d5272c14561660ccb7b89c30b65b6c044b4ce0f57ba4fe88d3c4aefe3becf480a70b593602d907c501cb785ae7481c612ce125610fecc751e2d31f8a7c disable-docs.patch "