Only install grpc files libclang-X.Y-dev when grpc built

This commit is contained in:
Sylvestre Ledru 2022-06-03 10:54:53 +02:00
parent a142ae4302
commit 922aee77b8
3 changed files with 14 additions and 4 deletions

5
debian/changelog vendored
View File

@ -3,7 +3,10 @@ llvm-toolchain-14 (1:14.0.4-4) UNRELEASED; urgency=medium
[ John Paul Adrian Glaubitz ] [ John Paul Adrian Glaubitz ]
* Disable compiler-rt built-ins on x32 * Disable compiler-rt built-ins on x32
-- John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Wed, 01 Jun 2022 07:34:47 +0200 [ Sylvestre Ledru ]
* Only install grpc files libclang-X.Y-dev when grpc built
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 03 Jun 2022 10:52:10 +0200
llvm-toolchain-14 (1:14.0.4-3) unstable; urgency=medium llvm-toolchain-14 (1:14.0.4-3) unstable; urgency=medium

View File

@ -9,6 +9,6 @@ usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@*.so
usr/lib/llvm-@LLVM_VERSION@/lib/libfindAllSymbols.a usr/lib/llvm-@LLVM_VERSION@/lib/libfindAllSymbols.a
# clangd grpc architectures # clangd grpc architectures
[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/libclangdRemoteIndexProto.a
[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/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/libclangdMonitoringServiceProto.a

7
debian/rules vendored
View File

@ -126,10 +126,12 @@ STAGE_2_CMAKE_EXTRA += -DCLANG_SYSTEMZ_DEFAULT_ARCH=$(ZARCH)
# clangd remote index support requires GRPC & protobuf. # clangd remote index support requires GRPC & protobuf.
# Enable if minimum tested versions are available. # 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}' 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}' 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}' 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) 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 STAGE_2_CMAKE_EXTRA += -DCLANGD_ENABLE_REMOTE=ON
endif endif
endif endif
@ -483,6 +485,11 @@ preconfigure:
echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \ echo "" > debian/python3-lldb-$(LLVM_VERSION).install; \
fi 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 this two targets. They are trying to manage the .in conversion for me
override_dh_ocamlinit: override_dh_ocamlinit:
override_dh_ocamlclean: override_dh_ocamlclean: