From 1989dc588380914d12f9de8b24d28793ee2c151c Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 28 Sep 2024 00:54:32 +0200 Subject: [PATCH] bump(x11/kitty): 0.36.4 --- x11-packages/kitty/build.sh | 13 +++++++++---- x11-packages/kitty/kitty-safe-wrappers.h.patch | 18 ++++++++++-------- x11-packages/kitty/kitty-systemd.c.patch | 15 +++++++++++++++ x11-packages/kitty/setup.py.patch | 9 +++++---- 4 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 x11-packages/kitty/kitty-systemd.c.patch diff --git a/x11-packages/kitty/build.sh b/x11-packages/kitty/build.sh index d7eb9c27d03aa5..58dd8e3a5c5eda 100644 --- a/x11-packages/kitty/build.sh +++ b/x11-packages/kitty/build.sh @@ -4,13 +4,12 @@ TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" # When updating the package, also update terminfo for kitty by updating # ncurses' kitty sources in main repo -TERMUX_PKG_VERSION="0.31.0" -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION="0.36.4" TERMUX_PKG_SRCURL=https://github.com/kovidgoyal/kitty/releases/download/v${TERMUX_PKG_VERSION}/kitty-${TERMUX_PKG_VERSION}.tar.xz -TERMUX_PKG_SHA256=d122497134abab8e25dfcb6b127af40cfe641980e007f696732f70ed298198f5 +TERMUX_PKG_SHA256=10ebf00a8576bca34ae683866c5be307a35f3c517906d6441923fd740db059bd # fontconfig is dlopen(3)ed: TERMUX_PKG_DEPENDS="dbus, fontconfig, harfbuzz, libpng, librsync, libx11, libxkbcommon, littlecms, ncurses, opengl, openssl, python, xxhash, zlib" -TERMUX_PKG_BUILD_DEPENDS="libxcursor, libxi, libxinerama, libxrandr, xorgproto" +TERMUX_PKG_BUILD_DEPENDS="libxcursor, libxi, libxinerama, libxrandr, simde, xorgproto" TERMUX_PKG_PYTHON_COMMON_DEPS="wheel" TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_HOSTBUILD=true @@ -90,6 +89,9 @@ termux_step_host_build() { } termux_step_pre_configure() { + mkdir -p "$TERMUX_PKG_SRCDIR"/fonts + termux_download https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/NerdFontsSymbolsOnly/SymbolsNerdFontMono-Regular.ttf "$TERMUX_PKG_SRCDIR"/fonts/SymbolsNerdFontMono-Regular.ttf SKIP_CHECKSUM + termux_setup_golang CFLAGS+=" $CPPFLAGS" @@ -110,6 +112,9 @@ termux_step_make() { --ignore-compiler-warnings \ --skip-code-generation \ --verbose + + # Needs a new host build each time it's built: + rm -Rf $TERMUX_PKG_HOSTBUILD_DIR } termux_step_make_install() { diff --git a/x11-packages/kitty/kitty-safe-wrappers.h.patch b/x11-packages/kitty/kitty-safe-wrappers.h.patch index 6e04f17c396ee1..af5f5710460473 100644 --- a/x11-packages/kitty/kitty-safe-wrappers.h.patch +++ b/x11-packages/kitty/kitty-safe-wrappers.h.patch @@ -1,13 +1,15 @@ ---- a/kitty/safe-wrappers.h -+++ b/kitty/safe-wrappers.h -@@ -8,6 +8,10 @@ - #include "data-types.h" - #include - #include +diff -u -r ../kitty-0.36.4/kitty/safe-wrappers.h ./kitty/safe-wrappers.h +--- ../kitty-0.36.4/kitty/safe-wrappers.h 2024-09-27 04:50:49.000000000 +0000 ++++ ./kitty/safe-wrappers.h 2024-09-27 21:59:57.340501152 +0000 +@@ -12,6 +12,11 @@ + #include + #include + +#ifdef __ANDROID__ +int shm_open(const char *, int, mode_t); +int shm_unlink(const char *); +#endif - - ++ static inline int + safe_lockf(int fd, int function, off_t size) { + while (true) { diff --git a/x11-packages/kitty/kitty-systemd.c.patch b/x11-packages/kitty/kitty-systemd.c.patch new file mode 100644 index 00000000000000..3ab514acd2fe2e --- /dev/null +++ b/x11-packages/kitty/kitty-systemd.c.patch @@ -0,0 +1,15 @@ +diff -u -r ../kitty-0.36.4/kitty/systemd.c ./kitty/systemd.c +--- ../kitty-0.36.4/kitty/systemd.c 2024-09-27 04:50:49.000000000 +0000 ++++ ./kitty/systemd.c 2024-09-27 22:29:07.912178101 +0000 +@@ -51,6 +51,11 @@ + ensure_initialized(void) { + if (systemd.initialized) return; + systemd.initialized = true; ++#ifdef __ANDROID__ ++ // Avoid an error log entry on each startup. ++ systemd.lib = NULL; ++ return; ++#endif + + const char* libnames[] = { + #if defined(_KITTY_SYSTEMD_LIBRARY) diff --git a/x11-packages/kitty/setup.py.patch b/x11-packages/kitty/setup.py.patch index bbaae3b41add8b..6cc10d70cddb31 100644 --- a/x11-packages/kitty/setup.py.patch +++ b/x11-packages/kitty/setup.py.patch @@ -1,9 +1,10 @@ ---- a/setup.py -+++ b/setup.py -@@ -737,7 +737,7 @@ +diff -u -r ../kitty-0.36.4/setup.py ./setup.py +--- ../kitty-0.36.4/setup.py 2024-09-27 04:50:49.000000000 +0000 ++++ ./setup.py 2024-09-27 22:13:43.049667431 +0000 +@@ -963,7 +963,7 @@ - def compile_glfw(compilation_database: CompilationDatabase) -> None: + def compile_glfw(compilation_database: CompilationDatabase, build_dsym: bool = False) -> None: - modules = 'cocoa' if is_macos else 'x11 wayland' + modules = 'cocoa' if is_macos else 'x11' for module in modules.split():