From 3a7890193554c954728f8898bb6083e3f29d85eb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 13 Jul 2015 00:54:17 -0700 Subject: Rpathify references to Qt frameworks separately from references to libraries. We need to preserve the full path of the framework binary. Change-Id: I3a13eaffc07028a26fbd970db02cc1cce3fdcd5d Reviewed-on: https://code.wireshark.org/review/9621 Reviewed-by: Guy Harris --- packaging/macosx/osx-app.sh | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'packaging/macosx') diff --git a/packaging/macosx/osx-app.sh b/packaging/macosx/osx-app.sh index 8d2219242d..058bce0337 100755 --- a/packaging/macosx/osx-app.sh +++ b/packaging/macosx/osx-app.sh @@ -606,7 +606,7 @@ rpathify_file () { otool -L $1 \ | fgrep compatibility \ | cut -d\( -f1 \ - | egrep -v "$exclude_prefixes" \ + | egrep -v "$exclude_prefixes|$qt_frameworks_dir" \ | sort \ | uniq \ `" @@ -628,6 +628,42 @@ rpathify_file () { echo "Changing reference to $lib to $to in $1" /usr/bin/install_name_tool -change $lib $to $1 done + + if [ "$ui_toolkit" = "qt" ] ; then + # + # Rpathify the references to the Qt frameworks + # as necessary. + # + qt_frameworks="`\ + otool -L $lib_dep_search_list 2>/dev/null \ + | fgrep compatibility \ + | cut -d\( -f1 \ + | egrep "$qt_frameworks_dir/Qt[a-zA-Z0-9_]*\.framework/" \ + | sort \ + | uniq \ + `" + for framework in $qt_frameworks + do + # + # Get the pathname of the framework, + # with everything leading up to it + # stripped. + # + base=`echo $framework | sed 's;$qt_frameworks_dir/;;'` + # + # The framework will end up in a + # directory under the rpath; this + # is what we should change its file + # name to. + # + to=@rpath/$base + # + # Change the reference to that framework. + # + echo "Changing reference to $framework to $to in $1" + /usr/bin/install_name_tool -change $lib $to $1 + done + fi ;; esac fi -- cgit v1.2.1