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:   nia
Date:           Fri Jul 22 09:14:43 UTC 2022

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

Log Message:
mk: When calculating OPSYS_VERSION, use the userland version (/etc/release)
on NetBSD, rather than the kernel version. Should resolve building
packages with workarounds for -9 on a -9 userland and CURRENT kernel.

Thanks to Hauke Fath for the hint.


To generate a diff of this commit:
cvs rdiff -u -r1.422 -r1.423 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.422 pkgsrc/mk/bsd.prefs.mk:1.423
--- pkgsrc/mk/bsd.prefs.mk:1.422        Tue Jun  7 10:04:25 2022
+++ pkgsrc/mk/bsd.prefs.mk      Fri Jul 22 09:14:43 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.422 2022/06/07 10:04:25 jperkin Exp $
+# $NetBSD: bsd.prefs.mk,v 1.423 2022/07/22 09:14:43 nia Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -113,8 +113,14 @@ MAKEFLAGS+=                OS_VERSION=${OS_VERSION:Q}
 # it to a custom command in the later OPSYS-specific section.
 #
 .if !defined(OPSYS_VERSION)
+.  if ${OPSYS} == "NetBSD" && exists(/etc/release)
+_OPSYS_VERSION_CMD=    head -1 /etc/release | \
+                       sed -e "s,^NetBSD ,,g" | \
+                       awk -F. '{major=int($$1); minor=int($$2); if (minor>=100) minor=99; patch=int($$3); if (patch>=100) patch=99; printf "%02d%02d%02d", major, minor, patch}'
+.  else
 _OPSYS_VERSION_CMD=    ${UNAME} -r | \
                        awk -F. '{major=int($$1); minor=int($$2); if (minor>=100) minor=99; patch=int($$3); if (patch>=100) patch=99; printf "%02d%02d%02d", major, minor, patch}'
+.  endif
 OPSYS_VERSION=         ${_OPSYS_VERSION_CMD:sh}
 MAKEFLAGS+=            OPSYS_VERSION=${OPSYS_VERSION:Q}
 .endif



Home | Main Index | Thread Index | Old Index