From c49d80f2001524c38313582ec1974a9e4f703489 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 13 Mar 2021 17:27:48 +0000 Subject: [PATCH] Lib/ctypes/macholib/dyld.py: tweak search paths for Prefix We need to tweak: * DEFAULT_FRAMEWORK_FALLBACK * DEFAULT_LIBRARY_FALLBACK for macOS within Gentoo Prefix. These paths ignore the prefix and search the system for frameworks and compiled libraries which may not be compatible with versions inside the Prefix. I've opted to keep the system versions but give priority to Prefix locations. It's expected that we sed ${EPREFIX} in the ebuild with the true value. Closes: https://bugs.gentoo.org/775839 Signed-off-by: Sam James --- Lib/ctypes/macholib/dyld.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/ctypes/macholib/dyld.py b/Lib/ctypes/macholib/dyld.py index 1c3f8fd..5599e12 100644 --- a/Lib/ctypes/macholib/dyld.py +++ b/Lib/ctypes/macholib/dyld.py @@ -20,6 +20,7 @@ __all__ = [ # These are the defaults as per man dyld(1) # DEFAULT_FRAMEWORK_FALLBACK = [ + "${EPREFIX}/MacOSX.sdk/System/Library/Frameworks", os.path.expanduser("~/Library/Frameworks"), "/Library/Frameworks", "/Network/Library/Frameworks", @@ -27,6 +28,9 @@ DEFAULT_FRAMEWORK_FALLBACK = [ ] DEFAULT_LIBRARY_FALLBACK = [ + "${EPREFIX}/lib", + "${EPREFIX}/usr/lib", + "${EPREFIX}/usr/local/lib", os.path.expanduser("~/lib"), "/usr/local/lib", "/lib", -- 2.30.2