[neon/qt6/qt6-base/Neon/release] debian: align to debian

Carlos De Maine null at kde.org
Sun Oct 22 06:41:15 BST 2023


Git commit 43b9967e08a193ed5555ad283531e834336cc59a by Carlos De Maine.
Committed on 22/10/2023 at 07:41.
Pushed by carlosdem into branch 'Neon/release'.

align to debian

M  +7    -7    debian/control
M  +39   -3    debian/rules

https://invent.kde.org/neon/qt6/qt6-base/-/commit/43b9967e08a193ed5555ad283531e834336cc59a

diff --git a/debian/control b/debian/control
index 3abbd1d..66a87b0 100644
--- a/debian/control
+++ b/debian/control
@@ -288,33 +288,33 @@ Depends: qt6-base
 Description: Dummy transitional
  Transitional dummy package.
 
-Package: qmake6-bin
+Package: qmake6
 Architecture: all
 Depends: qt6-base
 Description: Dummy transitional
  Transitional dummy package.
 
-Package: qmake6
+Package: qmake6-bin
 Architecture: all
 Depends: qt6-base
 Description: Dummy transitional
  Transitional dummy package.
 
-Package: qt6-base-doc-html
+Package: qt6-base-doc
 Architecture: all
 Depends: qt6-base
 Description: Dummy transitional
  Transitional dummy package.
 
-Package: qt6-base-doc
+Package: qt6-base-doc-dev
 Architecture: all
-Depends: qt6-base
+Depends: qt6-base-dev
 Description: Dummy transitional
  Transitional dummy package.
 
-Package: qt6-base-dev
+Package: qt6-base-doc-html
 Architecture: all
-Depends: qt6-base-dev
+Depends: qt6-base
 Description: Dummy transitional
  Transitional dummy package.
 
diff --git a/debian/rules b/debian/rules
index 3436dfd..a184f55 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,10 +4,14 @@
 # Use already defined DEB_HOST_* variables.
 include /usr/share/dpkg/architecture.mk
 
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
 sslpkgname := $(shell dpkg-query --show '--showformat=$${Depends}' libssl-dev | cut -d ' ' -f1)
 
-extra_cmake_args += -DFEATURE_sql_ibase=ON
+ifneq (,$(filter libqt6sql6-ibase,$(shell dh_listpackages)))
+        extra_cmake_args += -DFEATURE_sql_ibase=ON
+else
+        extra_cmake_args += -DFEATURE_sql_ibase=OFF
+endif
 
 ifeq ($(DEB_HOST_ARCH_OS),linux)
         extra_cmake_args += -DFEATURE_sctp=ON
@@ -15,6 +19,14 @@ else
         extra_cmake_args += -DFEATURE_sctp=OFF
 endif
 
+# cross-builds
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+	extra_cmake_args += \
+		-DQT_HOST_PATH=/usr \
+		-DQT_HOST_PATH_CMAKE_DIR=/usr/lib/${DEB_BUILD_MULTIARCH}/cmake \
+		-DQT_FORCE_BUILD_TOOLS=ON
+endif
+
 %:
 	dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 
@@ -73,7 +85,11 @@ override_dh_auto_configure:
 		-DFEATURE_relocatable=OFF \
 		$(extra_cmake_args)
 
-execute_after_dh_auto_install:
+execute_after_dh_auto_install-arch:
+	# Policy ยง 10.4. Remove this if https://bugs.debian.org/904409 gets fixed.
+	sed -i 's,bin/env perl,bin/perl,' debian/tmp/usr/lib/qt6/libexec/*.pl \
+		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/mkspecs/features/data/unix/findclasslist.pl
+
 	# Reproducible builds: remove build paths from .prl files
 	sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libQt6*.prl
 
@@ -82,6 +98,26 @@ execute_after_dh_auto_install:
 	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/' debian/qt.conf.in \
 		> debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/qt6.conf
 
+	# Inject cross-wrapper for qmake6
+	mkdir -p debian/tmp/usr/bin
+	sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
+		-e 's/@DEB_HOST_GNU_TYPE@/$(DEB_HOST_GNU_TYPE)/g' \
+		< debian/qmake-cross-wrapper.in > debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6
+	chmod +x debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6
+
+	# Fix Qt6::qmake IMPORTED_LOCATION, see https://bugs.debian.org/1030980
+	sed -i 's,lib/qt6/bin/qmake,bin/$(DEB_HOST_GNU_TYPE)-qmake6,' \
+		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6CoreTools/Qt6CoreToolsTargets-none.cmake
+
+override_dh_auto_build-indep:
+	dh_auto_build -- docs
+
+override_dh_auto_install-indep:
+	DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs
+	# Remove build path from index files.
+	find $(CURDIR)/debian/tmp/usr/share/qt6/doc -type f -name *.index -exec \
+		sed -i 's@$(CURDIR)/@@g' {} \;
+
 override_dh_makeshlibs:
 	dh_makeshlibs -XlibQt6EglFSDeviceIntegration -XlibQt6EglFsKmsGbmSupport -XlibQt6EglFsKmsSupport -XlibQt6XcbQpa
 


More information about the Neon-commits mailing list