commit:     997e987d305a10eca8bfb8f94932cac880b78574
Author:     idealseal <realidealseal <AT> protonmail <DOT> com>
AuthorDate: Sun Mar  1 11:17:27 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar  1 18:40:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=997e987d

llvm-core/lldb: fix automagic dependency on tree-sitter

In 
https://github.com/llvm/llvm-project/commit/f03ff95ce20f282db22b40997ee1daa01c01e581
support for tree-sitter based source highlighting was introduced which
gets automatically enabled if the tree-sitter library is found at build
time.

Signed-off-by: idealseal <realidealseal <AT> protonmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/185
Merges: https://codeberg.org/gentoo/gentoo/pulls/185
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 llvm-core/lldb/lldb-23.0.0.9999.ebuild        | 4 +++-
 llvm-core/lldb/lldb-23.0.0_pre20260223.ebuild | 4 +++-
 llvm-core/lldb/metadata.xml                   | 3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/llvm-core/lldb/lldb-23.0.0.9999.ebuild 
b/llvm-core/lldb/lldb-23.0.0.9999.ebuild
index 9a454e97f109..03876179dd2a 100644
--- a/llvm-core/lldb/lldb-23.0.0.9999.ebuild
+++ b/llvm-core/lldb/lldb-23.0.0.9999.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/";
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0/${LLVM_SOABI}"
-IUSE="+debug debuginfod +libedit lzma ncurses +python test +xml"
+IUSE="+debug debuginfod +libedit lzma ncurses +python test +tree-sitter +xml"
 RESTRICT="test"
 REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
@@ -23,6 +23,7 @@ DEPEND="
        libedit? ( dev-libs/libedit:0= )
        lzma? ( app-arch/xz-utils:= )
        ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+       tree-sitter? ( dev-libs/tree-sitter:= )
        xml? ( dev-libs/libxml2:= )
        ~llvm-core/clang-${PV}
        ~llvm-core/llvm-${PV}[debuginfod=]
@@ -70,6 +71,7 @@ src_configure() {
                -DLLDB_ENABLE_LZMA=$(usex lzma)
                -DLLDB_ENABLE_LIBXML2=$(usex xml)
                -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+               -DLLVM_ENABLE_TREESITTER=$(usex tree-sitter)
 
                -DLLDB_INCLUDE_TESTS=$(usex test)
 

diff --git a/llvm-core/lldb/lldb-23.0.0_pre20260223.ebuild 
b/llvm-core/lldb/lldb-23.0.0_pre20260223.ebuild
index 9a454e97f109..03876179dd2a 100644
--- a/llvm-core/lldb/lldb-23.0.0_pre20260223.ebuild
+++ b/llvm-core/lldb/lldb-23.0.0_pre20260223.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/";
 
 LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA"
 SLOT="0/${LLVM_SOABI}"
-IUSE="+debug debuginfod +libedit lzma ncurses +python test +xml"
+IUSE="+debug debuginfod +libedit lzma ncurses +python test +tree-sitter +xml"
 RESTRICT="test"
 REQUIRED_USE=${PYTHON_REQUIRED_USE}
 
@@ -23,6 +23,7 @@ DEPEND="
        libedit? ( dev-libs/libedit:0= )
        lzma? ( app-arch/xz-utils:= )
        ncurses? ( >=sys-libs/ncurses-5.9-r3:0= )
+       tree-sitter? ( dev-libs/tree-sitter:= )
        xml? ( dev-libs/libxml2:= )
        ~llvm-core/clang-${PV}
        ~llvm-core/llvm-${PV}[debuginfod=]
@@ -70,6 +71,7 @@ src_configure() {
                -DLLDB_ENABLE_LZMA=$(usex lzma)
                -DLLDB_ENABLE_LIBXML2=$(usex xml)
                -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
+               -DLLVM_ENABLE_TREESITTER=$(usex tree-sitter)
 
                -DLLDB_INCLUDE_TESTS=$(usex test)
 

diff --git a/llvm-core/lldb/metadata.xml b/llvm-core/lldb/metadata.xml
index c00587fb6056..d070de5e7c23 100644
--- a/llvm-core/lldb/metadata.xml
+++ b/llvm-core/lldb/metadata.xml
@@ -13,5 +13,8 @@
                        and <pkg>dev-cpp/cpp-httplib</pkg>) to match
                        <pkg>llvm-core/llvm</pkg>.
                </flag>
+               <flag name="tree-sitter">
+                       Enable source highlighting through 
<pkg>dev-libs/tree-sitter</pkg>.
+               </flag>
        </use>
 </pkgmetadata>

Reply via email to