summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorbsiegert <bsiegert@pkgsrc.org>2019-01-06 12:51:45 +0000
committerbsiegert <bsiegert@pkgsrc.org>2019-01-06 12:51:45 +0000
commit58abf543c9564eb4284414b0c45ff09d927831c5 (patch)
tree153dbbe360318443727b5569a0acbec12fb5f1ec /mk
parentcad1d87b46277d7bcd8408f1129ba3006cf5ca89 (diff)
downloadpkgsrc-58abf543c9564eb4284414b0c45ff09d927831c5.tar.gz
bsd.prefs.mk: set OS_VARIANT=Microsoft if used under WSL.
WSL is Windows Services for Linux, aka "bash on Ubuntu on Windows". Some packages need to differentiate plain Linux and running on WSL. Patch from David Weller-Fahy via PR pkg/53806.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.prefs.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 237a37c22a6..a81de9ef737 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.402 2018/11/12 14:22:58 jperkin Exp $
+# $NetBSD: bsd.prefs.mk,v 1.403 2019/01/06 12:51:45 bsiegert Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -226,7 +226,11 @@ LOWER_VENDOR?= chromeos
LOWER_VENDOR?= pc
. endif
LOWER_VENDOR?= unknown
+OS_VARIANT!= ${UNAME} -r
+OS_VARIANT:= ${OS_VARIANT:C/^.*-//}
+. if ${OS_VARIANT} != "Microsoft"
OS_VARIANT= ${LOWER_VENDOR}
+. endif
. if !defined(HOST_MACHINE_ARCH)
HOST_MACHINE_ARCH!= ${UNAME} -m
MAKEFLAGS+= HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q}