-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9256f1
commit acc6778
Showing
19 changed files
with
527 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Internals | ||
CRED="\x1b[31;01m" | ||
CBLUE="\x1b[34;01m" | ||
CGRAY="\x1b[30;01m" | ||
CRESET="\x1b[39;49;00m" | ||
|
||
function try () { | ||
"$@" || exit -1 | ||
} | ||
|
||
function info() { | ||
echo -e "$CBLUE"$@"$CRESET"; | ||
} | ||
|
||
function error() { | ||
MSG="$CRED"$@"$CRESET" | ||
echo -e $MSG; | ||
exit -1 | ||
} | ||
|
||
function debug() { | ||
echo -e "$CGRAY"$@"$CRESET"; | ||
} | ||
|
||
source `dirname $0`/../qgis_deps/config.conf | ||
if [ -d $ROOT_OUT_PATH/stage ]; then | ||
info "Using qgis_deps: $ROOT_OUT_PATH/stage" | ||
else | ||
error "Missing qgis_deps directory '$ROOT_OUT_PATH/stage' not found." | ||
fi | ||
|
||
source $ROOT_OUT_PATH/stage/qgis-deps.config | ||
|
||
CORES=$(sysctl -n hw.ncpu) | ||
|
||
export QGIS_SOURCE_DIR=~/Projects/mesh/QGIS | ||
export QGIS_VERSION=3.13 | ||
export QGIS_BUILD_DIR=$ROOT_OUT_PATH/../qgis-${QGIS_VERSION}-deps-${RELEASE_VERSION}/build | ||
export QGIS_INSTALL_DIR=$ROOT_OUT_PATH/../qgis-${QGIS_VERSION}-deps-${RELEASE_VERSION}/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Script to list all rpaths in all binaries | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
source $DIR/config.conf | ||
|
||
run() { | ||
RPATH_DIR_FILENAME=$(basename -- "$RPATH_DIR") | ||
RESULT_BIN= | ||
COMMANDS_BIN= | ||
|
||
cd $FOLDER | ||
LIBS1=`find . -type f -name "*.so"` | ||
LIBS2=`find . -type f -name "*.dylib"` | ||
BINS=`find . -type f ! -name "*.*"` | ||
LIBS="$BINS $LIBS1 $LIBS2" | ||
for lib in $LIBS; do | ||
RP=$(otool -l $FOLDER/$lib | grep RPATH -A2) | ||
LIB="\$BUNDLE_CONTENTS_DIR/${lib:2:${#lib}}" | ||
|
||
if [ "X$RPATH_DIR" == "X" ]; then | ||
RP=$(otool -l $FOLDER/$lib | grep RPATH -A2) | ||
if [ ! "X$RP" == "X" ]; then | ||
echo $FOLDER/$lib | ||
echo $RP | ||
fi | ||
else | ||
if echo ${RP} | grep -q $RPATH_DIR | ||
then | ||
RESULT_BIN="$RESULT_BIN\n$LIB" | ||
COMMANDS_BIN="$COMMANDS_BIN\n install_name_delete_rpath $RPATH_DIR $LIB" | ||
fi | ||
fi | ||
done | ||
|
||
printf "$RESULT_BIN\n" | ||
echo "-----------" | ||
printf "$COMMANDS_BIN\n" | ||
} | ||
|
||
if (( $# < 1 )); then | ||
echo "listing all RPATHs" | ||
fi | ||
|
||
FOLDER=$BUNDLE_CONTENTS_DIR | ||
RPATH_DIR=$1 | ||
echo "Checking which binaries in $FOLDER have rpath $RPATH_DIR" | ||
run |
Oops, something went wrong.