diff --git a/debian/patches/series b/debian/patches/series index fc005ac4..df956934 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -150,7 +150,3 @@ wasm-ld-path.diff python3-scan-build.py revert-update-doc.diff fix-typo.diff - -# libc++ patches from upstream (post version 14.0.0) -0001-libc-Add-workaround-to-avoid-breaking-users-of-span-.patch -0002-libc-Re-enable-workaround-for-pre-ranges-CTAD-in-std.patch diff --git a/debian/rules b/debian/rules index 14c30427..5dd7144a 100755 --- a/debian/rules +++ b/debian/rules @@ -494,6 +494,13 @@ override_dh_auto_configure: preconfigure if test "$(SCAN_BUILD)" = "yes"; then \ patch -f -p1 < debian/patches/on-the-fly/use-scan-build-runtimes.diff||true; \ fi +# Don't apply these patches when building for apt.llvm.org + if test "$(LLVM_VERSION)" = "14"; then \ + if echo $(LLVM_VERSION_SNAPSHOT)|grep -v "~exp"; then \ + patch -f -p1 < debian/patches/0001-libc-Add-workaround-to-avoid-breaking-users-of-span-.patch||true; \ + patch -f -p1 < debian/patches/0002-libc-Re-enable-workaround-for-pre-ranges-CTAD-in-std.patch||true; \ + fi; \ + fi # Configure coverity (we need the compilers) + work around perf issues -(if test $(COVERITY_ENABLE) -eq 1; then \ @@ -1095,6 +1102,13 @@ override_dh_auto_clean: if test "$(SCAN_BUILD)" = "yes"; then \ patch -f -R -p1 < debian/patches/on-the-fly/use-scan-build-runtimes.diff||true; \ fi +# Don't apply these patches when building for apt.llvm.org + if test "$(LLVM_VERSION)" = "14"; then \ + if echo $(LLVM_VERSION_SNAPSHOT)|grep -v "~exp"; then \ + patch -f -p1 < debian/patches/0001-libc-Add-workaround-to-avoid-breaking-users-of-span-.patch||true; \ + patch -f -p1 < debian/patches/0002-libc-Re-enable-workaround-for-pre-ranges-CTAD-in-std.patch||true; \ + fi; \ + fi : # for some reason, the docs are written to debian/usr and debian/man ... rm -rf debian/usr debian/man