From 169a0a3e6cf9a1543eaa41e7d6cd90b47529525b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 6 Aug 2023 12:51:25 +0100 Subject: [PATCH] d/control.in: Only use libsysprof-capture-4-dev for shared library libsysprof-capture-4-dev is currently a virtual package provided by libsysprof-4-dev, which also includes GTK 4 GUI components and so depends on libgtk-4-dev. If the Architecture: amd64 build happens to finish before the Architecture: all build starts, then the Architecture: all build will fail with an unsatisfiable build-dependency: libsysprof-4-dev Depends on libgtk-4-dev, which Depends on libgtk-4-common (>= ${source:Version}), which hasn't been built yet. The result is that libgtk-4-common can't be built and the builds deadlock. We've been lucky enough to avoid this until now, but version 4.10.5+ds-1 was not sufficiently lucky and has become uninstallable and unbuildable. Because the sysprof integration is part of the architecture-specific library, we can break this cycle by only installing libsysprof-4-dev when we are building the architecture-specific library, and excluding it when we are only building architecture-independent documentation and common files. --- debian/control | 4 ++-- debian/control.in | 2 +- debian/rules | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/debian/control b/debian/control index eae4f6fa26..447a8ff6df 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: gtk4 Section: libs Priority: optional Maintainer: Debian GNOME Maintainers -Uploaders: Simon McVittie , +Uploaders: Simon McVittie , Jeremy Bícha , Marco Trevisan (Treviño) Build-Depends: adwaita-icon-theme , at-spi2-core , dbus-daemon , @@ -43,7 +43,6 @@ Build-Depends: adwaita-icon-theme , librsvg2-dev (>= 2.52.0) [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x powerpc ppc64 riscv64 sparc64 x32], libswresample-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x], libswscale-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x], - libsysprof-capture-4-dev (>= 3.40.1) [linux-any], libtiff-dev, libvulkan-dev [linux-any], libwayland-dev (>= 1.21.0) [linux-any], @@ -70,6 +69,7 @@ Build-Depends: adwaita-icon-theme , weston [linux-any] , xauth , xvfb , +Build-Depends-Arch: libsysprof-capture-4-dev (>= 3.40.1) [linux-any], Build-Depends-Indep: gi-docgen , libcairo2-doc , libglib2.0-doc , diff --git a/debian/control.in b/debian/control.in index aeceebc493..e638368298 100644 --- a/debian/control.in +++ b/debian/control.in @@ -43,7 +43,6 @@ Build-Depends: adwaita-icon-theme , librsvg2-dev (>= 2.52.0) [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x powerpc ppc64 riscv64 sparc64 x32], libswresample-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x], libswscale-dev [amd64 arm64 armel armhf i386 mips64el mipsel ppc64el s390x], - libsysprof-capture-4-dev (>= 3.40.1) [linux-any], libtiff-dev, libvulkan-dev [linux-any], libwayland-dev (>= 1.21.0) [linux-any], @@ -70,6 +69,7 @@ Build-Depends: adwaita-icon-theme , weston [linux-any] , xauth , xvfb , +Build-Depends-Arch: libsysprof-capture-4-dev (>= 3.40.1) [linux-any], Build-Depends-Indep: gi-docgen , libcairo2-doc , libglib2.0-doc , diff --git a/debian/rules b/debian/rules index 00410fdc06..a6c975c501 100755 --- a/debian/rules +++ b/debian/rules @@ -93,14 +93,24 @@ configure_flags_deb += -Dman-pages=false endif ifeq (linux,$(DEB_HOST_ARCH_OS)) -configure_flags_deb += -Dsysprof=enabled configure_flags_deb += -Dwayland-backend=true else -configure_flags_deb += -Dsysprof=disabled configure_flags_deb += -Dvulkan=disabled configure_flags_deb += -Dwayland-backend=false endif +# Only enable sysprof if we are actually going to package the shared library. +# Otherwise, if the Architecture: amd64 buildd happens to build gtk4 +# before the Architecture: all buildd, the Architecture: all buildd +# will find that there is an unsatisfiable build-dependency: +# libsysprof-4-dev => libgtk-4-dev => libgtk-4-common (>= ${source:Version}), +# which has not been built yet. +ifeq (linux/$(SHARED_PKG),$(DEB_HOST_ARCH_OS)/$(filter $(SHARED_PKG),$(built_binaries))) +configure_flags_deb += -Dsysprof=enabled +else +configure_flags_deb += -Dsysprof=disabled +endif + ifeq ($(filter %-doc,$(built_binaries)),) configure_flags_deb += -Dgtk_doc=false else -- 2.30.2