Fri Oct 30 17:28:25 2020 UTC ()
mk/platform: Use string comparison for Darwin version.

Fixes SDK detection on 11.0.1, where 11 = 11.0 when compared numerically,
leading to the SDK path for "macos11.0.1" not being found.


(jperkin)
diff -r1.100 -r1.101 pkgsrc/mk/platform/Darwin.mk

cvs diff -r1.100 -r1.101 pkgsrc/mk/platform/Darwin.mk (expand / switch to unified diff)

--- pkgsrc/mk/platform/Darwin.mk 2020/10/09 17:43:48 1.100
+++ pkgsrc/mk/platform/Darwin.mk 2020/10/30 17:28:25 1.101
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Darwin.mk,v 1.100 2020/10/09 17:43:48 jperkin Exp $ 1# $NetBSD: Darwin.mk,v 1.101 2020/10/30 17:28:25 jperkin Exp $
2# 2#
3# Variable definitions for the Darwin operating system. 3# Variable definitions for the Darwin operating system.
4 4
5# OS, Kernel, Xcode Version 5# OS, Kernel, Xcode Version
6# Note that Xcode gets updates on older systems sometimes. 6# Note that Xcode gets updates on older systems sometimes.
7# pkgsrc generally expects that the most up-to-date xcode available for 7# pkgsrc generally expects that the most up-to-date xcode available for
8# an OS version is installed 8# an OS version is installed
9# 9#
10# Codename OS Kernel Xcode 10# Codename OS Kernel Xcode
11# Cheetah 10.0.x 1.3.1 11# Cheetah 10.0.x 1.3.1
12# Puma 10.1 1.4.1 12# Puma 10.1 1.4.1
13# 10.1.x 5.x.y 13# 10.1.x 5.x.y
14# Jaguar 10.2.x 6.x.y 14# Jaguar 10.2.x 6.x.y
@@ -78,27 +78,27 @@ ULIMIT_CMD_stacksize?= ulimit -s `ulimit @@ -78,27 +78,27 @@ ULIMIT_CMD_stacksize?= ulimit -s `ulimit
78ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t` 78ULIMIT_CMD_cputime?= ulimit -t `ulimit -H -t`
79 79
80GROUPADD?= ${LOCALBASE}/sbin/groupadd 80GROUPADD?= ${LOCALBASE}/sbin/groupadd
81USERADD?= ${LOCALBASE}/sbin/useradd 81USERADD?= ${LOCALBASE}/sbin/useradd
82_PKG_USER_HOME?= /var/empty # to match other system accounts 82_PKG_USER_HOME?= /var/empty # to match other system accounts
83_USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin 83_USER_DEPENDS= user-darwin>=20130712:../../sysutils/user_darwin
84 84
85_OPSYS_EMULDIR.darwin= # empty 85_OPSYS_EMULDIR.darwin= # empty
86 86
87_OPSYS_SYSTEM_RPATH?= /usr/lib 87_OPSYS_SYSTEM_RPATH?= /usr/lib
88 88
89.if !defined(OSX_VERSION) 89.if !defined(OSX_VERSION)
90OSX_VERSION!= sw_vers -productVersion 90OSX_VERSION!= sw_vers -productVersion
91. if ${OSX_VERSION:R:R} != ${OSX_VERSION:R} 91. if "${OSX_VERSION:R:R}" != "${OSX_VERSION:R}"
92OSX_VERSION:= ${OSX_VERSION:R} 92OSX_VERSION:= ${OSX_VERSION:R}
93. endif 93. endif
94MAKEFLAGS+= OSX_VERSION=${OSX_VERSION:Q} 94MAKEFLAGS+= OSX_VERSION=${OSX_VERSION:Q}
95.endif 95.endif
96 96
97# 97#
98# From Xcode 5 onwards system headers are no longer installed by default 98# From Xcode 5 onwards system headers are no longer installed by default
99# into /usr/include, so we need to query their location if /usr/include is 99# into /usr/include, so we need to query their location if /usr/include is
100# not available. 100# not available.
101# 101#
102# Use current system version SDK (avoid newer SDKs). 102# Use current system version SDK (avoid newer SDKs).
103# 103#
104.if exists(/usr/include/stdio.h) 104.if exists(/usr/include/stdio.h)