From 096b414070e56d5e0bc54ab0187b138b13de33c0 Mon Sep 17 00:00:00 2001 From: Adonis Ling Date: Fri, 8 Dec 2023 11:16:23 +0800 Subject: [PATCH] Update the function install_cmake --- devel/scripts/install.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devel/scripts/install.sh b/devel/scripts/install.sh index bc01ac1..b3658ba 100755 --- a/devel/scripts/install.sh +++ b/devel/scripts/install.sh @@ -569,6 +569,15 @@ function install_cmake() { rm -rf "${install_path}" mkdir -p "${install_path}" tar -zxvf "${CMAKE_PACKAGE_NAME}" --strip-components=1 -C "${install_path}" + + local interpreter + interpreter="$(find "${DEVEL_HOME_PATH}/compiler" -name "${INTERPRETER}")" + local libc_so + libc_so="$(find "${DEVEL_HOME_PATH}/compiler" -name "${LIBC_SO}")" + + patchelf --set-rpath "${DEVEL_HOME_PATH}/compiler/$(uname -m)-linux-gnu/lib:$(dirname "${libc_so}")" "${install_path}/bin"/* + patchelf --set-interpreter "${interpreter}" "${install_path}/bin"/* + setup_package "${package}" log_info 'Success!'