diff --git a/debian/changelog b/debian/changelog index d3cb65ca..005ff50f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,10 @@ llvm-toolchain-14 (1:14.0.4-4) UNRELEASED; urgency=medium [ John Paul Adrian Glaubitz ] * Disable compiler-rt built-ins on x32 - -- John Paul Adrian Glaubitz Wed, 01 Jun 2022 07:34:47 +0200 + [ Sylvestre Ledru ] + * Only install grpc files libclang-X.Y-dev when grpc built + + -- Sylvestre Ledru Fri, 03 Jun 2022 10:52:10 +0200 llvm-toolchain-14 (1:14.0.4-3) unstable; urgency=medium diff --git a/debian/libclang-X.Y-dev.install.in b/debian/libclang-X.Y-dev.install.in index 315393ba..518e1685 100644 --- a/debian/libclang-X.Y-dev.install.in +++ b/debian/libclang-X.Y-dev.install.in @@ -9,6 +9,6 @@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@*.so usr/lib/llvm-@LLVM_VERSION@/lib/libfindAllSymbols.a # clangd grpc architectures -[amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdRemoteIndexProto.a -[amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdRemoteIndexServiceProto.a -[amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdMonitoringServiceProto.a +#grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdRemoteIndexProto.a +#grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdRemoteIndexServiceProto.a +#grpc [amd64 arm64 armel armhf mips64el mipsel ppc64 ppc64el powerpc riscv64 s390x] usr/lib/llvm-@LLVM_VERSION@/lib/libclangdMonitoringServiceProto.a diff --git a/debian/rules b/debian/rules index fdfd4f66..e70298d5 100755 --- a/debian/rules +++ b/debian/rules @@ -126,10 +126,12 @@ STAGE_2_CMAKE_EXTRA += -DCLANG_SYSTEMZ_DEFAULT_ARCH=$(ZARCH) # clangd remote index support requires GRPC & protobuf. # Enable if minimum tested versions are available. +CLANGD_GRPC_INSTALLED=no ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libgrpc++-dev) gt 1.30.0; echo $$?),0) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' protobuf-compiler-grpc) gt 1.30.0; echo $$?),0) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' libprotobuf-dev) gt 3.12.0; echo $$?),0) ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' protobuf-compiler) gt 3.12.0; echo $$?),0) +CLANGD_GRPC_INSTALLED=yes STAGE_2_CMAKE_EXTRA += -DCLANGD_ENABLE_REMOTE=ON endif endif @@ -483,6 +485,11 @@ preconfigure: echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ fi + # Conditionally enable install clangd grpc files + if test "$(CLANGD_GRPC_INSTALLED)" = "yes"; then \ + sed -i -e "s|#grpc\ ||g" debian/debian/libclang-$(LLVM_VERSION)-dev.install; \ + fi + # Override this two targets. They are trying to manage the .in conversion for me override_dh_ocamlinit: override_dh_ocamlclean: