From f13aae6ef1c1a2d97b9b9dd1f12f42c70f44ba6a Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Fri, 9 Jun 2023 13:39:30 -0400 Subject: [PATCH] kitty: update to 0.28.1, adopt. add subpackages for components that can be used in remote/headless envs --- srcpkgs/kitty-kitten | 1 + srcpkgs/kitty-shell-integration | 1 + srcpkgs/kitty/patches/cross.patch | 11 +++++++++ srcpkgs/kitty/template | 39 ++++++++++++++++++++++++------- 4 files changed, 44 insertions(+), 8 deletions(-) create mode 120000 srcpkgs/kitty-kitten create mode 120000 srcpkgs/kitty-shell-integration create mode 100644 srcpkgs/kitty/patches/cross.patch diff --git a/srcpkgs/kitty-kitten b/srcpkgs/kitty-kitten new file mode 120000 index 000000000000..659fb6b426aa --- /dev/null +++ b/srcpkgs/kitty-kitten @@ -0,0 +1 @@ +kitty \ No newline at end of file diff --git a/srcpkgs/kitty-shell-integration b/srcpkgs/kitty-shell-integration new file mode 120000 index 000000000000..659fb6b426aa --- /dev/null +++ b/srcpkgs/kitty-shell-integration @@ -0,0 +1 @@ +kitty \ No newline at end of file diff --git a/srcpkgs/kitty/patches/cross.patch b/srcpkgs/kitty/patches/cross.patch new file mode 100644 index 000000000000..a8c0df422355 --- /dev/null +++ b/srcpkgs/kitty/patches/cross.patch @@ -0,0 +1,11 @@ +--- a/setup.py ++++ b/setup.py +@@ -887,7 +887,7 @@ + + env = os.environ.copy() + env['ASAN_OPTIONS'] = 'detect_leaks=0' +- cp = subprocess.run([kitty_exe, '+launch', os.path.join(src_base, 'gen-go-code.py')], stdout=subprocess.PIPE, env=env) ++ cp = subprocess.run([env['QEMU_BIN'], kitty_exe, '+launch', os.path.join(src_base, 'gen-go-code.py')], stdout=subprocess.PIPE, env=env) + if cp.returncode != 0: + raise SystemExit(cp.returncode) + diff --git a/srcpkgs/kitty/template b/srcpkgs/kitty/template index 90eb7261085c..a65b08053065 100644 --- a/srcpkgs/kitty/template +++ b/srcpkgs/kitty/template @@ -1,20 +1,25 @@ # Template file for 'kitty' pkgname=kitty -version=0.26.5 -revision=2 +version=0.28.1 +revision=1 +build_helper="qemu" pycompile_dirs="usr/lib/kitty" -hostmakedepends="pkg-config python3 wayland-devel wayland-protocols" +hostmakedepends="go pkg-config python3 wayland-devel wayland-protocols" makedepends="gettext-devel glfw-devel harfbuzz-devel libxkbcommon-devel - python3-devel wayland-devel wayland-protocols librsync-devel libcanberra-devel openssl-devel" -depends="kitty-terminfo-${version}_${revision}" + python3-devel wayland-devel wayland-protocols librsync-devel libcanberra-devel + openssl-devel dbus-devel libXcursor-devel libXrandr-devel libXi-devel + fontconfig-devel libxcb-devel lcms2-devel" +depends="kitty-terminfo-${version}_${revision} kitty-shell-integration-${version}_${revision} + kitty-kitten-${version}_${revision}" short_desc="Modern, hackable, featureful, OpenGL based terminal emulator" -maintainer="Benjamin Slade " -license="GPL-3.0-or-later" +maintainer="classabbyamp " +license="GPL-3.0-only" homepage="https://sw.kovidgoyal.net/kitty/" changelog="https://sw.kovidgoyal.net/kitty/changelog.html" distfiles="https://github.com/kovidgoyal/kitty/releases/download/v${version}/kitty-${version}.tar.xz" -checksum=5544a580314fec7711187ce28162909b5ecff6780071444fe96fb97f8be5c9ad +checksum=c11c545ca56adf1c26cfd8f5b4a3ba5f149f00542fbf0fa2c4439bd9bf6f78a5 python_version=3 +nopie_files="/usr/bin/kitten" LDFLAGS+=" -Wl,-z,stack-size=2097152" # TIOCSWINSZ on ppc overflows signed int, used in ioctl() @@ -26,7 +31,11 @@ esac do_build() { if [ "$CROSS_BUILD" ]; then CFLAGS+=" -I${XBPS_CROSS_BASE}/${py3_inc}" + export QEMU_BIN="qemu-${XBPS_TARGET_QEMU_MACHINE}-static" + else + export QEMU_BIN="env" fi + . /void-packages/common/environment/build-style/go.sh python3 setup.py linux-package --prefix=${DESTDIR}/usr --update-check-interval=0 --verbose } @@ -40,3 +49,17 @@ kitty-terminfo_package() { vmove usr/share/terminfo } } + +kitty-shell-integration_package() { + short_desc+=" - shell integration scripts" + pkg_install() { + vmove usr/lib/kitty/shell-integration + } +} + +kitty-kitten_package() { + short_desc+=" - kitten client" + pkg_install() { + vmove usr/bin/kitten + } +}