diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-08-20 20:45:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-08-20 20:45:36 -0700 |
commit | 0bb93c76fd913be2f7c0fd7dda66ec867a1ca1e1 (patch) | |
tree | 70d60887b3fcc4fce6b49e932912db8b2417c7f0 | |
parent | a072c635bc8a952a7d1386783ccc91d6381e8114 (diff) | |
download | subsurface-0bb93c76fd913be2f7c0fd7dda66ec867a1ca1e1.tar.gz |
Mac build: fix package creation
libssh2.1 is a dependency of libgit2, not of the main executable.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-x | packaging/macosx/make-package.sh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh index 73fdefd2f..77d71c025 100755 --- a/packaging/macosx/make-package.sh +++ b/packaging/macosx/make-package.sh @@ -24,7 +24,7 @@ LIBRARY_PATH=${DIR}/install-root/lib make install # now adjust a few references that macdeployqt appears to miss EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface -for i in libssh libgit2 libGrantlee_TextDocument.dylib libGrantlee_Templates.dylib; do +for i in libgit2 libGrantlee_TextDocument.dylib libGrantlee_Templates.dylib; do OLD=$(otool -L ${EXECUTABLE} | grep $i | cut -d\ -f1 | tr -d "\t") if [ ! -z ${OLD} ] ; then # copy the library into the bundle and make sure its id and the reference to it are correct @@ -32,14 +32,19 @@ for i in libssh libgit2 libGrantlee_TextDocument.dylib libGrantlee_Templates.dyl SONAME=$(basename $OLD) install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${EXECUTABLE} install_name_tool -id @executable_path/../Frameworks/${SONAME} Subsurface.app/Contents/Frameworks/${SONAME} - # also fix one incorrect reference inside of libgit2 + # also fix incorrect references inside of libgit2 if [[ "$i" = "libgit2" ]] ; then CURLLIB=$(otool -L Subsurface.app/Contents/Frameworks/${SONAME} | grep libcurl | cut -d\ -f1 | tr -d "\t") install_name_tool -change ${CURLLIB} @executable_path/../Frameworks/$(basename ${CURLLIB}) Subsurface.app/Contents/Frameworks/${SONAME} + SSHLIB=$(otool -L Subsurface.app/Contents/Frameworks/${SONAME} | grep libssh2 | cut -d\ -f1 | tr -d "\t") + install_name_tool -change ${SSHLIB} @executable_path/../Frameworks/$(basename ${SSHLIB}) Subsurface.app/Contents/Frameworks/${SONAME} fi fi done +# next, copy libssh2.1 +cp ${DIR}/install-root/lib/libssh2.1.dylib Subsurface.app/Contents/Frameworks + # next, replace @rpath references with @executable_path references in Subsurface RPATH=$(otool -L ${EXECUTABLE} | grep rpath | cut -d\ -f1 | tr -d "\t" | cut -b 8- ) for i in ${RPATH}; do |