# Maintainer: Sven-Hendrik Haase # Maintainer: Maxim Baz <$pkgname at maximbaz dot com> # Contributor: Fabio 'Lolix' Loli -> https://github.com/FabioLolix # Contributor: Maximilian Kindshofer # ALARM: Kevin Mihelich # - patch to remove lto from hardcoded cflags pkgbase=kitty pkgname=(kitty kitty-terminfo) pkgver=0.14.5 pkgrel=1 pkgdesc="A modern, hackable, featureful, OpenGL-based terminal emulator" arch=('x86_64') url="https://github.com/kovidgoyal/kitty" license=('GPL3') depends=('python3' 'freetype2' 'fontconfig' 'wayland' 'libx11' 'libxkbcommon-x11' 'libxi' 'hicolor-icon-theme' 'libgl' 'libcanberra') makedepends=('libxinerama' 'libxcursor' 'libxrandr' 'wayland-protocols' 'python-sphinx') optdepends=('imagemagick: viewing images with icat') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/kovidgoyal/$pkgname/archive/v$pkgver.tar.gz" '0001-remove-lto.patch') sha512sums=('079a92f55928b4b09be19f8e0ba692a6237212b4fe6a8675295533ccbecd6081219a60b86219e294777ef95bb73aef04d5e4503b71052329aa9b4a2e698c9e49' '1ca2b72394ea58500da497e0decf60ded2d2ed94451b63f3c7fe89710a58160d55e637ae194c62706457e1fe99356b078050289f74b2e4d4a5450620e16e0d73') prepare() { cd "$srcdir/$pkgname-$pkgver" patch -p1 -i ../0001-remove-lto.patch } build() { cd "$srcdir/$pkgname-$pkgver" python3 setup.py linux-package --update-check-interval=0 } package_kitty() { depends+=('kitty-terminfo') cd "$srcdir/$pkgname-$pkgver" cp -r linux-package "${pkgdir}"/usr # completions python __main__.py + complete setup bash | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/kitty python __main__.py + complete setup fish | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/fish/vendor_completions.d/kitty.fish # doesn't know how to http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Autoloaded-files # so we write our own header { echo "#compdef kitty" python __main__.py + complete setup zsh } | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_kitty install -Dm644 "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/kitty.png "${pkgdir}"/usr/share/pixmaps/kitty.png rm -r "$pkgdir"/usr/share/terminfo } package_kitty-terminfo() { pkgdesc='Terminfo for kitty, an OpenGL-based terminal emulator' depends=('ncurses') mkdir -p "$pkgdir/usr/share/terminfo" tic -x -o "$pkgdir/usr/share/terminfo" $pkgbase-$pkgver/terminfo/kitty.terminfo }