From 0411aa1e1c15b80eed4663623002952208c2fad2 Mon Sep 17 00:00:00 2001 From: NoNameMan1231 <87801676+NoNameMan1231@users.noreply.github.com> Date: Tue, 22 Mar 2022 08:47:04 +0800 Subject: [PATCH] bspwm: fix hardcoded /tmp path problem Signed-off-by: NoNameMan1231 <87801676+NoNameMan1231@users.noreply.github.com> --- x11-packages/bspwm/build.sh | 2 +- x11-packages/bspwm/common.patch | 11 +++++++++++ x11-packages/bspwm/helpers.c.patch | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 x11-packages/bspwm/common.patch create mode 100644 x11-packages/bspwm/helpers.c.patch diff --git a/x11-packages/bspwm/build.sh b/x11-packages/bspwm/build.sh index 21bd72b05..f544906bd 100644 --- a/x11-packages/bspwm/build.sh +++ b/x11-packages/bspwm/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A tiling window manager based on binary space partitioni TERMUX_PKG_LICENSE="BSD 2-Clause" TERMUX_PKG_MAINTAINER="@leapofazzam123" TERMUX_PKG_VERSION=0.9.10 -TERMUX_PKG_REVISION=3 +TERMUX_PKG_REVISION=4 TERMUX_PKG_SRCURL="https://github.com/baskerville/bspwm/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz" TERMUX_PKG_SHA256="0d0f5e465b9c27a5c2143c86189392fa297fad55253b9ed8f6854473d3928f8f" TERMUX_PKG_DEPENDS="libx11, libxcb, libxkbcommon, sxhkd, xcb-util, xcb-util-cursor, xcb-util-keysyms, xcb-util-wm, xcb-util-xrm" diff --git a/x11-packages/bspwm/common.patch b/x11-packages/bspwm/common.patch new file mode 100644 index 000000000..4a141a5ac --- /dev/null +++ b/x11-packages/bspwm/common.patch @@ -0,0 +1,11 @@ +--- ./src/common.h 2020-08-02 15:51:32.000000000 +0800 ++++ ./src.mod/common.h 2022-03-21 21:24:04.760854462 +0800 +@@ -25,7 +25,7 @@ + #ifndef BSPWM_COMMON_H + #define BSPWM_COMMON_H + +-#define SOCKET_PATH_TPL "/tmp/bspwm%s_%i_%i-socket" ++#define SOCKET_PATH_TPL "@TERMUX_PREFIX@/tmp/bspwm%s_%i_%i-socket" + #define SOCKET_ENV_VAR "BSPWM_SOCKET" + + #define FAILURE_MESSAGE "\x07" diff --git a/x11-packages/bspwm/helpers.c.patch b/x11-packages/bspwm/helpers.c.patch new file mode 100644 index 000000000..ba2d74f06 --- /dev/null +++ b/x11-packages/bspwm/helpers.c.patch @@ -0,0 +1,11 @@ +--- ./src/helpers.c 2020-08-02 15:51:32.000000000 +0800 ++++ ./src.mod/helpers.c 2022-03-21 21:23:47.300854469 +0800 +@@ -124,7 +124,7 @@ + int tempfd; + char *runtime_dir = getenv(RUNTIME_DIR_ENV); + if (runtime_dir == NULL) { +- runtime_dir = "/tmp"; ++ runtime_dir = "@TERMUX_PREFIX@/tmp"; + } + + char *fifo_path = malloc(strlen(runtime_dir)+1+strlen(template)+1);