[debhelper-devel] [debhelper] 01/02: qmake{, 4}.pm: Avoid global state in build systems

Niels Thykier nthykier at moszumanska.debian.org
Mon Jan 22 07:21:50 UTC 2018


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit 470e988101f7631fdcdc36fc98223dfa9e54a720
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Jan 21 08:18:59 2018 +0000

    qmake{,4}.pm: Avoid global state in build systems
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog                              | 6 ++++++
 lib/Debian/Debhelper/Buildsystem/qmake.pm     | 8 +++++---
 lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm | 6 ++----
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 097c299..d64f460 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+debhelper (11.1.4) UNRELEASED; urgency=medium
+
+  * qmake.pm/qmake4.pm: Avoid global state in the build systems.
+
+ -- Niels Thykier <niels at thykier.net>  Sun, 21 Jan 2018 08:18:20 +0000
+
 debhelper (11.1.3) unstable; urgency=medium
 
   * autoscripts/*: Improve rollback handling of many scripts.
diff --git a/lib/Debian/Debhelper/Buildsystem/qmake.pm b/lib/Debian/Debhelper/Buildsystem/qmake.pm
index 6e7f87f..561080f 100644
--- a/lib/Debian/Debhelper/Buildsystem/qmake.pm
+++ b/lib/Debian/Debhelper/Buildsystem/qmake.pm
@@ -11,8 +11,6 @@ use warnings;
 use Debian::Debhelper::Dh_Lib qw(dpkg_architecture_value error generated_file is_cross_compiling);
 use parent qw(Debian::Debhelper::Buildsystem::makefile);
 
-our $qmake="qmake";
-
 my %OS_MKSPEC_MAPPING = (
 	'linux'    => 'linux-g++',
 	'kfreebsd' => 'gnukfreebsd-g++',
@@ -134,7 +132,7 @@ sub configure {
 	}
 
 	$this->mkdir_builddir();
-	$this->doit_in_builddir($qmake, @options, @flags, @_);
+	$this->doit_in_builddir($this->_qmake(), @options, @flags, @_);
 }
 
 sub install {
@@ -146,4 +144,8 @@ sub install {
 	$this->SUPER::install($destdir, "INSTALL_ROOT=$destdir", @_);
 }
 
+sub _qmake {
+	return 'qmake';
+}
+
 1
diff --git a/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm b/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm
index ac7ce98..60d9084 100644
--- a/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm
+++ b/lib/Debian/Debhelper/Buildsystem/qmake_qt4.pm
@@ -8,10 +8,8 @@ sub DESCRIPTION {
 	"qmake for QT 4 (*.pro)";
 }
 
-sub configure {
-	my $this=shift;
-	$Debian::Debhelper::Buildsystem::qmake::qmake="qmake-qt4";
-	$this->SUPER::configure(@_);
+sub _qmake {
+	return 'qmake-qt4';
 }
 
 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list