diff options
author | Michael Palimaka <kensington@gentoo.org> | 2017-12-10 21:34:27 +1100 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2018-01-14 16:50:33 +1100 |
commit | f1db39369d686277aa4f6b087069b76955fa1946 (patch) | |
tree | dadfd4ff222a89d7fba61dc6504eec044e474cae /eclass | |
parent | profiles: consolidate Oracle unmask entries in arch/x86/use.mask. (diff) | |
download | gentoo-f1db39369d686277aa4f6b087069b76955fa1946.tar.gz gentoo-f1db39369d686277aa4f6b087069b76955fa1946.tar.bz2 gentoo-f1db39369d686277aa4f6b087069b76955fa1946.zip |
qt5-build.eclass: fix respecting toolchain in 5.9 and later
Closes: https://bugs.gentoo.org/639494
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/qt5-build.eclass | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index fd29ed1e6c05..3b35c94b6c86 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -213,6 +213,11 @@ qt5-build_src_prepare() { # Don't add -O3 to CXXFLAGS (bug 549140) sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \ src/{corelib/corelib,gui/gui}.pro || die "sed failed (optimize_full)" + + # Respect build variables in configure tests (bug #639494) + if [[ ${QT5_MINOR_VERSION} -ge 9 ]]; then + sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- \"\$@\"|& $(qt5_qmake_args) |" configure || die + fi fi default @@ -689,6 +694,33 @@ qt5_base_configure() { } +# @FUNCTION: qt5_qmake_args +# @INTERNAL +# @DESCRIPTION: +# Helper function to get the various toolchain-related variables. +qt5_qmake_args() { + echo \ + QMAKE_AR=\"$(tc-getAR)\" \ + 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=\"$(tc-getSTRIP)\" \ + 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= +} + # @FUNCTION: qt5_qmake # @INTERNAL # @DESCRIPTION: |