if ! test -f $Frameworks/$base; then
if echo $dep | grep -sq '^libs' ; then
cp $BUILD_ROOT/$dep $Frameworks
- echo "$BUILD_ROOT/$dep => $Frameworks"
else
cp $dep $Frameworks
- echo "$dep => $Frameworks"
fi
missing=true
fi
# now do the same for all the libraries we include
for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners ; do
- echo "Now working on libraries in $libdir ..."
-
libbase=`basename $libdir`
-
+
for dylib in $libdir/*.dylib $libdir/*.so ; do
# skip symlinks
# change all the dependencies
- echo "Looking at " $dylib
-
changes=""
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
base=`basename $lib`
- changes="$changes -change $lib @executable_path/../$libbase/$base"
+ if echo $lib | grep -s libbase; then
+ changes="$changes -change $lib @executable_path/../$libbase/$base"
+ else
+ changes="$changes -change $lib @executable_path/../Frameworks/$base"
+ fi
done
if test "x$changes" != x ; then
# now the change what the library thinks its own name is
base=`basename $dylib`
- install_name_tool -id @executable_path/../$libdir/$base $dylib
- echo "Updated linkage to self in $dylib to @executable_path/../$libbase/$base"
+ install_name_tool -id @executable_path/../$libbase/$base $dylib
done
done