summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2025-01-31 19:04:57 -0500
committerIonen Wolkens <ionen@gentoo.org>2025-01-31 19:34:21 -0500
commit7827b36dd37936a36d455fbd910d620ecbf11381 (patch)
tree79b8f82b28154a18c68e6f7ff3269f584082e22f
parentsys-cluster/knem: Add MODULES_OPTIONAL_IUSE support (diff)
downloadgentoo-7827b36dd37936a36d455fbd910d620ecbf11381.tar.gz
gentoo-7827b36dd37936a36d455fbd910d620ecbf11381.tar.bz2
gentoo-7827b36dd37936a36d455fbd910d620ecbf11381.zip
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@gentoo.org>
-rw-r--r--eclass/qt6-build.eclass29
1 files 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
}