diff options
author | Niels Thykier <niels@thykier.net> | 2017-11-14 22:08:42 +0000 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2017-11-14 22:08:42 +0000 |
commit | 3cf9dd3611cb306a0e721a65206a9407adad7b45 (patch) | |
tree | ad1e9cfcaf7a90a960ee401eb1df77cab324e6d5 | |
parent | e23dbeeeee078f692233b46c1868dc8b36276436 (diff) | |
download | debhelper-3cf9dd3611cb306a0e721a65206a9407adad7b45.tar.gz |
qmake: Let the qmake cross config survive until clean
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | lib/Debian/Debhelper/Buildsystem/qmake.pm | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog index 72884237..415dece9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ debhelper (10.10.8) UNRELEASED; urgency=medium due to profiles or architecture restrictions. * dh_install: Properly allow patterns to be excluded without complaining about missing files. (Closes: #881658) + * qmake.pm: Ensure that the qmake cross-build config file + survives until clean. [ Dmitry Shachnev ] * qmake.pm: Set QMAKE_LINK correctly for cross-builds. diff --git a/lib/Debian/Debhelper/Buildsystem/qmake.pm b/lib/Debian/Debhelper/Buildsystem/qmake.pm index 6e4f8740..aaa7b112 100644 --- a/lib/Debian/Debhelper/Buildsystem/qmake.pm +++ b/lib/Debian/Debhelper/Buildsystem/qmake.pm @@ -8,7 +8,6 @@ package Debian::Debhelper::Buildsystem::qmake; use strict; use warnings; -use File::Temp qw(tempfile); use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value error is_cross_compiling); use parent qw(Debian::Debhelper::Buildsystem::makefile); @@ -67,12 +66,14 @@ sub configure { error("Cannot cross-compile: Missing entry for HOST OS ${host_os} for qmake's -spec option"); } - my ($fh, $filename) = tempfile("qt.XXXX", SUFFIX => ".conf", TMPDIR => 1, UNLINK => 1); + my $filename = generated_file('_source', 'qmake-cross.conf'); + 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"); - close $fh; + close($fh) or error("close($filename) failed: $!"); push @options, ("-qtconf", $filename); } |