commit:     2e9af2864981c8243b1097324a2a187ae4455199
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Sep  7 10:53:40 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 16:06:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e9af286

qt6-build.eclass: minor style & comments adjustments

wrt skip->error comment, shortened partially for correctness. Most
packages still fail either way due to `ninja install` having nothing
to do (unless some files did get registered for install anyway). Albeit
still want this to error during configure when required conditions are
not met either way.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 eclass/qt6-build.eclass | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 28f8d904065d..9de740708a6f 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -99,15 +99,14 @@ qt6-build_src_prepare() {
        cmake_src_prepare
 
        if [[ -e CMakeLists.txt ]]; then
-               # build may be skipped entirely and install nothing without 
errors
-               # if checking for a major dependency/condition failed
-               sed -i '/message(NOTICE.*Skipping/s/NOTICE/FATAL_ERROR/' 
CMakeLists.txt || die
+               # throw an error rather than skip if *required* conditions are 
not met
+               sed -e '/message(NOTICE.*Skipping/s/NOTICE/FATAL_ERROR/' \
+                       -i CMakeLists.txt || die
        fi
 
        if in_iuse test && use test && [[ -e tests/auto/CMakeLists.txt ]]; then
-               # upstream seems to install before running tests, and cmake
-               # subdir that is present in about half of the Qt6 components
-               # cause a dependency on itself and sometimes install test junk
+               # .cmake files tests causing a self-dependency in many modules,
+               # and that sometimes install additional test junk
                sed -i '/add_subdirectory(cmake)/d' tests/auto/CMakeLists.txt 
|| die
        fi
 
@@ -251,8 +250,8 @@ _qt6-build_match_cpu_flags() {
        local flags=() intrin intrins
        while IFS=' ' read -ra intrins; do
                [[ ${intrins[*]} == *=[^_]* && ${intrins[*]} == *=_* ]] &&
-                       for intrin in "${intrins[@]}"; do
-                               [[ ${intrin} == *?=* ]] && flags+=( 
-mno-${intrin%=*} )
+                       for intrin in "${intrins[@]%=*}"; do
+                               [[ ${intrin} ]] && flags+=( -mno-${intrin} )
                        done
        done < <(
                # TODO: review if can drop fma= matching after QTBUG-116357

Reply via email to