From 9bfab2720e36ce89df6b4ce72265297c9f8c8889 Mon Sep 17 00:00:00 2001 From: leleliu008 Date: Mon, 5 Aug 2024 17:26:18 +0800 Subject: [PATCH] optimized --- ppkg | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ppkg b/ppkg index ebd2c8a..ae0a021 100755 --- a/ppkg +++ b/ppkg @@ -6678,19 +6678,21 @@ __check_elf_files() { case $1 in ./*) - NEEDED_SHARED_LIBRARY_FILEPATH="./lib/$DT_NEEDED" - - if [ -f "$NEEDED_SHARED_LIBRARY_FILEPATH" ] ; then - PACKAGE_ELF_FILES_NEED_SET_RPATH_S1="$PACKAGE_ELF_FILES_NEED_SET_RPATH_S1 -$1" - else - NEEDED_SHARED_LIBRARY_FILEPATH="$(find ./lib \( -type f -or -type l \) -name "$DT_NEEDED" -print -quit)" + if [ -d lib ] ; then + NEEDED_SHARED_LIBRARY_FILEPATH="./lib/$DT_NEEDED" if [ -f "$NEEDED_SHARED_LIBRARY_FILEPATH" ] ; then PACKAGE_ELF_FILES_NEED_SET_RPATH_S1="$PACKAGE_ELF_FILES_NEED_SET_RPATH_S1 $1" else - unset NEEDED_SHARED_LIBRARY_FILEPATH + NEEDED_SHARED_LIBRARY_FILEPATH="$(find ./lib \( -type f -or -type l \) -name "$DT_NEEDED" -print -quit)" + + if [ -f "$NEEDED_SHARED_LIBRARY_FILEPATH" ] ; then + PACKAGE_ELF_FILES_NEED_SET_RPATH_S1="$PACKAGE_ELF_FILES_NEED_SET_RPATH_S1 +$1" + else + unset NEEDED_SHARED_LIBRARY_FILEPATH + fi fi fi esac