summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorrecht <recht>2004-03-09 20:39:50 +0000
committerrecht <recht>2004-03-09 20:39:50 +0000
commit4add0da8a083b0564262497516fafa39ab8db2a0 (patch)
treec489d94b9c0bb61d31fe2861b6a0882ef15b90af /mk/bsd.prefs.mk
parent934967b0b9ad5de047ad7f3d7d2b8e3a49bffb5e (diff)
downloadpkgsrc-4add0da8a083b0564262497516fafa39ab8db2a0.tar.gz
Add LOWER_OPSYS_VERSUFFIX on FreeBSD platforms, so that the major
number is included in MACHINE_GNU_PLATFORM. Fixes at least the build of wip/mingw-gcc. Patch based upon the one provided by Michal Pasternak in PR 23856.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 47e61fa57c8..70b871d0ee3 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.155 2004/02/18 13:32:38 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.156 2004/03/09 20:39:50 recht Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -37,6 +37,14 @@ UNAME=/bin/uname
UNAME=echo Unknown
.endif
+.if exists(/usr/bin/cut)
+CUT=/usr/bin/cut
+.elif exists(/bin/cut)
+CUT=/bin/cut
+.else
+CUT=echo Unknown
+.endif
+
.ifndef OPSYS
OPSYS!= ${UNAME} -s | tr -d /
.endif
@@ -82,6 +90,7 @@ LOWER_OPSYS?= freebsd
LOWER_ARCH!= ${UNAME} -p
MACHINE_ARCH= ${LOWER_ARCH}
MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH}
+LOWER_OPSYS_VERSUFFIX!= echo ${LOWER_OS_VERSION} | ${CUT} -c -1
. if ${LOWER_ARCH} == "i386"
LOWER_VENDOR?= pc
. else