Skip to content

Commit

Permalink
qt6-build.eclass: minor style & comments adjustments
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
ionenwks committed Sep 9, 2023
1 parent 2d910df commit 2e9af28
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions eclass/qt6-build.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2e9af28

Please sign in to comment.