pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Fri Nov  3 18:07:40 UTC 2017

Modified Files:
        pkgsrc/mk: bsd.prefs.mk

Log Message:
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@


To generate a diff of this commit:
cvs rdiff -u -r1.393 -r1.394 pkgsrc/mk/bsd.prefs.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.393 pkgsrc/mk/bsd.prefs.mk:1.394
--- pkgsrc/mk/bsd.prefs.mk:1.393        Sun Jul  9 14:30:07 2017
+++ pkgsrc/mk/bsd.prefs.mk      Fri Nov  3 18:07:40 2017
@@ -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}



Home | Main Index | Thread Index | Old Index