Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: bin/
Date: Sat, 28 Nov 2020 19:37:06
Message-Id: 1606592168.c3a69ee41aa0dd40342e05c7e275f82f31744ae1.grobian@gentoo
1 commit: c3a69ee41aa0dd40342e05c7e275f82f31744ae1
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 28 19:36:08 2020 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 28 19:36:08 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c3a69ee4
7
8 bin/misc-functions: resolve libraries from macOS SDK if configured
9
10 Bug: https://bugs.gentoo.org/757240
11 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
12
13 bin/misc-functions.sh | 24 +++++++++++++++++++++---
14 1 file changed, 21 insertions(+), 3 deletions(-)
15
16 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
17 index d01a8edb1..8f62cb7f1 100755
18 --- a/bin/misc-functions.sh
19 +++ b/bin/misc-functions.sh
20 @@ -360,9 +360,27 @@ install_qa_check_macho() {
21 elif [[ ${lib} == ${S}* ]] ; then
22 eqawarn "QA Notice: install_name references \${S}: ${lib} in ${obj}"
23 [[ -z ${ignore} ]] && touch "${T}"/.install_name_check_failed
24 - elif ! install_name_is_relative ${lib} && [[ ! -e ${lib} && ! -e ${D}${lib} ]] ; then
25 - eqawarn "QA Notice: invalid reference to ${lib} in ${obj}"
26 - [[ -z ${ignore} ]] && touch "${T}"/.install_name_check_failed
27 + elif ! install_name_is_relative ${lib} ; then
28 + local isok=no
29 + if [[ -e ${lib} || -e ${D}${lib} ]] ; then
30 + isok=yes # yay, we're ok
31 + elif [[ -e "${EROOT}"/MacOSX.sdk ]] ; then
32 + # trigger SDK mode, at least since Big Sur (11.0)
33 + # there are no libraries in /usr/lib any more, but
34 + # there are references too it (some library cache is
35 + # in place), yet we can validate it sort of is sane
36 + # by looking at the SDK metacaches, TAPI-files, .tbd
37 + # text versions of libraries, so just look there
38 + local tbd=${lib%.*}.tbd
39 + if [[ -e ${EROOT}/MacOSX.sdk/${tbd} ]] ; then
40 + isok=yes # it's in the SDK, so ok
41 + fi
42 + fi
43 + if [[ ${isok} == no ]] ; then
44 + eqawarn "QA Notice: invalid reference to ${lib} in ${obj}"
45 + [[ -z ${ignore} ]] && \
46 + touch "${T}"/.install_name_check_failed
47 + fi
48 fi
49 done