scripts/build: fix broken sym links due to isolated sysroot

This commit is contained in:
MilhouseVH 2019-02-28 06:19:13 +00:00
parent 32a1e0fac1
commit 7c327b2d56

View File

@ -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}"