summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@debian.org>2017-11-17 20:17:28 +0300
committerNiels Thykier <niels@thykier.net>2017-11-17 18:09:01 +0000
commit03b357e2c3cd7e0efa43ae63e33125b99dfcbe68 (patch)
tree12ed0eee49d05e1a99817a2aba47a0453e50f9c2
parent5f21fa3a1fcc95804581dbaee6050e07c956175b (diff)
downloaddebhelper-03b357e2c3cd7e0efa43ae63e33125b99dfcbe68.tar.gz
qmake.pm: Add all possible settings to generated qmake-cross.conf.
Now output of ‘qmake -query’ with and without using this file is identical. This makes cross-building Qt’s own modules possible. Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--debian/changelog3
-rw-r--r--lib/Debian/Debhelper/Buildsystem/qmake.pm20
2 files changed, 21 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 76702c0c..4bd70c75 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ debhelper (10.10.9) UNRELEASED; urgency=medium
file.
* qmake.pm: Push compiler information as ‘early’ flags to qmake, to
make sure qmake calls the right compiler to get library paths.
+ * qmake.pm: Add all possible settings to generated qmake-cross.conf.
+ Now output of ‘qmake -query’ with and without using this file is
+ identical. This makes cross-building Qt’s own modules possible.
-- Niels Thykier <niels@thykier.net> Thu, 16 Nov 2017 18:36:51 +0000
diff --git a/lib/Debian/Debhelper/Buildsystem/qmake.pm b/lib/Debian/Debhelper/Buildsystem/qmake.pm
index 564c7550..6e7f87f1 100644
--- a/lib/Debian/Debhelper/Buildsystem/qmake.pm
+++ b/lib/Debian/Debhelper/Buildsystem/qmake.pm
@@ -67,12 +67,28 @@ sub configure {
}
my $filename = generated_file('_source', 'qmake-cross.conf');
+ my $host_multiarch = dpkg_architecture_value("DEB_HOST_MULTIARCH");
open(my $fh, '>', $filename) or error("open($filename) failed: $!");
$fh->print("[Paths]\n");
$fh->print("Prefix=/usr\n");
- $fh->print("HostData=lib/" . dpkg_architecture_value("DEB_HOST_MULTIARCH") . "/qt5\n");
- $fh->print("Headers=include/" . dpkg_architecture_value("DEB_HOST_MULTIARCH") . "/qt5\n");
+ $fh->print("ArchData=lib/$host_multiarch/qt5\n");
+ $fh->print("Binaries=lib/qt5/bin\n");
+ $fh->print("Data=share/qt5\n");
+ $fh->print("Documentation=share/qt5/doc\n");
+ $fh->print("Examples=lib/$host_multiarch/qt5/examples\n");
+ $fh->print("Headers=include/$host_multiarch/qt5\n");
+ $fh->print("HostBinaries=lib/qt5/bin\n");
+ $fh->print("HostData=lib/$host_multiarch/qt5\n");
+ $fh->print("HostLibraries=lib/$host_multiarch\n");
+ $fh->print("Imports=lib/$host_multiarch/qt5/imports\n");
+ $fh->print("Libraries=lib/$host_multiarch\n");
+ $fh->print("LibraryExecutables=lib/$host_multiarch/qt5/libexec\n");
+ $fh->print("Plugins=lib/$host_multiarch/qt5/plugins\n");
+ $fh->print("Qml2Imports=lib/$host_multiarch/qt5/qml\n");
+ $fh->print("Settings=/etc/xdg\n");
+ $fh->print("Translations=share/qt5/translations\n");
+
close($fh) or error("close($filename) failed: $!");
if ($filename !~ m{^/}) {
# Make the file name absolute (just in case qmake cares).