Source: libayatana-common
Version: 0.9.11-2
Tags: patch
User: [email protected]
Usertags: ftcbfs
Control: clone -1 -2
Control: retitle -2 cmake-extras: does not forward CMAKE_C_COMPILER and 
CMAKE_C_FLAGS to the external GMock build
Control: reassign -2 cmake-extras
Control: affects -2 + src:libayatana-common
Control: affects 1029269 + srclibayatana-common

libayatana-common fails to cross build from source in the tests/
directory. The failure is architecture-dependent, but why is it building
tests in the first place when I pass DEB_BUILD_OPTIONS=nocheck? I
figured an unconditional -DENABLE_TESTS=ON. Once allowing that to be
OFF, the failures disappear and the cross build succeeds. Please
consider applying the attached patch.

Another way to look at this is arguing that tests also should be cross
buildable. At that point, we're revisiting
https://gitlab.com/ubports/development/core/cmake-extras/-/merge_requests/4
and add CMAKE_C_COMPILER as well as CMAKE_C_FLAGS. We also figure that
the wrong glib-compile-schemas is being used. That's known as #1029269.

So let's not run into those problems and disable tests when they're
requested to be disabled.

Helmut
diff -Nru libayatana-common-0.9.11/debian/changelog 
libayatana-common-0.9.11/debian/changelog
--- libayatana-common-0.9.11/debian/changelog   2025-03-16 12:11:02.000000000 
+0100
+++ libayatana-common-0.9.11/debian/changelog   2025-12-02 20:05:03.000000000 
+0100
@@ -1,3 +1,10 @@
+libayatana-common (0.9.11-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Improve nocheck support. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Tue, 02 Dec 2025 20:05:03 +0100
+
 libayatana-common (0.9.11-2) unstable; urgency=medium
 
   * Re-upload source-only as is.
diff -Nru libayatana-common-0.9.11/debian/rules 
libayatana-common-0.9.11/debian/rules
--- libayatana-common-0.9.11/debian/rules       2024-08-14 17:35:13.000000000 
+0200
+++ libayatana-common-0.9.11/debian/rules       2025-12-02 20:04:54.000000000 
+0100
@@ -7,7 +7,7 @@
 include /usr/share/dpkg/buildflags.mk
 
 DEB_CMAKE_EXTRA_FLAGS = \
-    -DENABLE_TESTS=ON \
+    -DENABLE_TESTS=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS) 
$(DEB_BUILD_PROFILES)),OFF,ON) \
     -DENABLE_COVERAGE=OFF \
     -DCMAKE_INSTALL_PREFIX=/usr \
     -DENABLE_LOMIRI_FEATURES=ON \

Reply via email to