pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/platform mk: Set _OPSYS_LIB_DIRS to the SDK directo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a1230e2cdf0b
branches:  trunk
changeset: 440506:a1230e2cdf0b
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Oct 09 17:43:48 2020 +0000

description:
mk: Set _OPSYS_LIB_DIRS to the SDK directory on Big Sur.

This is required for find-libs.mk to continue detecting the presence of
libraries supported by the system.  It's definitely not ideal, and only
still works because Apple happens to ship .tdb files for each library, and
these are found via the current "lib${_lib_}.*" glob.

Patch taken from sjmulder@, I only limited it to Big Sur for now in case
there are issues using the SDK directory on older releases.

diffstat:

 mk/platform/Darwin.mk |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 1589c13e34e7 -r a1230e2cdf0b mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk     Fri Oct 09 16:15:54 2020 +0000
+++ b/mk/platform/Darwin.mk     Fri Oct 09 17:43:48 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.99 2020/10/09 16:00:16 jperkin Exp $
+# $NetBSD: Darwin.mk,v 1.100 2020/10/09 17:43:48 jperkin Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -85,7 +85,6 @@
 _OPSYS_EMULDIR.darwin= # empty
 
 _OPSYS_SYSTEM_RPATH?=  /usr/lib
-_OPSYS_LIB_DIRS?=      /usr/lib
 
 .if !defined(OSX_VERSION)
 OSX_VERSION!=          sw_vers -productVersion
@@ -124,10 +123,16 @@
 # Newer macOS releases remove library files from the file system.  The only way
 # to test them is via dlopen(), which is obviously impractical for many things.
 #
-# This define turns off anything that can't reasonably supported this.
+# The DARWIN_NO_SYSTEM_LIBS define turns off anything that can't reasonably
+# support this.  We also need to set _OPSYS_LIB_DIRS for find-libs.mk to look
+# in the SDK directory.  It may be that this can be set for all versions, but
+# for now keep the legacy behaviour and limit it to Big Sur onwards only.
 #
 .if ${OS_VERSION:R} >= 20
 DARWIN_NO_SYSTEM_LIBS= # defined
+_OPSYS_LIB_DIRS?=      ${OSX_SDK_PATH}/usr/lib
+.else
+_OPSYS_LIB_DIRS?=      /usr/lib
 .endif
 
 .if ${OS_VERSION:R} >= 6



Home | Main Index | Thread Index | Old Index