From 7c327b2d56642649117744d34eab328285fd166b Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 28 Feb 2019 06:19:13 +0000 Subject: [PATCH] scripts/build: fix broken sym links due to isolated sysroot --- scripts/build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/build b/scripts/build index a4be68d83f..f96a07f7f6 100755 --- a/scripts/build +++ b/scripts/build @@ -439,6 +439,12 @@ done for i in $(find "${SYSROOT_PREFIX}/usr"/{lib,share} -type f -name "*.cmake" 2>/dev/null); do sed -e "s#${SYSROOT_PREFIX}/usr#${PKG_ORIG_SYSROOT_PREFIX}/usr#g" -i "${i}" done +for i in $(find "${SYSROOT_PREFIX}" -type l 2>/dev/null); do + _tmp="$(readlink -m "${i}")" + if [[ ${_tmp} =~ ^${SYSROOT_PREFIX}/ ]]; then + ln -sf "${_tmp/${SYSROOT_PREFIX}\//${PKG_ORIG_SYSROOT_PREFIX}\/}" "${i}" + fi +done # Transfer the new sysroot content to the shared sysroot mkdir -p "${PKG_ORIG_SYSROOT_PREFIX}"