summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-11-23 11:42:38 +0000
committerjperkin <jperkin@pkgsrc.org>2013-11-23 11:42:38 +0000
commit0d10f8bc9118af6b2395aa0425e76b25642b7aed (patch)
tree7ec3ea2325a7be170fbc78875c44ec7c108a13c0 /mk
parent81bacd108bde6553853388890cff4ef422d9106d (diff)
downloadpkgsrc-0d10f8bc9118af6b2395aa0425e76b25642b7aed.tar.gz
Use xcrun to determine the full path to the SDK, and use the headers from
that location in the new find-headers infrastructure when they have not been installed into /usr/include. This allows us to remove the hardcoded builtins, as they can now be correctly determined automatically.
Diffstat (limited to 'mk')
-rw-r--r--mk/platform/Darwin.mk26
1 files changed, 13 insertions, 13 deletions
diff --git a/mk/platform/Darwin.mk b/mk/platform/Darwin.mk
index 59575609bf8..9dcb62f711b 100644
--- a/mk/platform/Darwin.mk
+++ b/mk/platform/Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.57 2013/11/01 12:22:32 jperkin Exp $
+# $NetBSD: Darwin.mk,v 1.58 2013/11/23 11:42:38 jperkin Exp $
#
# Variable definitions for the Darwin operating system.
@@ -71,9 +71,21 @@ _USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin
_OPSYS_EMULDIR.darwin= # empty
+#
+# From Xcode 5 onwards system headers are no longer installed by default
+# into /usr/include, so we need to query their location.
+#
+.if exists(/usr/bin/xcrun)
+OSX_SDK_PATH!= /usr/bin/xcrun --show-sdk-path
+.endif
+
_OPSYS_SYSTEM_RPATH?= /usr/lib
_OPSYS_LIB_DIRS?= /usr/lib
+.if exists(/usr/include)
_OPSYS_INCLUDE_DIRS?= /usr/include
+.elif exists(${OSX_SDK_PATH}/usr/include)
+_OPSYS_INCLUDE_DIRS?= ${OSX_SDK_PATH}/usr/include
+.endif
.if ${OS_VERSION:R} >= 6
_OPSYS_HAS_INET6= yes # IPv6 is standard
@@ -101,18 +113,6 @@ KRB5_DEFAULT?= mit-krb5
.if !empty(OS_VERSION:M[56].*)
USE_BUILTIN.dl= no # Darwin-[56].* uses devel/dlcompat
.endif
-#
-# OSX Mavericks and Xcode 5 no longer ship /usr/include headers, moving them
-# instead to SDK-specific locations. This breaks various builtin header
-# checks, so we simply override builtins here that we know exist.
-#
-.if ${OS_VERSION:R} >= 13
-IS_BUILTIN.db1= yes
-IS_BUILTIN.dl= yes
-IS_BUILTIN.pthread= yes
-IS_BUILTIN.termcap= yes
-IS_BUILTIN.terminfo= yes
-.endif
# Builtin defaults which make sense for this platform.
_OPSYS_PREFER.linux-pam?= native