[gimp-macos-build/wip/lukaso/tests: 1/2] Revert "Cleanup"




commit a1d8d61346f8bc6b98614ed62f8a96e25c475be3
Author: Lukas Oberhuber <lukaso gmail com>
Date:   Tue Oct 19 22:32:25 2021 +0000

    Revert "Cleanup"
    
    This reverts commit 2412e9c8a6b01fc297e024abe4ed7cee50755773

 package/build299.sh | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
---
diff --git a/package/build299.sh b/package/build299.sh
index 2b8e64d..d5dd9bf 100755
--- a/package/build299.sh
+++ b/package/build299.sh
@@ -36,6 +36,27 @@ pushd ${PACKAGE_DIR}/GIMP-2.99.app/Contents/Resources/share/icons
  cp -r hicolor ../gimp/2.99/icons
 popd
 
+echo "Removing pathnames from the libraries and binaries"
+# fix permission for some libs
+find  ${PACKAGE_DIR}/GIMP-2.99.app/Contents/Resources/lib -name '*.dylib' -type f | xargs chmod 755
+# getting list of the files to fix
+FILES=$(
+  find ${PACKAGE_DIR}/GIMP-2.99.app -perm +111 -type f \
+   | xargs file \
+   | grep ' Mach-O '|awk -F ':' '{print $1}'
+)
+OLDPATH="${JHBUILD_LIBDIR}/"
+
+for file in $FILES
+do
+  install_name_tool -id "@rpath/$(basename $file)" $file
+  otool -L $file \
+   | grep "\t$OLDPATH" \
+   | sed "s|${OLDPATH}||" \
+   | awk -v fname="$file" -v old_path="$OLDPATH" '{print "install_name_tool -change "old_path $1" 
@rpath/"$1" "fname}' \
+   | bash
+done
+
 if [[ "$1" == "debug" ]]; then
   echo "Generating debug symbols"
   find  ${PACKAGE_DIR}/GIMP-2.99.app/ -type f -perm +111 \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]