From 301545ec24fa0d0c9d1504e8b83c98c9bd227b3d Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 18 Nov 2018 00:52:56 +0100 Subject: [PATCH] vifm: Update from 0.9.1 to 0.10 --- packages/vifm/build.sh | 5 ++- packages/vifm/pthread.c.patch | 11 ------ packages/vifm/pthread.h.patch | 11 ------ packages/vifm/src-Makefile.am.patch | 10 ++--- packages/vifm/src-registers.c.patch | 21 ++++++++++ packages/vifm/src-utils-shmem_nix.c.patch | 47 +++++++++++++++++++++++ 6 files changed, 76 insertions(+), 29 deletions(-) delete mode 100644 packages/vifm/pthread.c.patch delete mode 100644 packages/vifm/pthread.h.patch create mode 100644 packages/vifm/src-registers.c.patch create mode 100644 packages/vifm/src-utils-shmem_nix.c.patch diff --git a/packages/vifm/build.sh b/packages/vifm/build.sh index 35e1fb1fe..4ba51a7dc 100644 --- a/packages/vifm/build.sh +++ b/packages/vifm/build.sh @@ -1,7 +1,8 @@ TERMUX_PKG_HOMEPAGE=https://vifm.info/ TERMUX_PKG_DESCRIPTION="File manager with vi like keybindings" -TERMUX_PKG_VERSION=0.9.1 -TERMUX_PKG_SHA256=f208cdcd912348df8e18214078ab2455831d05190078ab5af507bd9789ea8b04 +TERMUX_PKG_API_LEVEL=24 +TERMUX_PKG_VERSION=0.10 +TERMUX_PKG_SHA256=e5681c9e560e23d9deeec3b5b12e0ccad82612d9592c00407f3dd75cf5066548 TERMUX_PKG_SRCURL=https://github.com/vifm/vifm/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_DEPENDS="ncurses, file" diff --git a/packages/vifm/pthread.c.patch b/packages/vifm/pthread.c.patch deleted file mode 100644 index a34b40759..000000000 --- a/packages/vifm/pthread.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../cache/vifm-0.9/src/compat/pthread.c 2017-06-18 14:31:25.000000000 +0000 -+++ ./src/compat/pthread.c 2017-10-03 23:43:21.948484280 +0000 -@@ -18,7 +18,7 @@ - - #include "pthread.h" - --#ifdef __APPLE__ -+#ifdef __ANDROID__ - - #include /* assert() */ - #include /* EBUSY */ diff --git a/packages/vifm/pthread.h.patch b/packages/vifm/pthread.h.patch deleted file mode 100644 index 284edfe17..000000000 --- a/packages/vifm/pthread.h.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ../cache/vifm-0.9/src/compat/pthread.h 2017-06-18 14:31:25.000000000 +0000 -+++ ./src/compat/pthread.h 2017-10-03 23:46:10.528479414 +0000 -@@ -21,7 +21,7 @@ - - #include - --#ifdef __APPLE__ -+#ifdef __ANDROID__ - - typedef int pthread_spinlock_t; - diff --git a/packages/vifm/src-Makefile.am.patch b/packages/vifm/src-Makefile.am.patch index 9adbac7d5..14b6ff372 100644 --- a/packages/vifm/src-Makefile.am.patch +++ b/packages/vifm/src-Makefile.am.patch @@ -1,10 +1,10 @@ -diff -u -r ../vifm-0.9/src/Makefile.am ./src/Makefile.am ---- ../vifm-0.9/src/Makefile.am 2017-06-18 16:31:25.000000000 +0200 -+++ ./src/Makefile.am 2017-10-14 20:50:11.327453189 +0200 -@@ -42,7 +42,6 @@ - +diff -u -r ../vifm-0.10/src/Makefile.am ./src/Makefile.am +--- ../vifm-0.10/src/Makefile.am 2018-11-11 15:20:19.000000000 +0000 ++++ ./src/Makefile.am 2018-11-17 22:25:26.020268352 +0000 +@@ -43,7 +43,6 @@ dist_pkgdata_DATA = ../data/vifmrc \ ../data/vifmrc-osx + dist_pkgdata_SCRIPTS = ../data/vifm-media -nodist_pkgdata_DATA = ../data/vifm-help.txt bin_PROGRAMS = vifm diff --git a/packages/vifm/src-registers.c.patch b/packages/vifm/src-registers.c.patch new file mode 100644 index 000000000..ddf15122a --- /dev/null +++ b/packages/vifm/src-registers.c.patch @@ -0,0 +1,21 @@ +diff -u -r ../vifm-0.10/src/registers.c ./src/registers.c +--- ../vifm-0.10/src/registers.c 2018-11-11 15:20:19.000000000 +0000 ++++ ./src/registers.c 2018-11-17 21:30:58.649771651 +0000 +@@ -109,7 +109,7 @@ + * not constant here only to allow enalbing a test mode with smaller values to + * test corner cases. + */ +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) + /* + * On Linux a mmap call can map more bytes than the size of the underlying + * object. Thus the area mapped can be 128 MiB (very large) and the memory +@@ -829,7 +829,7 @@ + regs_sync_enable_test_mode(void) + { + debug_print_to_stdout = 1; +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) + shared_mmap_bytes = 1024 * 32; + shared_initial = 1024 * 4; /* still larger than metadata size */ + #else diff --git a/packages/vifm/src-utils-shmem_nix.c.patch b/packages/vifm/src-utils-shmem_nix.c.patch new file mode 100644 index 000000000..6c8768eaf --- /dev/null +++ b/packages/vifm/src-utils-shmem_nix.c.patch @@ -0,0 +1,47 @@ +diff -u -r ../vifm-0.10/src/utils/shmem_nix.c ./src/utils/shmem_nix.c +--- ../vifm-0.10/src/utils/shmem_nix.c 2018-11-11 15:20:19.000000000 +0000 ++++ ./src/utils/shmem_nix.c 2018-11-17 21:37:18.757403620 +0000 +@@ -41,6 +41,9 @@ + shmem_t * + shmem_create(const char name[], size_t initial_size, size_t max_size) + { ++#ifdef __ANDROID__ ++ return NULL; ++#else + int error_other; + int error_excl_already_exists; + int error_normal_does_not_exist; +@@ -135,21 +138,25 @@ + } + + return shmem; ++#endif + } + + void + shmem_destroy(shmem_t *shmem) + { ++#ifndef __ANDROID__ + if(shmem != NULL) + { + shm_unlink(shmem->name); + shmem_free(shmem); + } ++#endif + } + + void + shmem_free(shmem_t *shmem) + { ++#ifndef __ANDROID__ + if(shmem == NULL) + { + return; +@@ -163,6 +170,7 @@ + close(shmem->fd); + free(shmem->name); + free(shmem); ++#endif + } + + int