From aad0ab5ba62579d226c71b400e293c1ec337c2d9 Mon Sep 17 00:00:00 2001 From: Kieran Coldron Date: Sun, 19 Aug 2018 18:58:43 +0100 Subject: [PATCH] kakoune --- packages/kakoune/build.sh | 8 ++++++++ packages/kakoune/src-cs-path-compat.patch | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 packages/kakoune/build.sh create mode 100644 packages/kakoune/src-cs-path-compat.patch diff --git a/packages/kakoune/build.sh b/packages/kakoune/build.sh new file mode 100644 index 000000000..466d0751a --- /dev/null +++ b/packages/kakoune/build.sh @@ -0,0 +1,8 @@ +TERMUX_PKG_HOMEPAGE=https://github.com/mawww/kakoune +TERMUX_PKG_DESCRIPTION="Code editor heavily inspired by Vim" +TERMUX_PKG_VERSION=2018.04.13 +TERMUX_PKG_SRCURL=https://github.com/mawww/kakoune/archive/v${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_SHA256=dfbaf87479ae30fd87426ae1b5f6cbe4382d6fe17b64a0c58d9475bf038e50dc +TERMUX_PKG_DEPENDS="ncurses" +TERMUX_PKG_BUILD_IN_SRC=yes +TERMUX_PKG_EXTRA_MAKE_ARGS=" -C src debug=no" diff --git a/packages/kakoune/src-cs-path-compat.patch b/packages/kakoune/src-cs-path-compat.patch new file mode 100644 index 000000000..7edda88ae --- /dev/null +++ b/packages/kakoune/src-cs-path-compat.patch @@ -0,0 +1,15 @@ +diff --git a/src/shell_manager.cc b/src/shell_manager.cc +index b92edb4c..df025943 100644 +--- a/src/shell_manager.cc ++++ b/src/shell_manager.cc +@@ -30,9 +30,7 @@ ShellManager::ShellManager(ConstArrayView builtin_env_vars) + { + // Get a guaranteed to be POSIX shell binary + { +- auto size = confstr(_CS_PATH, nullptr, 0); +- String path; path.resize(size-1, 0); +- confstr(_CS_PATH, path.data(), size); ++ String path = "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets:."; + for (auto dir : StringView{path} | split(':')) + { + String candidate = format("{}/sh", dir);