diff --git a/packages/libunqlite/build.sh b/packages/libunqlite/build.sh new file mode 100644 index 000000000..869b61aa2 --- /dev/null +++ b/packages/libunqlite/build.sh @@ -0,0 +1,9 @@ +TERMUX_PKG_HOMEPAGE=https://unqlite.org/ +TERMUX_PKG_DESCRIPTION="Transactional embedded database engine" +TERMUX_PKG_LICENSE="BSD 2-Clause, Sleepycat" +TERMUX_PKG_LICENSE_FILE="LICENSE, src/jx9_license.txt" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=1.1.9 +TERMUX_PKG_SRCURL=https://github.com/symisc/unqlite/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=33d5b5e7b2ca223942e77d31112d2e20512bc507808414451c8a98a7be5e15c0 +TERMUX_PKG_NO_STATICSPLIT=true diff --git a/packages/libunqlite/src-jx9_vfs.c.patch b/packages/libunqlite/src-jx9_vfs.c.patch new file mode 100644 index 000000000..548e23b13 --- /dev/null +++ b/packages/libunqlite/src-jx9_vfs.c.patch @@ -0,0 +1,22 @@ +--- a/src/jx9_vfs.c ++++ b/src/jx9_vfs.c +@@ -7284,9 +7284,7 @@ + static void UnixVfs_TempDir(jx9_context *pCtx) + { + static const char *azDirs[] = { +- "/var/tmp", +- "/usr/tmp", +- "/usr/local/tmp" ++ "@TERMUX_PREFIX@/var/tmp" + }; + unsigned int i; + struct stat buf; +@@ -7307,7 +7305,7 @@ + return; + } + /* Default temp dir */ +- jx9_result_string(pCtx, "/tmp", (int)sizeof("/tmp")-1); ++ jx9_result_string(pCtx, "@TERMUX_PREFIX@/tmp", (int)sizeof("@TERMUX_PREFIX@/tmp")-1); + } + /* unsigned int (*xProcessId)(void) */ + static unsigned int UnixVfs_ProcessId(void) diff --git a/packages/libunqlite/unqlite.c.patch b/packages/libunqlite/unqlite.c.patch new file mode 100644 index 000000000..68b331880 --- /dev/null +++ b/packages/libunqlite/unqlite.c.patch @@ -0,0 +1,22 @@ +--- a/unqlite.c ++++ b/unqlite.c +@@ -40590,9 +40590,7 @@ + static void UnixVfs_TempDir(jx9_context *pCtx) + { + static const char *azDirs[] = { +- "/var/tmp", +- "/usr/tmp", +- "/usr/local/tmp" ++ "@TERMUX_PREFIX@/var/tmp" + }; + unsigned int i; + struct stat buf; +@@ -40613,7 +40611,7 @@ + return; + } + /* Default temp dir */ +- jx9_result_string(pCtx, "/tmp", (int)sizeof("/tmp")-1); ++ jx9_result_string(pCtx, "@TERMUX_PREFIX@/tmp", (int)sizeof("@TERMUX_PREFIX@/tmp")-1); + } + /* unsigned int (*xProcessId)(void) */ + static unsigned int UnixVfs_ProcessId(void)