Files
termux-packages/x11-packages/codelldb/lldb-paths.patch
termux-pacman-bot d610e90ed7 addpkg(x11/codelldb): split from vsix-package-codelldb
- Originally, in https://github.com/termux/termux-packages/pull/24716, I implemented only the `.vsix` package because that is what is required for using codelldb with `code-oss`, which is the only way that I personally use it. However, I did not realize at the time that it was possible to use codelldb with **non-VSCode-based editors**, and that people who use it outside of any VSCode-based editor **need to directly execute the binary**, making it important for that binary to be available in `$TERMUX_PREFIX/bin`.

- **This PR implements the following three commands that do _not_ currently work/exist in Termux**:
  - `pkg install codelldb`
  - `codelldb`
  - `python -c "import codelldb"`

- This heavily patches and organizes the package in such a way that the needs of @BenVella, the user of codelldb in Termux, are better met - for their case, using codelldb inside NeoVIM: https://github.com/vadimcn/codelldb/discussions/1278#discussioncomment-14059990

- All of the the preexisting functionality of both the `vsix-package-codelldb` package and the `code-oss-extension-codelldb` package should remain working and available after this reorganization.

- Also, properly marks the subpackage as **not** platform-independent by inheritance of the property from its dependencies. For more information, see: https://github.com/termux/termux-packages/pull/25306
2025-08-13 18:44:03 +00:00

26 lines
1.1 KiB
Diff

Direct the extension to search for LLDB in $TERMUX_PREFIX/bin and $TERMUX_PREFIX/lib instead
of in the extension's own installation folder
--- a/extension/main.ts
+++ b/extension/main.ts
@@ -374,7 +374,7 @@ class Extension implements DebugConfigurationProvider, DebugAdapterDescriptorFac
if (liblldb) {
liblldb = await adapter.findLibLLDB(liblldb)
} else {
- liblldb = await adapter.findLibLLDB(path.join(this.context.extensionPath, 'lldb'));
+ liblldb = await adapter.findLibLLDB('@TERMUX_PREFIX@');
}
this.adapterDylibsCache = [liblldb];
}
--- a/cargo_config.unix.toml
+++ b/cargo_config.unix.toml
@@ -10,6 +10,6 @@ CXX_${LLVM_TRIPLE} = "${CMAKE_CXX_COMPILER}"
CFLAGS_${LLVM_TRIPLE} = "${CMAKE_C_FLAGS}"
CXXFLAGS_${LLVM_TRIPLE} = "${CMAKE_CXX_FLAGS}"
-LLDB_INCLUDE = "${LLDB_INCLUDE}"
-LLDB_DYLIB = "${CMAKE_BINARY_DIR}/lldb/lib/liblldb${DylibSuffix}"
+LLDB_INCLUDE = "@TERMUX_PREFIX@/include"
+LLDB_DYLIB = "@TERMUX_PREFIX@/lib/liblldb.so"
ADAPTER_SOURCE_DIR = "${CMAKE_SOURCE_DIR}/adapter"