chocolate-doom: fix tmpdir path (#307)

This commit is contained in:
marcusz 2021-05-09 23:15:27 +08:00 committed by Yaksh Bariya
parent 4ed42043b7
commit 75aa831271
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 25 additions and 1 deletions

View File

@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Historically-accurate Doom, Heretic, Hexen, and Strife p
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="WMCB-Tech @marcusz"
TERMUX_PKG_VERSION=3.0.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/chocolate-doom/chocolate-doom/archive/refs/tags/chocolate-doom-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a54383beef6a52babc5b00d58fcf53a454f012ced7b1936ba359b13f1f10ac66
TERMUX_PKG_DEPENDS="sdl2, sdl2-mixer, sdl2-net"

View File

@ -0,0 +1,24 @@
diff -uNr chocolate-doom-chocolate-doom-3.0.1/src/m_misc.c chocolate-doom-chocolate-doom-3.0.1.mod/src/m_misc.c
--- ./src/m_misc.c 2020-06-25 11:16:34.000000000 +0800
+++ ./src/m_misc.c 2021-05-09 17:19:02.830000000 +0800
@@ -250,7 +250,7 @@
#else
// In Unix, just use /tmp.
- tempdir = "/tmp";
+ tempdir = "@TERMUX_PREFIX@/tmp";
#endif
return M_StringJoin(tempdir, DIR_SEPARATOR_S, s, NULL);
diff -uNr chocolate-doom-chocolate-doom-3.0.1/src/setup/execute.c chocolate-doom-chocolate-doom-3.0.1.mod/src/setup/execute.c
--- ./src/setup/execute.c 2020-06-25 11:16:34.000000000 +0800
+++ ./src/setup/execute.c 2021-05-09 17:19:37.700000000 +0800
@@ -69,7 +69,7 @@
#else
// In Unix, just use /tmp.
- tempdir = "/tmp";
+ tempdir = "@TERMUX_PREFIX@/tmp";
#endif
return M_StringJoin(tempdir, DIR_SEPARATOR_S, s, NULL);