community/kitty: upgrade to 0.27.1

This commit is contained in:
psykose 2023-02-07 21:01:53 +00:00
parent 25567d270a
commit 463f147553
6 changed files with 26 additions and 69 deletions

View File

@ -2,8 +2,8 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=kitty
pkgver=0.26.5
pkgrel=1
pkgver=0.27.1
pkgrel=0
pkgdesc="Modern, hackable, featureful, OpenGL based terminal emulator"
url="https://sw.kovidgoyal.net/kitty/"
arch="all"
@ -14,6 +14,7 @@ makedepends="
dbus-dev
fontconfig-dev
freetype-dev
go
harfbuzz-dev
lcms2-dev
libcanberra-dev
@ -33,25 +34,18 @@ makedepends="
zlib-dev
"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-wayland $pkgname-x11"
subpackages="$pkgname-wayland $pkgname-x11 $pkgname-kitten"
source="$pkgname-$pkgver.tar.gz::https://github.com/kovidgoyal/kitty/archive/v$pkgver.tar.gz
no-march-native.patch
fix-ppc64le-build-ioctl-with-musl.patch
disable-docs.patch
include-sys-types.h.patch
"
prepare() {
default_prepare
# Fix python shebangs.
find . -type f -name '*.py' -exec sed -Ei 's|/usr/bin/env python3?|/usr/bin/python3|g' '{}' \;
}
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"
make all
python3 setup.py linux-package \
--ignore-compiler-warnings \
--update-check-interval=0
}
check() {
@ -59,11 +53,15 @@ check() {
}
package() {
python3 setup.py linux-package --prefix "$pkgdir/usr"
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() {
@ -82,10 +80,13 @@ x11() {
amove usr/lib/kitty/kitty/glfw-x11.so
}
kitten() {
pkgdesc="Kitty Kitten client"
amove usr/bin/kitten
}
sha512sums="
b0fdee8b111a626555b4d3915bce86c8d871d6a72f17d8a5a0a52e25a4c53b3f0369aac9e0691d7e0067f44de8feee27127dea8f6b748bf4e767792c011be800 kitty-0.26.5.tar.gz
5974daea97816dd8a21842bf0fb53fffd4f64384bde074398c2817663f0d1ed452a1ac3dd762a273c26a736fc023972e693834d4e25afe8d27c44e172d1ab4e8 no-march-native.patch
330f56f5fd60607c57f4f2cffdf33768b3af9e4c3e271a60a05cc3c653d70f7402af91ba0cdfe0257c8b4779884a6440eb52496078bce11799aaa1829ced9245 fix-ppc64le-build-ioctl-with-musl.patch
45222f0a06a9f5f8fc07b315e2abb01182443269e06f1e03b1383e8160f462871efc4af629cbc179f9d51c99ca4e10294b9b74b9b222ac985ba78f700b9e403e disable-docs.patch
bad0ef7a6cd60984ea6d2550ba9994ed992c4610f1ebf440d2c0c9eab0bea804659893d5673c9451944a4b4f8ae066b90fa81c08af202a788e1ae1e47fccc9c1 include-sys-types.h.patch
d18e035a80eb9f20fe97106d69aa8de86dca83f1e552142a1ffc8694f4384b70d140e331729e830af727e42c87d3c0eeca423b1a4975ffd7ceddb05a7a2357dd kitty-0.27.1.tar.gz
1676b3d5272c14561660ccb7b89c30b65b6c044b4ce0f57ba4fe88d3c4aefe3becf480a70b593602d907c501cb785ae7481c612ce125610fecc751e2d31f8a7c disable-docs.patch
"

View File

@ -2,9 +2,11 @@ HTML docs and even man pages require some extra Sphinx extensions
to be installed.
diff -upr kitty-0.24.3.orig/setup.py kitty-0.24.3/setup.py
--- kitty-0.24.3.orig/setup.py 2022-03-17 17:56:41.669108248 +0100
+++ kitty-0.24.3/setup.py 2022-03-17 17:57:47.155989536 +0100
@@ -943,11 +943,6 @@ def compile_python(base_path: str) -> No
diff --git a/setup.py b/setup.py
index 5b3bf05..5ef7a68 100755
--- a/setup.py
+++ b/setup.py
@@ -1086,11 +1086,6 @@ def c(base_path: str, **kw: object) -> None:
def create_linux_bundle_gunk(ddir: str, libdir_name: str) -> None:

View File

@ -1,22 +0,0 @@
kitty was breaking when building in ppc64le using musl, because ioctl() is defined
as ioctl(int, int) in musl and mosh is using TIOCSWINSZ macro as parameter. This was
triggering a gcc warning and make the build fail.
This patch does an explicit integer conversion in TIOCSWINSZ, as no bits get
lost.
--- a/kitty/child-monitor.c
+++ b/kitty/child-monitor.c
@@ -435,7 +435,11 @@
static inline bool
pty_resize(int fd, struct winsize *dim) {
while(true) {
+#if defined(__powerpc64__) && (!defined(__GLIBC__) && !defined(__UCLIBC__))
+ if (ioctl(fd, (int) TIOCSWINSZ, dim) == -1) {
+#else
if (ioctl(fd, TIOCSWINSZ, dim) == -1) {
+#endif
if (errno == EINTR) continue;
if (errno != EBADF && errno != ENOTTY) {
log_error("Failed to resize tty associated with fd: %d with error: %s", fd, strerror(errno));

View File

@ -1,12 +0,0 @@
diff --git a/kitty/keys.c b/kitty/keys.c
index 5fc9524..c97a5fa 100644
--- a/kitty/keys.c
+++ b/kitty/keys.c
@@ -10,6 +10,7 @@
#include "screen.h"
#include "glfw-wrapper.h"
#include "control-codes.h"
+#include <sys/types.h>
#include <structmember.h>
// python KeyEvent object {{{

View File

@ -11,5 +11,6 @@ if ! apk info -eq wayland && ! apk info -eq libx11; then
fi
echo '* If you want to display images in terminal (icat), install "imagemagick".' >&2
echo '* The "kitten" executable is found in kitty-kitten.' >&2
exit 0

View File

@ -1,13 +0,0 @@
diff --git a/setup.py b/setup.py
index c59e6f3..868b65d 100755
--- a/setup.py
+++ b/setup.py
@@ -369,7 +369,7 @@ def init_env(
werror = '' if ignore_compiler_warnings else '-pedantic-errors -Werror'
std = '' if is_openbsd else '-std=c11'
sanitize_flag = ' '.join(sanitize_args)
- march = '-march=native' if native_optimizations else ''
+ march = ''
cflags_ = os.environ.get(
'OVERRIDE_CFLAGS', (
f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}'