Source: qt6-quick3d
Version: 6.3.1-3
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

qt6-quick3d fails to cross build from source. The immediate issue is a
lack of QT_HOST_PATH. Beyond that, it also needs its own native tools
during build. That amounts to a self-dependency and setting
QT_HOST_PATH_CMAKE_DIR. Finally, we need to ask for building those tools
during cross builds. I'm attaching a patch for your convenience.

Helmut
diff --minimal -Nru qt6-quick3d-6.3.1/debian/changelog 
qt6-quick3d-6.3.1/debian/changelog
--- qt6-quick3d-6.3.1/debian/changelog  2022-08-17 00:29:11.000000000 +0200
+++ qt6-quick3d-6.3.1/debian/changelog  2022-10-30 21:20:33.000000000 +0100
@@ -1,3 +1,13 @@
+qt6-quick3d (6.3.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Pass QT_HOST_PATH*.
+    + Depend on ourselves when cross compiling.
+    + Do build tools when cross compiling.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 30 Oct 2022 21:20:33 +0100
+
 qt6-quick3d (6.3.1-3) unstable; urgency=medium
 
   [ Patrick Franz ]
diff --minimal -Nru qt6-quick3d-6.3.1/debian/control 
qt6-quick3d-6.3.1/debian/control
--- qt6-quick3d-6.3.1/debian/control    2022-08-15 18:52:08.000000000 +0200
+++ qt6-quick3d-6.3.1/debian/control    2022-10-30 21:20:33.000000000 +0100
@@ -20,6 +20,7 @@
                qt6-base-private-dev (>= 6.3.1+dfsg~),
                qt6-declarative-dev (>= 6.3.1+dfsg~),
                qt6-declarative-private-dev (>= 6.3.1+dfsg~),
+               qt6-quick3d-dev:native <cross>,
                zlib1g-dev,
 Standards-Version: 4.6.1
 Homepage: https://www.qt.io/developers/
diff --minimal -Nru qt6-quick3d-6.3.1/debian/rules 
qt6-quick3d-6.3.1/debian/rules
--- qt6-quick3d-6.3.1/debian/rules      2022-01-03 06:40:27.000000000 +0100
+++ qt6-quick3d-6.3.1/debian/rules      2022-10-30 21:20:33.000000000 +0100
@@ -6,12 +6,22 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+cmake_extra_args :=
+
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+cmake_extra_args += \
+       -DQT_HOST_PATH=/usr \
+       -DQT_HOST_PATH_CMAKE_DIR=/usr/lib/$(DEB_BUILD_MULTIARCH)/cmake \
+       -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON
+endif
+
 %:
        dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 
 override_dh_auto_configure:
        dh_auto_configure -- \
-               -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
+               -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
+               $(cmake_extra_args)
 
 execute_after_dh_auto_install:
        # Reproducible builds: remove build paths from .prl files

Reply via email to