diff options
Diffstat (limited to 'sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch')
-rw-r--r-- | sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch b/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch deleted file mode 100644 index d38d966..0000000 --- a/sys-apps/portage/files/portage-2.2.7-macho-relative-install_names.patch +++ /dev/null @@ -1,68 +0,0 @@ -commit e1fbd70801e93a5b77febc6c9e95ad43d0ecabbb -Author: Fabian Groffen <grobian@gentoo.org> -Date: Sun Dec 22 14:45:31 2013 +0100 - - install_qa_check_macho: allow relative install_names - - relative install_names (@..../) will be used in binaries a lot, and if - they are provided as such, there is nothing wrong with it. Since they - disallow us to do any checks, we just do the least check we can do, - which is for the install_name self-reference. We want to find the - library that points to in the install image, if not, it must be wrong. - -diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh -index 129f7d3..83004df 100644 ---- a/bin/misc-functions.sh -+++ b/bin/misc-functions.sh -@@ -1049,6 +1049,15 @@ install_qa_check_macho() { - rm -f "${T}/mach-o.check" - fi - -+ install_name_is_relative() { -+ case $1 in -+ "@executable_path/"*) return 0 ;; -+ "@loader_path"/*) return 0 ;; -+ "@rpath/"*) return 0 ;; -+ *) return 1 ;; -+ esac -+ } -+ - # While we generate the NEEDED files, check that we don't get kernel - # traps at runtime because of broken install_names on Darwin. - rm -f "${T}"/.install_name_check_failed -@@ -1061,6 +1070,17 @@ install_qa_check_macho() { - # See if the self-reference install_name points to an existing - # and to be installed file. This usually is a symlink for the - # major version. -+ if install_name_is_relative ${install_name} ; then -+ # try to locate the library in the installed image -+ local inpath=${install_name#@*/} -+ local libl -+ for libl in $(find "${ED}" -name "${inpath##*/}") ; do -+ if [[ ${libl} == */${inpath} ]] ; then -+ install_name=/${libl#${D}} -+ break -+ fi -+ done -+ fi - if [[ ! -e ${D}${install_name} ]] ; then - eqawarn "QA Notice: invalid self-reference install_name ${install_name} in ${obj}" - # remember we are in an implicit subshell, that's -@@ -1077,7 +1097,7 @@ install_qa_check_macho() { - elif [[ ${lib} == ${S}* ]] ; then - eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}" - touch "${T}"/.install_name_check_failed -- elif [[ ! -e ${lib} && ! -e ${D}${lib} && ${lib} != "@executable_path/"* && ${lib} != "@loader_path/"* ]] ; then -+ elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then - eqawarn "QA Notice: invalid reference to ${lib} in ${obj}" - # remember we are in an implicit subshell, that's - # why we touch a file here ... ideally we should be -@@ -1086,7 +1106,7 @@ install_qa_check_macho() { - fi - done - -- # backwards compatability -+ # backwards compatibility - echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED - # what we use - echo "${arch};${obj};${install_name};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.MACHO.3 |