bspwm: fix hardcoded /tmp path problem

Signed-off-by: NoNameMan1231 <87801676+NoNameMan1231@users.noreply.github.com>
This commit is contained in:
NoNameMan1231 2022-03-22 08:47:04 +08:00 committed by Yaksh Bariya
parent 1884e8bb34
commit 0411aa1e1c
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 23 additions and 1 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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);