Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/bootstrap bootstrap: Overhaul Darwin version selection.
details: https://anonhg.NetBSD.org/pkgsrc/rev/a1b5e6ffa3fc
branches: trunk
changeset: 434964:a1b5e6ffa3fc
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Jun 29 12:38:03 2020 +0000
description:
bootstrap: Overhaul Darwin version selection.
With the upcoming Big Sur release we can't assume that the major version will
always be 10. Creating a combined major and minor version number also allows
us to simplify and future-proof some tests.
Should be no functional change.
diffstat:
bootstrap/bootstrap | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diffs (61 lines):
diff -r 6b4e0d36cda2 -r a1b5e6ffa3fc bootstrap/bootstrap
--- a/bootstrap/bootstrap Mon Jun 29 12:14:01 2020 +0000
+++ b/bootstrap/bootstrap Mon Jun 29 12:38:03 2020 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.282 2020/06/29 12:01:38 jperkin Exp $
+# $NetBSD: bootstrap,v 1.283 2020/06/29 12:38:03 jperkin Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
# All rights reserved.
@@ -573,34 +573,35 @@
whoamiprog='id -u'
groupsprog='id -g'
;;
-
Darwin)
root_group=wheel
- need_awk=yes
- need_sed=yes
machine_arch=`get_machine_arch_darwin`
CC=${CC:-"cc -isystem /usr/include"}; export CC
check_compiler=yes
osrev=`uname -r`
- macosx_version=`echo $osrev | awk -F . '{ print "10."$1-4; }'`
- case "$macosx_version" in
- 10.[7-9])
+
+ # Combine major.minor product version for simpler numerical tests.
+ macos_version=`sw_vers -productVersion | awk -F. '{print $1 $2}'`
+
+ # Newer native sed does not support multibyte correctly.
+ if [ $macos_version -ge 1008 ]; then
+ need_awk=yes
+ need_sed=yes
+ fi
+
+ case "$macos_version" in
+ 100[7-9])
packagemaker=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
;;
- 10.[0-4])
+ 100[0-4])
packagemaker=/Developer/Tools/packagemaker
;;
*)
packagemaker=/Developer/usr/bin/packagemaker
;;
esac
- case "$macosx_version" in
- 10.[0-7])
- need_awk=no
- need_sed=no
- ;;
- esac
- unset osrev macosx_version
+
+ unset osrev macos_version
;;
DragonFly)
root_group=wheel
Home |
Main Index |
Thread Index |
Old Index