From 7eadf9746d3cb7859ed9d103e83ed3a5bce2321a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 21 Jan 2020 13:07:08 +0100 Subject: [PATCH 1/3] Add missing runtime dependency and add fix for lldb -P usage --- debian/changelog | 7 +++++++ debian/control | 2 +- debian/patches/print-lldb-path.patch | 22 ++++++++++++++++++++++ debian/patches/series | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 debian/patches/print-lldb-path.patch diff --git a/debian/changelog b/debian/changelog index ac273ebe..7d4c1f80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-9 (1:9.0.1-7) UNRELEASED; urgency=medium + + * Add dependency on libclang-cpp-9 from llvm-9-dev (Closes: #946761) + * fix lldb-9 -P path print (Closes: #945445) + + -- Gianfranco Costamagna Tue, 21 Jan 2020 13:05:06 +0100 + llvm-toolchain-9 (1:9.0.1-6) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index ab885fd1..c99bb96e 100644 --- a/debian/control +++ b/debian/control @@ -327,7 +327,7 @@ Package: llvm-9-dev Architecture: any Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-9 (= ${binary:Version}), libllvm9 (= ${binary:Version}), libtinfo-dev, - llvm-9-tools (= ${binary:Version}), libz3-dev + llvm-9-tools (= ${binary:Version}), libclang-cpp9 (= ${binary:Version}), libz3-dev Description: Modular compiler and toolchain technologies, libraries and headers LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other diff --git a/debian/patches/print-lldb-path.patch b/debian/patches/print-lldb-path.patch new file mode 100644 index 00000000..f9bf22ff --- /dev/null +++ b/debian/patches/print-lldb-path.patch @@ -0,0 +1,22 @@ +Author: Gianfranco Costamagna +Last-Update: 2020-01-21 + +Index: llvm-toolchain-9-9.0.1/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +=================================================================== +--- llvm-toolchain-9-9.0.1.orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp ++++ llvm-toolchain-9-9.0.1/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +@@ -336,10 +336,11 @@ + llvm::sys::path::remove_filename(path, style); + llvm::sys::path::append(path, style, LLDB_PYTHON_RELATIVE_LIBDIR); + #else ++ llvm::sys::path::remove_filename(path, style); + llvm::sys::path::append(path, style, +- "python" + llvm::Twine(PY_MAJOR_VERSION) + "." + +- llvm::Twine(PY_MINOR_VERSION), +- "site-packages"); ++ "python3"/* + llvm::Twine(PY_MAJOR_VERSION) + "." + ++ llvm::Twine(PY_MINOR_VERSION)*/, ++ "dist-packages"); + #endif + } + diff --git a/debian/patches/series b/debian/patches/series index a22aeb16..288ba2b2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -140,3 +140,4 @@ no-z3.patch # bug #946874 D71028-mips-rust-test.diff python3-shebang.patch +print-lldb-path.patch From 29d4a3685b2e8e226d47782cc44bb35d47b8ec1e Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 09:18:21 +0100 Subject: [PATCH 2/3] Fix link for python3-lldb package --- debian/python3-lldb-X.Y.links.in | 4 ++++ debian/rules | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 debian/python3-lldb-X.Y.links.in diff --git a/debian/python3-lldb-X.Y.links.in b/debian/python3-lldb-X.Y.links.in new file mode 100644 index 00000000..2639ac09 --- /dev/null +++ b/debian/python3-lldb-X.Y.links.in @@ -0,0 +1,4 @@ +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python3/dist-packages/lldb/libLLVM-@LLVM_VERSION_FULL@.so.1 +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python3/dist-packages/lldb/libLLVM-@LLVM_VERSION@.so.1 +usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python3/dist-packages/lldb/_lldb.so +usr/lib/llvm-@LLVM_VERSION@/lib/python3/dist-packages/lldb/ usr/lib/python3/dist-packages/lldb diff --git a/debian/rules b/debian/rules index de0f27d4..1dd61933 100755 --- a/debian/rules +++ b/debian/rules @@ -588,7 +588,8 @@ endif cp $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/README.txt $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/share/README.txt # idem for the lldb python binding - mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3/dist-packages/lldb/ + mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3/dist-packages/ + mv $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3.*/site-packages/* $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3/dist-packages/ # Remove things that CMake install but which aren't packaged yet, # or are packaged from the source or build tree. From adb537ded67525b6e35a5dc4ae838cc99a30c6a9 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 09:18:37 +0100 Subject: [PATCH 3/3] Update changelog, upload to unstable --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7d4c1f80..6f42750c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ -llvm-toolchain-9 (1:9.0.1-7) UNRELEASED; urgency=medium +llvm-toolchain-9 (1:9.0.1-7) unstable; urgency=medium * Add dependency on libclang-cpp-9 from llvm-9-dev (Closes: #946761) * fix lldb-9 -P path print (Closes: #945445) + * Fix lldb python installation path and symlinks -- Gianfranco Costamagna Tue, 21 Jan 2020 13:05:06 +0100