Also store the install_name, we need it to detect the group of files/symlinks that...
authorFabian Groffen <grobian@gentoo.org>
Sun, 4 May 2008 09:14:18 +0000 (09:14 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sun, 4 May 2008 09:14:18 +0000 (09:14 -0000)
svn path=/main/branches/prefix/; revision=10173

bin/misc-functions.sh

index bf1606ad1b6fadee50b3fa3861bb0c5bf7ff627d..cc4fb8894da5df13f5bbbf77d8d6695026739ece 100644 (file)
@@ -375,11 +375,15 @@ install_qa_check() {
        rm -f "${T}"/.install_name_check_failed
        [[ ${CHOST} == *-darwin* ]] && find "${ED}" -type f | while IFS= read f ; do
                rm -f "${T}"/.NEEDED.tmp
+               install_name=$(otool -DX "${f}")
                otool -LX "${f}" \
                        | grep -v "Archive : " \
                        | sed -e 's/^\t//' -e 's/ (compa.*$//' \
                        | while read r ;
                do
+                       # skip the self reference in libraries
+                       [[ -n ${install_name} && ${install_name} == ${r} ]] && continue
+
                        if [[ ! -e ${r} && ! -e ${D}${r} && ${r} != *"@executable_path"* ]] ; then
                                # try to "repair" this if possible, happens because of
                                # gen_usr_ldscript tactics
@@ -401,7 +405,7 @@ install_qa_check() {
                done
                if [[ -f "${T}"/.NEEDED.tmp ]] ; then
                        needed=$(< "${T}"/.NEEDED.tmp)
-                       echo "/${f#${D}};${needed#,}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.MACHO.2
+                       echo "/${f#${D}};${install_name};${needed#,}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.MACHO.2
                fi
        done
        if [[ -f ${T}/.install_name_check_failed ]] ; then