|author||Guy Harris <firstname.lastname@example.org>||2018-02-22 11:49:25 -0800|
|committer||Guy Harris <email@example.com>||2018-02-22 20:00:36 +0000|
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 <firstname.lastname@example.org>
Diffstat (limited to 'packaging')
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
@@ -250,22 +250,32 @@ echo -e "\nFixing up $bundle...\n"
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.
- 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;' \