enhance(main/tree-sitter-markdown): use termux-tree-sitter build helper

This commit is contained in:
termux-pacman-bot
2026-02-03 15:49:36 +00:00
parent 612aa58250
commit 80ba1d6bb5
2 changed files with 14 additions and 28 deletions

View File

@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Markdown grammar for tree-sitter"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION="0.5.2"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=122be47d4a50ac75a4f6861a17c3c88144197e0949f5d83ca917f2382b37761b
TERMUX_PKG_AUTO_UPDATE=true
@@ -14,13 +15,20 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DALL_EXTENSIONS=ON
"
termux_step_pre_configure() {
termux_setup_nodejs
termux_step_configure() {
termux_setup_treesitter
}
termux_step_post_make_install() {
install -d "${TERMUX_PREFIX}"/lib/tree_sitter
ln -sf "${TERMUX_PREFIX}"/lib/libtree-sitter-markdown.so "${TERMUX_PREFIX}"/lib/tree_sitter/markdown.so
ln -sf "${TERMUX_PREFIX}"/lib/libtree-sitter-markdown-inline.so "${TERMUX_PREFIX}"/lib/tree_sitter/markdown_inline.so
termux_step_make() {
local parser
for parser in "markdown" "markdown-inline"; do
termux-tree-sitter build -s "tree-sitter-$parser/src"
done
}
termux_step_make_install() {
local parser
for parser in "markdown" "markdown-inline"; do
termux-tree-sitter install -s "tree-sitter-$parser/src"
done
}

View File

@@ -1,22 +0,0 @@
From 40e7ad7b1ae05a1ea1848cedfe8f3bd853f27ff2 Mon Sep 17 00:00:00 2001
From: Konstantin Podsvirov <konstantin@podsvirov.su>
Date: Sun, 11 Jan 2026 21:26:17 +0300
Subject: [PATCH] fix: cmake --install
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d8b4c1..561fdfb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ macro(add_parser name)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree-sitter-${name}.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-${name}.pc" @ONLY)
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree-sitter-${name}.h"
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree-sitter/tree-sitter-${name}.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-${name}.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")