mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 20:03:23 +00:00
Mac: don't try to copy libraries we got from Homebrew
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d417d717b9
commit
dce7e46766
2 changed files with 2 additions and 16 deletions
|
@ -26,7 +26,7 @@ LIBRARY_PATH=${DIR}/install-root/lib make install
|
||||||
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
|
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
|
||||||
for i in 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")
|
OLD=$(otool -L ${EXECUTABLE} | grep $i | cut -d\ -f1 | tr -d "\t")
|
||||||
if [ ! -z ${OLD} ] ; then
|
if [[ ! -z ${OLD} && ! -f Subsurface.app/Contents/Frameworks/$(basename ${OLD}) ]] ; then
|
||||||
# copy the library into the bundle and make sure its id and the reference to it are correct
|
# copy the library into the bundle and make sure its id and the reference to it are correct
|
||||||
cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks
|
cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks
|
||||||
SONAME=$(basename $OLD)
|
SONAME=$(basename $OLD)
|
||||||
|
|
|
@ -26,29 +26,15 @@ LIBRARY_PATH=${DIR}/install-root/lib make -j2 install
|
||||||
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
|
EXECUTABLE=Subsurface.app/Contents/MacOS/Subsurface
|
||||||
for i in 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")
|
OLD=$(otool -L ${EXECUTABLE} | grep $i | cut -d\ -f1 | tr -d "\t")
|
||||||
if [ ! -z ${OLD} ] ; then
|
if [[ ! -z ${OLD} && ! -f Subsurface.app/Contents/Frameworks/$(basename ${OLD}) ]] ; then
|
||||||
# copy the library into the bundle and make sure its id and the reference to it are correct
|
# copy the library into the bundle and make sure its id and the reference to it are correct
|
||||||
cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks
|
cp ${DIR}/install-root/lib/$(basename ${OLD}) Subsurface.app/Contents/Frameworks
|
||||||
SONAME=$(basename $OLD)
|
SONAME=$(basename $OLD)
|
||||||
install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${EXECUTABLE}
|
install_name_tool -change ${OLD} @executable_path/../Frameworks/${SONAME} ${EXECUTABLE}
|
||||||
install_name_tool -id @executable_path/../Frameworks/${SONAME} Subsurface.app/Contents/Frameworks/${SONAME}
|
install_name_tool -id @executable_path/../Frameworks/${SONAME} Subsurface.app/Contents/Frameworks/${SONAME}
|
||||||
# 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")
|
|
||||||
# if [ ! -z $CURLLIB ] ; then
|
|
||||||
# install_name_tool -change ${CURLLIB} @executable_path/../Frameworks/$(basename ${CURLLIB}) Subsurface.app/Contents/Frameworks/${SONAME}
|
|
||||||
# fi
|
|
||||||
# SSHLIB=$(otool -L Subsurface.app/Contents/Frameworks/${SONAME} | grep libssh2 | cut -d\ -f1 | tr -d "\t")
|
|
||||||
# if [ ! -z $SSHLIB ] ; then
|
|
||||||
# install_name_tool -change ${SSHLIB} @executable_path/../Frameworks/$(basename ${SSHLIB}) Subsurface.app/Contents/Frameworks/${SONAME}
|
|
||||||
# fi
|
|
||||||
# fi
|
|
||||||
fi
|
fi
|
||||||
done
|
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
|
# 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- )
|
RPATH=$(otool -L ${EXECUTABLE} | grep rpath | cut -d\ -f1 | tr -d "\t" | cut -b 8- )
|
||||||
for i in ${RPATH}; do
|
for i in ${RPATH}; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue