diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-02-22 11:49:25 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-02-22 20:00:36 +0000 |
commit | eb2b8dd98ae8c298c484e61ddc4ad1fcf632ad5b (patch) | |
tree | 955a7a7b99986e5b59ddf1498cb8192f37b726be /packaging/macosx | |
parent | 2e139a15fab0206403e66abaf435456007cb5e1f (diff) |
Check for dependencies in all subdirectories of $pkglib and $pkgexec.
Just use "find" to find plain files under $pkglib and $pkgexec; this
avoids trying to run otool on directories, which can cause it to stop
looking in $pkgexec/* past the extcap directory, and does try to run it
on the Qt frameworks in subdirectories under $pkglib.
Add a comment giving more details about the big command to find
dependencies.
Change-Id: Ife3c3a8493ca0b6ea28f1bb108f63714366abeed
Reviewed-on: https://code.wireshark.org/review/26003
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'packaging/macosx')
-rwxr-xr-x | packaging/macosx/osx-app.sh.in | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/packaging/macosx/osx-app.sh.in b/packaging/macosx/osx-app.sh.in index 9265eae6af..770303f798 100755 --- a/packaging/macosx/osx-app.sh.in +++ b/packaging/macosx/osx-app.sh.in @@ -250,22 +250,32 @@ echo -e "\nFixing up $bundle...\n" a=1 nfiles=0 endl=true -lib_dep_search_list=" - $pkglib/* - $pkgexec/* - $pkgexec/extcap/* - " - while $endl; do echo -e "Looking for dependencies. Round" $a # - # libssh, for some reason, has its "install name" set to - # just libssh.4.dylib, rather than /usr/local/lib/libssh.4.dylib, - # when built by tools/macos-setup.sh. We have to fix that; that's - # what the sed command does. + # To find dependencies, we: + # + # find all plain files under $pkglib and $pkgexec; + # + # run otool -L on them to find all the libraries they depend on; + # + # filter out all lines that don't contain "compatibility" to + # remove lines of output that don't correspond to dependencies; + # + # use cut to extract the library name from the output; + # + # replace "libssh" with "/usr/local/lib/libssh" because + # libssh, for some reason, has its "install name" set to + # just libssh.4.dylib, rather than /usr/local/lib/libssh.4.dylib, + # when built by tools/macos-setup.sh; + # + # strip out system libraries, as we don't bundle them with + # Wireshark; + # + # eliminate duplicates. # libs="`\ - otool -L $lib_dep_search_list 2>/dev/null \ + find "$pkglib" "$pkgexec" -type f -print0 | xargs -0 otool -L 2>/dev/null \ | fgrep compatibility \ | cut -d\( -f1 \ | sed '1,$s;^ libssh; /usr/local/lib/libssh;' \ |