summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorahoka <ahoka@pkgsrc.org>2009-08-27 20:03:17 +0000
committerahoka <ahoka@pkgsrc.org>2009-08-27 20:03:17 +0000
commit7d02d8889539d0733d11c5bec65f86e14a41c1cc (patch)
tree640766fe8527167662a38f3e4bd012220a75e543 /sysutils
parent570431f0737c5e0fb24282bb0f9ca0ce09fd521f (diff)
downloadpkgsrc-7d02d8889539d0733d11c5bec65f86e14a41c1cc.tar.gz
Add "model name" to the sysinfo hash table.
Fixes "Unknown CPU model" bug in gnome-system-monitor.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/libgtop/Makefile4
-rw-r--r--sysutils/libgtop/distinfo3
-rw-r--r--sysutils/libgtop/patches/patch-ad36
3 files changed, 40 insertions, 3 deletions
diff --git a/sysutils/libgtop/Makefile b/sysutils/libgtop/Makefile
index b7018718aeb..4682b21c63f 100644
--- a/sysutils/libgtop/Makefile
+++ b/sysutils/libgtop/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.27 2009/07/11 13:14:13 hasso Exp $
+# $NetBSD: Makefile,v 1.28 2009/08/27 20:03:17 ahoka Exp $
DISTNAME= libgtop-2.26.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.26/}
EXTRACT_SUFX= .tar.bz2
diff --git a/sysutils/libgtop/distinfo b/sysutils/libgtop/distinfo
index f01eab95e97..440c50282e7 100644
--- a/sysutils/libgtop/distinfo
+++ b/sysutils/libgtop/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2009/07/11 13:14:13 hasso Exp $
+$NetBSD: distinfo,v 1.16 2009/08/27 20:03:17 ahoka Exp $
SHA1 (libgtop-2.26.1.tar.bz2) = 758bbf69009c6bcfe2765de97e7027124c5a147e
RMD160 (libgtop-2.26.1.tar.bz2) = 5177aad953508b20d794d2390204b5b07bc364f5
@@ -6,6 +6,7 @@ Size (libgtop-2.26.1.tar.bz2) = 767089 bytes
SHA1 (patch-aa) = b056c00edebf3578364de50bcd1345bff67b45bc
SHA1 (patch-ab) = cd11ad54870ab54fb940f922c1cc55d1c7ec2161
SHA1 (patch-ac) = 3dd59355e36657df4c8575c35ef11c28d4192d77
+SHA1 (patch-ad) = 304b91c38fa9b39ffcfd2d39d9c382ecdc23469e
SHA1 (patch-ag) = 8ed7b66b4250dbc6f6321cef24941f58106fcbaf
SHA1 (patch-ai) = 856c457b14e384b2c991bf51274f97a3a9c853f1
SHA1 (patch-aj) = 94e41923f13732118e8e809a09ec4162bf2ca422
diff --git a/sysutils/libgtop/patches/patch-ad b/sysutils/libgtop/patches/patch-ad
new file mode 100644
index 00000000000..2168f106fc6
--- /dev/null
+++ b/sysutils/libgtop/patches/patch-ad
@@ -0,0 +1,36 @@
+$NetBSD: patch-ad,v 1.9 2009/08/27 20:03:17 ahoka Exp $
+
+--- sysdeps/bsd/sysinfo.c.orig 2009-08-27 14:29:56.000000000 +0200
++++ sysdeps/bsd/sysinfo.c
+@@ -36,6 +36,7 @@ static void
+ init_sysinfo (glibtop *server)
+ {
+ char *model;
++ char *brand;
+ guint64 ncpus = 1;
+ int mhz = 0;
+ size_t len;
+@@ -51,6 +52,12 @@ init_sysinfo (glibtop *server)
+ sysctlbyname ("hw.model", NULL, &len, NULL, 0);
+ model = g_malloc (len);
+ sysctlbyname ("hw.model", model, &len, NULL, 0);
++ if (sysctlbyname ("machdep.cpu_brand", NULL, &len, NULL, 0) != -1) {
++ brand = g_malloc (len);
++ sysctlbyname ("machdep.cpu_brand", brand, &len, NULL, 0);
++ } else {
++ brand = model;
++ }
+ len = sizeof (mhz);
+ sysctlbyname ("hw.clockrate", &mhz, &len, NULL, 0);
+
+@@ -73,6 +80,10 @@ init_sysinfo (glibtop *server)
+ g_hash_table_insert (cpuinfo->values, "vendor_id",
+ g_strdup(model));
+
++ g_ptr_array_add (cpuinfo->labels, "model name");
++ g_hash_table_insert (cpuinfo->values, "model name",
++ g_strdup(brand));
++
+ g_ptr_array_add (cpuinfo->labels, "cpu MHz");
+ g_hash_table_insert (cpuinfo->values, "cpu MHz",
+ g_strdup_printf("%d", mhz));