/[escript]/release/5.1/scripts/libmover.sh
ViewVC logotype

Contents of /release/5.1/scripts/libmover.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5851 - (show annotations)
Thu Dec 10 05:09:35 2015 UTC (5 years, 6 months ago) by jfenwick
Original Path: trunk/scripts/libmover.sh
File MIME type: application/x-sh
File size: 540 byte(s)
changes to support fixing libraries build on osx - enable with osx_dependency_fix.  Also added options file for OSX.11 and homebrew
1
2
3 #This script will take a library on macos (.so or .dylib)
4 #and will replace the relative dependencies with absolute
5 #deps in targetlibpath
6 #
7 # eg:
8 # for name in `find lib -name '*.so'`;do echo $name;./libmover.sh $name `pwd`/lib; done
9
10
11 if [ $# -ne 2 ]
12 then
13 echo "Usage: $0 library_file_to_update targetlibpath"
14 exit 1
15 fi
16
17 libname=$1
18 tlibpath=$2
19
20 lines=`otool -L $libname | tail +3 | cut -f1 -d\ | cut -f2 | grep build/darwin`
21 for name in $lines
22 do
23 install_name_tool -change $name $tlibpath/`basename $name` $libname
24 done
25
26

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26