commit: 7827b36dd37936a36d455fbd910d620ecbf11381
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 1 00:04:57 2025 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Feb 1 00:34:21 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7827b36d
qt6-build.eclass: update for user_facing_tool_links.txt changes
Still keep a bash loop given want to keep the sanity check and it
spares us from doing `cd "${D}${QT6_PREFIX}"` for a `xargs ln` to
work, but it let us simplify a little bit.
Keeping old version in its own block so it's easy to drop later.
Also drop the empty ${links} variable from the sanity check, dates
back to old unused code.
Closes: https://bugs.gentoo.org/949126
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
eclass/qt6-build.eclass | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/eclass/qt6-build.eclass b/eclass/qt6-build.eclass
index 31bdf1e01167..ae23f4e9bd82 100644
--- a/eclass/qt6-build.eclass
+++ b/eclass/qt6-build.eclass
@@ -234,18 +234,33 @@ _qt6-build_create_user_facing_links() {
# even if no links (empty), if missing will assume that it is an error
[[ ${PN} == qttranslations ]] && return
- # loop and match using paths (upstream suggests `xargs ln -s < ${links}`
- # but, for what it is worth, that will fail if paths have spaces)
+ # TODO: drop when <6.8.3 is gone, unneeded version with relative paths
+ if ver_test -lt 6.8.3; then
+ local link
+ while IFS= read -r link; do
+ if [[ -z ${link} ]]; then
+ continue
+ elif [[ ${link} =~ ^("${QT6_PREFIX}"/.+)\
("${QT6_PREFIX}"/bin/.+) ]]
+ then
+ dosym -r "${BASH_REMATCH[1]#"${EPREFIX}"}" \
+ "${BASH_REMATCH[2]#"${EPREFIX}"}"
+ else
+ die "unrecognized user_facing_tool_links.txt
line: ${link}"
+ fi
+ done < "${BUILD_DIR}"/user_facing_tool_links.txt || die
+
+ return
+ fi
+
local link
while IFS= read -r link; do
if [[ -z ${link} ]]; then
continue
- elif [[ ${link} =~ ^("${QT6_PREFIX}"/.+)\
("${QT6_PREFIX}"/bin/.+) ]]
- then
- dosym -r "${BASH_REMATCH[1]#"${EPREFIX}"}" \
- "${BASH_REMATCH[2]#"${EPREFIX}"}"
+ elif [[ ${link} =~ (../[^ ]+)\ (bin/.+) ]]; then
+ dosym "${BASH_REMATCH[1]}" \
+ "${QT6_PREFIX#"${EPREFIX}"}/${BASH_REMATCH[2]}"
else
- die "unrecognized line '${link}' in '${links}'"
+ die "unrecognized user_facing_tool_links.txt line:
${link}"
fi
done < "${BUILD_DIR}"/user_facing_tool_links.txt || die
}