pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/cpuflags Updated devel/cpuflags to 1.30



details:   https://anonhg.NetBSD.org/pkgsrc/rev/69f3ced383f8
branches:  trunk
changeset: 552189:69f3ced383f8
user:      abs <abs%pkgsrc.org@localhost>
date:      Fri Jan 02 19:30:31 2009 +0000

description:
Updated devel/cpuflags to 1.30

NetBSD changes:
 - Correctly decode the cpu 'features' lines
 - Also decode the cpu family and model data

diffstat:

 devel/cpuflags/Makefile          |   4 ++--
 devel/cpuflags/files/subr_NetBSD |  11 ++++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (43 lines):

diff -r fbfe11daa354 -r 69f3ced383f8 devel/cpuflags/Makefile
--- a/devel/cpuflags/Makefile   Fri Jan 02 02:55:43 2009 +0000
+++ b/devel/cpuflags/Makefile   Fri Jan 02 19:30:31 2009 +0000
@@ -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 -r fbfe11daa354 -r 69f3ced383f8 devel/cpuflags/files/subr_NetBSD
--- a/devel/cpuflags/files/subr_NetBSD  Fri Jan 02 02:55:43 2009 +0000
+++ b/devel/cpuflags/files/subr_NetBSD  Fri Jan 02 19:30:31 2009 +0000
@@ -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 @@
     # 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) }
        }
     '
     }



Home | Main Index | Thread Index | Old Index