Skip to content

Commit

Permalink
bump(x11/kitty): 0.36.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Sep 28, 2024
1 parent d2133d8 commit 1989dc5
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 16 deletions.
13 changes: 9 additions & 4 deletions x11-packages/kitty/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand All @@ -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() {
Expand Down
18 changes: 10 additions & 8 deletions x11-packages/kitty/kitty-safe-wrappers.h.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
--- a/kitty/safe-wrappers.h
+++ b/kitty/safe-wrappers.h
@@ -8,6 +8,10 @@
#include "data-types.h"
#include <fcntl.h>
#include <sys/mman.h>
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 <stdlib.h>
#include <unistd.h>

+#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) {
15 changes: 15 additions & 0 deletions x11-packages/kitty/kitty-systemd.c.patch
Original file line number Diff line number Diff line change
@@ -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)
9 changes: 5 additions & 4 deletions x11-packages/kitty/setup.py.patch
Original file line number Diff line number Diff line change
@@ -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():
Expand Down

0 comments on commit 1989dc5

Please sign in to comment.