pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Support OS_VARIANT on Linux, support ChromeOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/457380e7c4c7
branches:  trunk
changeset: 371105:457380e7c4c7
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Fri Nov 03 18:07:40 2017 +0000

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

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

diffs (33 lines):

diff -r c85a36ae05a8 -r 457380e7c4c7 mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Fri Nov 03 17:16:24 2017 +0000
+++ b/mk/bsd.prefs.mk   Fri Nov 03 18:07:40 2017 +0000
@@ -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 @@
 .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?=         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}



Home | Main Index | Thread Index | Old Index