summaryrefslogtreecommitdiff
path: root/mk/platform
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2020-10-09 17:43:48 +0000
committerjperkin <jperkin@pkgsrc.org>2020-10-09 17:43:48 +0000
commite4788c4339880a5dcda8e1ad7798a2191f3252f7 (patch)
tree8e67f9432484bb5d677648cb832db4deb87aa2a4 /mk/platform
parentabb17f7fdfa863346028334700f481763baa7cac (diff)
downloadpkgsrc-e4788c4339880a5dcda8e1ad7798a2191f3252f7.tar.gz
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 (limited to 'mk/platform')
-rw-r--r--mk/platform/Darwin.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk
index dbdab98d3cd..ccd149d3b0f 100644
--- a/mk/platform/Darwin.mk
+++ b/mk/platform/Darwin.mk
@@ -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 @@ _USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin
_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 @@ PKG_FAIL_REASON+= "No suitable Xcode SDK or Command Line Tools installed."
# 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