-
Notifications
You must be signed in to change notification settings - Fork 344
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
Showing
9 changed files
with
450 additions
and
172 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 |
---|---|---|
|
@@ -297,3 +297,7 @@ xcshareddata/ | |
# QTCreator | ||
*QtCreator.* | ||
moc_predefs.h | ||
|
||
# shiboken-generated files | ||
Engine/Qt5 | ||
Gui/Qt5 |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,32 @@ | ||
#!/bin/bash | ||
set -e # Exit immediately if a command exits with a non-zero status | ||
set -u # Treat unset variables as an error when substituting. | ||
#set -x # Print commands and their arguments as they are executed. | ||
#set -v # Prints shell input lines as they are read. | ||
|
||
if [ $# != 1 ]; then | ||
echo "Usage: $0 /path/to/Application.app/Contents/MacOS/executable_to_fix" | ||
echo "Move MacPorts dependencies of an app binary to Application.app/Contents/Frameworks" | ||
exit 1 | ||
fi | ||
exe=$1 | ||
pkglib="$(dirname $exe)/../Frameworks" | ||
SDK_HOME="${SDK_HOME:-/opt/local}" | ||
|
||
MPLIBS0="$(otool -L "$exe" | grep -F "${SDK_HOME}/lib" | grep -F -v ':' |sort|uniq |awk '{print $1}')" | ||
# also add first-level and second-level dependencies | ||
MPLIBS1="$(for i in $MPLIBS0; do echo "$i"; otool -L "$i" | grep -F "${SDK_HOME}/lib" | grep -F -v ':'; done |sort|uniq |awk '{print $1}')" | ||
MPLIBS="$(for i in $MPLIBS1; do echo "$i"; otool -L "$i" | grep -F "${SDK_HOME}/lib" | grep -F -v ':'; done |sort|uniq |awk '{print $1}')" | ||
for mplib in $MPLIBS; do | ||
if [ ! -f "$mplib" ]; then | ||
echo "missing $exe depend $mplib" | ||
exit 1 | ||
fi | ||
lib="$(echo "$mplib" | awk -F / '{print $NF}')" | ||
if [ ! -f "$pkglib/${lib}" ]; then | ||
echo "copying missing lib ${lib}" | ||
cp "$mplib" "$pkglib/${lib}" | ||
chmod +w "$pkglib/${lib}" | ||
fi | ||
install_name_tool -change "$mplib" "@executable_path/../Frameworks/$lib" "$exe" | ||
done |
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