diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2017-11-03 18:07:40 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2017-11-03 18:07:40 +0000 |
commit | 35ff76672fccb55fd57672710ea07897a1dc308f (patch) | |
tree | 366aafc4c4c2723ccdd7226a69d957035b38e35f /mk/bsd.prefs.mk | |
parent | 09dd81310c25225936b7f5f2a893f1a785268e3c (diff) | |
download | pkgsrc-35ff76672fccb55fd57672710ea07897a1dc308f.tar.gz |
Support OS_VARIANT on Linux, support ChromeOS.
This adds a detection for Chrome OS and Chromium OS based on /etc/lsb-release,
which sets LOWER_VENDOR, like for other Linux distros. It also sets OS_VARIANT
to the value of LOWER_VENDOR, so we can have conditionals for ChromeOS. It is
missing some things that are silently assumed to be part of Linux base
systems, such as POSIX attr support, NIS and more.
ok jperkin@
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r-- | mk/bsd.prefs.mk | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 9365a38d799..2704e90ca2f 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.393 2017/07/09 14:30:07 khorben Exp $ +# $NetBSD: bsd.prefs.mk,v 1.394 2017/11/03 18:07:40 bsiegert Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -207,6 +207,9 @@ LOWER_VENDOR?= sgi .elif ${OPSYS} == "Linux" OS_VERSION:= ${OS_VERSION:C/-.*$//} LOWER_OPSYS?= linux +. if exists(/etc/lsb-release) +CHROMEOS_RELEASE_NAME!= awk -F = '$$1 == "CHROMEOS_RELEASE_NAME" { print $$2 }' /etc/lsb-release +. endif . if exists(/etc/debian_version) LOWER_VENDOR?= debian . elif exists(/etc/mandrake-release) @@ -217,10 +220,13 @@ LOWER_VENDOR?= redhat LOWER_VENDOR?= slackware . elif exists(/etc/ssdlinux_version) LOWER_VENDOR?= ssd +. elif !empty(CHROMEOS_RELEASE_NAME) +LOWER_VENDOR?= chromeos . elif ${MACHINE_ARCH} == "i386" LOWER_VENDOR?= pc . endif LOWER_VENDOR?= unknown +OS_VARIANT= ${LOWER_VENDOR} . if !defined(HOST_MACHINE_ARCH) HOST_MACHINE_ARCH!= ${UNAME} -m MAKEFLAGS+= HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q} |