commit:     c31705a9434bafd51a899315a9c67c48334193f2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun May  8 19:11:17 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed May 11 16:43:43 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c31705a9

qmake-utils.eclass: Reuse qt5_get_qmake_args in eqmake5

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/qmake-utils.eclass | 28 +++++-----------------------
 1 file changed, 5 insertions(+), 23 deletions(-)

diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
index a4be44fa65a5..a86ce1fbabb8 100644
--- a/eclass/qmake-utils.eclass
+++ b/eclass/qmake-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: qmake-utils.eclass
@@ -102,28 +102,10 @@ eqmake5() {
 
        ebegin "Running qmake"
 
-       "$(qt5_get_bindir)"/qmake \
-               -makefile \
-               QMAKE_AR="$(tc-getAR) cqs" \
-               QMAKE_CC="$(tc-getCC)" \
-               QMAKE_LINK_C="$(tc-getCC)" \
-               QMAKE_LINK_C_SHLIB="$(tc-getCC)" \
-               QMAKE_CXX="$(tc-getCXX)" \
-               QMAKE_LINK="$(tc-getCXX)" \
-               QMAKE_LINK_SHLIB="$(tc-getCXX)" \
-               QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \
-               QMAKE_RANLIB= \
-               QMAKE_STRIP= \
-               QMAKE_CFLAGS="${CFLAGS}" \
-               QMAKE_CFLAGS_RELEASE= \
-               QMAKE_CFLAGS_DEBUG= \
-               QMAKE_CXXFLAGS="${CXXFLAGS}" \
-               QMAKE_CXXFLAGS_RELEASE= \
-               QMAKE_CXXFLAGS_DEBUG= \
-               QMAKE_LFLAGS="${LDFLAGS}" \
-               QMAKE_LFLAGS_RELEASE= \
-               QMAKE_LFLAGS_DEBUG= \
-               "$@"
+       local -a args
+       mapfile -t args <<<"$(qt5_get_qmake_args)"
+       # NB: we're passing literal quotes in but qmake doesn't seem to mind
+       "$(qt5_get_bindir)"/qmake -makefile "${args[@]}" "$@"
 
        if ! eend $? ; then
                echo

Reply via email to