[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1025663: qmake6: how should users query for QT_INSTALL_PLUGINS?



Control: tags -1 + patch

On Mon, Dec 26, 2022 at 10:27:18AM -0300, Lisandro Damián Nicanor Pérez Meyer wrote:
> I would very much prefer (a). Now, as you said, timing is important
> here. Do we need a pass through NEW? If that's the case then that will
> need to happen after the next transition, if time allows it. If it can
> be easily added to the existing packaging without the need of NEW then
> we might add it right now.

No, (a) does not require going through NEW. There already is qmake6-bin.
qmake6 and qmake6-bin even have the needed Multi-Arch values already.

> Last time you did the packaging with DMitry, so I'm kind of lost here.

Dmitry also expressed being in favour of (a). Notably missing is a
response from Patrick.

In any case, I've attached a patch for it now. It is based on what we do
for qt5.

I caution though that selecting version 5 or 6 is kinda messed up. If
you run qmake6 or <triplet>-qmake6, it'll use qt6 as expected. If you
run plain qmake, it'll go through qtchooser and select the relevant
version via QT_SELECT. Howeve, <triplet>-qmake is presently owned by
qt5-qmake only and will bypass qtchoser without honouring QT_SELECT. If
we want "QT_SELECT=6 <triplet>-qmake" to run the cross qt6 qmake, we'll
also have to modify qtchooser and qt5-qmake.

Helmut
diff -Nru qt6-base-6.3.1+dfsg/debian/changelog qt6-base-6.3.1+dfsg/debian/changelog
--- qt6-base-6.3.1+dfsg/debian/changelog	2022-10-01 18:58:47.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/changelog	2022-12-26 22:56:51.000000000 +0100
@@ -1,3 +1,10 @@
+qt6-base (6.3.1+dfsg-10.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Install <triplet>-qmake6 cross wrapper. (Closes: #1025663)
+
+ -- Helmut Grohne <helmut@subdivi.de>  Mon, 26 Dec 2022 22:56:51 +0100
+
 qt6-base (6.3.1+dfsg-10) unstable; urgency=medium
 
   [ Lisandro Damián Nicanor Pérez Meyer ]
diff -Nru qt6-base-6.3.1+dfsg/debian/qmake-cross-wrapper.in qt6-base-6.3.1+dfsg/debian/qmake-cross-wrapper.in
--- qt6-base-6.3.1+dfsg/debian/qmake-cross-wrapper.in	1970-01-01 01:00:00.000000000 +0100
+++ qt6-base-6.3.1+dfsg/debian/qmake-cross-wrapper.in	2022-12-26 22:56:51.000000000 +0100
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+if [ "x$1" = x-qt6 ] || [ "x$1" = "x-qt=6" ] || [ "x$1" = "x-qt=qt6" ]; then
+	shift
+fi
+
+QMAKE_MODE=
+
+if [ "x$1" = x-query ]; then
+	exec /usr/lib/qt6/bin/qmake "$@" -qtconf /usr/lib/@DEB_HOST_MULTIARCH@/qt6/qt6.conf
+elif [ "x$1" = x-makefile ] || [ "x$1" = x-project ]; then
+	QMAKE_MODE="$1"
+	shift
+fi
+
+exec /usr/lib/qt6/bin/qmake6 \
+	$QMAKE_MODE \
+	-qtconf /usr/lib/@DEB_HOST_MULTIARCH@/qt6/qt6.conf \
+	-early \
+	QMAKE_CC=${CC:-@DEB_HOST_GNU_TYPE@-gcc} \
+	QMAKE_CXX=${CXX:-@DEB_HOST_GNU_TYPE@-g++} \
+	QMAKE_LINK=${CXX:-@DEB_HOST_GNU_TYPE@-g++} \
+	QMAKE_STRIP=${STRIP:-@DEB_HOST_GNU_TYPE@-strip} \
+	QMAKE_QMAKE=/usr/bin/@DEB_HOST_GNU_TYPE@-qmake6 \
+	PKG_CONFIG=@DEB_HOST_GNU_TYPE@-pkg-config \
+	-before \
+	"$@"
diff -Nru qt6-base-6.3.1+dfsg/debian/qmake6.install qt6-base-6.3.1+dfsg/debian/qmake6.install
--- qt6-base-6.3.1+dfsg/debian/qmake6.install	2022-04-22 19:50:08.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/qmake6.install	2022-12-26 22:56:45.000000000 +0100
@@ -1,3 +1,4 @@
+usr/bin/*-qmake6
 usr/lib/${DEB_HOST_MULTIARCH}/qt6/mkspecs/aix-g++-64/qmake.conf
 usr/lib/${DEB_HOST_MULTIARCH}/qt6/mkspecs/aix-g++-64/qplatformdefs.h
 usr/lib/${DEB_HOST_MULTIARCH}/qt6/mkspecs/aix-g++/qmake.conf
diff -Nru qt6-base-6.3.1+dfsg/debian/rules qt6-base-6.3.1+dfsg/debian/rules
--- qt6-base-6.3.1+dfsg/debian/rules	2022-09-17 19:21:11.000000000 +0200
+++ qt6-base-6.3.1+dfsg/debian/rules	2022-12-26 22:56:51.000000000 +0100
@@ -89,6 +89,12 @@
 	sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/' debian/qt.conf.in \
 		> debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/qt6.conf
 
+	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
+
 override_dh_makeshlibs:
 	dh_makeshlibs -XlibQt6EglFSDeviceIntegration -XlibQt6EglFsKmsGbmSupport -XlibQt6EglFsKmsSupport -XlibQt6XcbQpa
 

Reply to: