pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk bsd.prefs.mk: set OS_VARIANT=Microsoft if used unde...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/01e7bab6e7fa
branches:  trunk
changeset: 389685:01e7bab6e7fa
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Sun Jan 06 12:51:45 2019 +0000

description:
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:

 mk/bsd.prefs.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 20f462f9e547 -r 01e7bab6e7fa mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Sun Jan 06 11:28:47 2019 +0000
+++ b/mk/bsd.prefs.mk   Sun Jan 06 12:51:45 2019 +0000
@@ -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?=          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}



Home | Main Index | Thread Index | Old Index