Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 08 Sep 2021 16:55:49
Message-Id: 1631120072.2aad1931f8a03c77c16f6664d51afdc190efe8aa.asturm@gentoo
1 commit: 2aad1931f8a03c77c16f6664d51afdc190efe8aa
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 5 11:17:11 2021 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 8 16:54:32 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aad1931
7
8 qt5-build.eclass: Always run qt5_tools_configure for QT5_MODULE=qttools
9
10 Run qt5_qmake directly inside qt5_tools_configure(), copy the resulting
11 qttools-config.pri into QT5_BUILD_DIR again.
12
13 Add linguist-tools handling.
14
15 Closes: https://bugs.gentoo.org/728278
16 Closes: https://bugs.gentoo.org/811147
17 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
18
19 eclass/qt5-build.eclass | 25 ++++++++++++++++++++-----
20 1 file changed, 20 insertions(+), 5 deletions(-)
21
22 diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
23 index 2765fc46081..988dceb495f 100644
24 --- a/eclass/qt5-build.eclass
25 +++ b/eclass/qt5-build.eclass
26 @@ -166,8 +166,10 @@ qt5-build_src_configure() {
27 if [[ ${QT5_MODULE} == qtbase ]]; then
28 qt5_base_configure
29 fi
30 - if [[ ${QT5_MODULE} == qttools ]] && [[ -z ${QT5_TARGET_SUBDIRS[@]} ]]; then
31 - qt5_tools_configure
32 + if [[ ${QT5_MODULE} == qttools ]]; then
33 + if [[ ${EAPI} != 7 || -z ${QT5_TARGET_SUBDIRS[@]} ]]; then
34 + qt5_tools_configure
35 + fi
36 fi
37
38 qt5_foreach_target_subdir qt5_qmake
39 @@ -643,7 +645,10 @@ qt5_base_configure() {
40 # @FUNCTION: qt5_tools_configure
41 # @INTERNAL
42 # @DESCRIPTION:
43 -# Disables modules other than ${PN} belonging to qttools.
44 +# Most of qttools require files that are only generated when qmake is
45 +# run in the root directory. Related bugs: 676948, 716514.
46 +# Runs qt5_qmake in root directory to create qttools-config.pri and copy to
47 +# ${QT5_BUILD_DIR}, disabling modules other than ${PN} belonging to qttools.
48 qt5_tools_configure() {
49 # configure arguments
50 local qmakeargs=(
51 @@ -659,13 +664,23 @@ qt5_tools_configure() {
52 -no-feature-winrtrunner
53 )
54
55 - local i
56 + local i module=${PN}
57 + case ${PN} in
58 + linguist-tools) module=linguist ;;
59 + *) ;;
60 + esac
61 for i in assistant designer linguist pixeltool qdbus qdoc qtdiag qtpaths qtplugininfo; do
62 - [[ ${PN} == ${i} ]] || qmakeargs+=( -no-feature-${i} )
63 + [[ ${module} != ${i} ]] && qmakeargs+=( -no-feature-${i} )
64 done
65
66 # allow the ebuild to override what we set here
67 myqmakeargs=( "${qmakeargs[@]}" "${myqmakeargs[@]}" )
68 +
69 + if [[ ${EAPI} != 7 ]]; then
70 + mkdir -p "${QT5_BUILD_DIR}" || die
71 + qt5_qmake "${QT5_BUILD_DIR}"
72 + cp qttools-config.pri "${QT5_BUILD_DIR}" || die
73 + fi
74 }
75
76 # @FUNCTION: qt5_qmake_args