new package: libsophia

This commit is contained in:
Tee KOBAYASHI 2022-02-07 23:58:00 +09:00 committed by xtkoba
parent c6137be9d3
commit 5d387e1a01
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,14 @@
TERMUX_PKG_HOMEPAGE=http://sophia.systems/
TERMUX_PKG_DESCRIPTION="Advanced transactional MVCC key-value/row storage library"
TERMUX_PKG_LICENSE="BSD 2-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.2
TERMUX_PKG_SRCURL=https://github.com/pmwkaa/sophia.git
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_make_install() {
install -Dm600 -t $TERMUX_PREFIX/lib libsophia.a
install -Dm600 -t $TERMUX_PREFIX/lib libsophia.so.2.2.0
ln -sfT libsophia.so.2.2.0 $TERMUX_PREFIX/lib/libsophia.so.2.2
ln -sfT libsophia.so.2.2.0 $TERMUX_PREFIX/lib/libsophia.so
}

View File

@ -0,0 +1,12 @@
--- a/makefile
+++ b/makefile
@@ -45,9 +45,6 @@
@$(CC) sophia.o $(SOPHIA_LDFLAGS) -o libsophia.so.2.2.0
@ln -sf libsophia.so.2.2.0 libsophia.so.2.2
@ln -sf libsophia.so.2.2.0 libsophia.so
-ifeq ($(shell uname), Linux)
- @strip --strip-unneeded libsophia.so.2.2.0
-endif
ifeq ($(shell uname), Darwin)
@strip -u -r -x libsophia.so.2.2.0
endif

View File

@ -0,0 +1,11 @@
--- a/sophia/std/ss_stdvfs.c
+++ b/sophia/std/ss_stdvfs.c
@@ -89,7 +89,7 @@
ss_stdvfs_sync_file_range(ssvfs *f ssunused, int fd, uint64_t off, uint64_t size)
{
int rc;
-#ifdef __linux__
+#if defined __linux__ && (!defined __ANDROID__ || __ANDROID_API__ >= 26)
rc = sync_file_range(fd, off, size,
SYNC_FILE_RANGE_WRITE|
SYNC_FILE_RANGE_WAIT_AFTER);