summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2009-01-02 19:30:31 +0000
committerabs <abs@pkgsrc.org>2009-01-02 19:30:31 +0000
commitf1358c3bcfaa97b466547006b5f3edd3f75c5e45 (patch)
tree23b4a391704f42ed3a84603be04abb2d44f5f225 /devel
parentac3653567c24508cfb1bee34ccbf37933561274e (diff)
downloadpkgsrc-f1358c3bcfaa97b466547006b5f3edd3f75c5e45.tar.gz
Updated devel/cpuflags to 1.30
NetBSD changes: - Correctly decode the cpu 'features' lines - Also decode the cpu family and model data
Diffstat (limited to 'devel')
-rw-r--r--devel/cpuflags/Makefile4
-rwxr-xr-xdevel/cpuflags/files/subr_NetBSD11
2 files changed, 10 insertions, 5 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index 4911c2b28a9..571383713dc 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.136 2008/12/31 14:49:54 abs Exp $
+# $NetBSD: Makefile,v 1.137 2009/01/02 19:30:31 abs Exp $
-DISTNAME= cpuflags-1.30
+DISTNAME= cpuflags-1.31
CATEGORIES= devel sysutils
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/devel/cpuflags/files/subr_NetBSD b/devel/cpuflags/files/subr_NetBSD
index 06cd26a0b10..7229472f5d7 100755
--- a/devel/cpuflags/files/subr_NetBSD
+++ b/devel/cpuflags/files/subr_NetBSD
@@ -1,4 +1,4 @@
-# $NetBSD: subr_NetBSD,v 1.8 2008/12/10 23:27:17 abs Exp $
+# $NetBSD: subr_NetBSD,v 1.9 2009/01/02 19:30:31 abs Exp $
AWK=awk
SED=sed
@@ -43,14 +43,19 @@ extract_x86_cpu_vars()
# Set: cpu_feature_FOO=1 for each 'FOO' feature reported
# cpu_name="NAME" taken from the first cpu0: line
# cpu_brand="BRAND" the CPU branding string
- echo "$cpu_details" | $AWK -F , '
+ echo "$cpu_details" | $AWK '
{ if (/cpu0:/ && !n) { sub("cpu0: ",""); n=1; print "cpu_name=\""$0"\"" } }
/cpu0: ".*"/ { sub("[^\"]*", ""); print "cpu_brand="$0 }
/cpu0: features/ {
sub(".*<","");
sub(">.*","");
gsub("[^,A-Z0-9]","_");
- for (i = 1; i < NR; i++) { print "cpu_feature_"$i"=1" }
+ split($0, features, /,/)
+ for (f in features)
+ print "cpu_feature_"features[f]"=1";
+ }
+ /cpu0: family/ {
+ for (i = 2; i < NF; i = i + 2) { print "cpu_"$i"="($(i+1) + 0) }
}
'
}