feat(helix): enable auto-update and update to 23.03

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This commit is contained in:
Aditya Alok 2022-03-31 14:51:34 +05:30
parent 4342d49757
commit 16351779da
No known key found for this signature in database
GPG Key ID: 5A52117417798AC7
3 changed files with 19 additions and 31 deletions

View File

@ -1,17 +1,16 @@
TERMUX_PKG_HOMEPAGE="https://helix-editor.com/" TERMUX_PKG_HOMEPAGE="https://helix-editor.com/"
TERMUX_PKG_DESCRIPTION="A post-modern modal text editor written in rust" TERMUX_PKG_DESCRIPTION="A post-modern modal text editor written in rust"
TERMUX_PKG_LICENSE="MPL-2.0" TERMUX_PKG_LICENSE="MPL-2.0"
TERMUX_PKG_MAINTAINER="MrAdityaAlok <dev.aditya.alok@gmail.com>" TERMUX_PKG_MAINTAINER="Aditya Alok <dev.aditya.alok@gmail.com>"
TERMUX_PKG_VERSION=0.6.0 TERMUX_PKG_VERSION="22.03"
TERMUX_PKG_SRCURL="https://github.com/helix-editor/helix.git" TERMUX_PKG_SRCURL="https://github.com/helix-editor/helix.git"
TERMUX_PKG_GIT_BRANCH="v$TERMUX_PKG_VERSION" TERMUX_PKG_GIT_BRANCH="$TERMUX_PKG_VERSION"
TERMUX_PKG_BUILD_IN_SRC=true TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true
termux_step_make_install() { termux_step_make_install() {
termux_setup_rust termux_setup_rust
sed -i "s%\@TERMUX_CC\@%${CC}%g" ./helix-syntax/build.rs
cargo build --jobs "${TERMUX_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release cargo build --jobs "${TERMUX_MAKE_PROCESSES}" --target "${CARGO_TARGET_NAME}" --release
cat >"hx" <<-EOF cat >"hx" <<-EOF
@ -21,9 +20,10 @@ termux_step_make_install() {
exec ${TERMUX_PREFIX}/lib/helix/hx "\$@" exec ${TERMUX_PREFIX}/lib/helix/hx "\$@"
EOF EOF
install -Dm744 ./hx "${TERMUX_PREFIX}/bin/hx" install -Dm744 ./hx "${TERMUX_PREFIX}/bin/hx"
install -Dm744 -t "${TERMUX_PREFIX}"/lib/helix target/"${CARGO_TARGET_NAME}"/release/hx install -Dm744 -t "${TERMUX_PREFIX}"/lib/helix target/"${CARGO_TARGET_NAME}"/release/hx
install -Dm644 -t "${TERMUX_PREFIX}"/lib/helix languages.toml
cp -r runtime "${TERMUX_PREFIX}/lib/helix" install -Dm644 -t "${TERMUX_PREFIX}"/lib/helix/runtime ./runtime/tutor.txt
cp -r ./runtime/{queries,themes} "${TERMUX_PREFIX}"/lib/helix/runtime
find ./runtime/grammars -maxdepth 1 -type f -name "*.so" \
-exec install -Dm744 -t "${TERMUX_PREFIX}"/lib/helix/runtime/grammars {} \;
} }

View File

@ -0,0 +1,11 @@
--- a/helix-loader/src/grammar.rs 2022-03-31 12:52:29.105571523 +0530
+++ b/helix-loader/src/grammar.rs 2022-03-31 13:06:19.215571207 +0530
@@ -319,6 +319,8 @@
} else {
command
.arg("-shared")
+ .arg("-L@TERMUX_PREFIX@/lib")
+ .arg("-Wl,-rpath=@TERMUX_PREFIX@/lib")
.arg("-fPIC")
.arg("-fno-exceptions")
.arg("-g")

View File

@ -1,23 +0,0 @@
--- helix/helix-syntax/build.rs 2021-08-19 21:14:05.097999871 +0530
+++ helix-patch/helix-syntax/build.rs 2021-08-19 23:43:08.417999841 +0530
@@ -67,7 +67,7 @@
let mut config = cc::Build::new();
config.cpp(true).opt_level(2).cargo_metadata(false);
let compiler = config.get_compiler();
- let mut command = Command::new(compiler.path());
+ let mut command = Command::new("@TERMUX_CC@");
command.current_dir(src_path);
for (key, value) in compiler.env() {
command.env(key, value);
@@ -89,6 +89,11 @@
} else {
command
.arg("-shared")
+ .arg("-L@TERMUX_PREFIX/lib")
+ .arg("-Wl,-rpath=@TERMUX_PREFIX@/lib")
+ .arg("-lc++")
+ .arg("-lm")
+ .arg("-lc++_shared")
.arg("-fPIC")
.arg("-fno-exceptions")
.arg("-g")