diff options
author | jperkin <jperkin@pkgsrc.org> | 2016-04-28 22:18:58 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2016-04-28 22:18:58 +0000 |
commit | 5e591f862ded95606e975adf45170b3725129d76 (patch) | |
tree | 5218d55ad1610309182f7b89ca67e00a19d3aaf0 /sysutils/libgtop | |
parent | 06f29893ff4a365a60093ad834a8e521a4cd192a (diff) | |
download | pkgsrc-5e591f862ded95606e975adf45170b3725129d76.tar.gz |
Fix SunOS cpu and network interface detection. Bump PKGREVISION.
Diffstat (limited to 'sysutils/libgtop')
-rw-r--r-- | sysutils/libgtop/Makefile | 4 | ||||
-rw-r--r-- | sysutils/libgtop/distinfo | 6 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-sysdeps_solaris_netlist.c | 15 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-sysdeps_solaris_netload.c | 15 | ||||
-rw-r--r-- | sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c | 33 |
5 files changed, 63 insertions, 10 deletions
diff --git a/sysutils/libgtop/Makefile b/sysutils/libgtop/Makefile index b9061a3fd2d..69d260b9327 100644 --- a/sysutils/libgtop/Makefile +++ b/sysutils/libgtop/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.51 2016/04/07 11:54:57 youri Exp $ +# $NetBSD: Makefile,v 1.52 2016/04/28 22:18:58 jperkin Exp $ DISTNAME= libgtop-2.28.4 -PKGREVISION= 8 +PKGREVISION= 9 CATEGORIES= sysutils gnome MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.28/} EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/libgtop/distinfo b/sysutils/libgtop/distinfo index fcd6c0bd20b..b1ae7c181b4 100644 --- a/sysutils/libgtop/distinfo +++ b/sysutils/libgtop/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.31 2016/04/07 11:54:57 youri Exp $ +$NetBSD: distinfo,v 1.32 2016/04/28 22:18:58 jperkin Exp $ SHA1 (libgtop-2.28.4.tar.bz2) = b6f002cc80a61dc0908dd96e0b543113a46bc4b7 RMD160 (libgtop-2.28.4.tar.bz2) = 96ac76aa409bbd202bedacd94df14cd549e10d6b @@ -43,4 +43,6 @@ SHA1 (patch-sysdeps_darwin_glibtop__suid.h) = 1887511f74e27c7ed628ae37d5eec173db SHA1 (patch-sysdeps_darwin_proclist.c) = ee8e4df9376f4516787ae2e25453de6d871357d2 SHA1 (patch-sysdeps_freebsd_procwd.c) = 89961a4115785809b1a1dc5dd07f263cf35cf1b8 SHA1 (patch-sysdeps_solaris_glibtop__server.h) = ed3a657ecc024d0d5edc3d436e593b86ed39d726 -SHA1 (patch-sysdeps_solaris_procopenfiles.c) = 8aef9e53cdd9d2e13a964e0cde43e71b507fcfa5 +SHA1 (patch-sysdeps_solaris_netlist.c) = f26cfcee588fc40ad550bcd219d9538d20095e62 +SHA1 (patch-sysdeps_solaris_netload.c) = e4ba72bf3855621eab0c05918da2094165f158cb +SHA1 (patch-sysdeps_solaris_procopenfiles.c) = efd621e3e9e45ba65e7f2b1f7c94ffdb79b6d199 diff --git a/sysutils/libgtop/patches/patch-sysdeps_solaris_netlist.c b/sysutils/libgtop/patches/patch-sysdeps_solaris_netlist.c new file mode 100644 index 00000000000..524c5cfc38f --- /dev/null +++ b/sysutils/libgtop/patches/patch-sysdeps_solaris_netlist.c @@ -0,0 +1,15 @@ +$NetBSD: patch-sysdeps_solaris_netlist.c,v 1.1 2016/04/28 22:18:58 jperkin Exp $ + +Find correct network interfaces. + +--- sysdeps/solaris/netlist.c.orig 2011-06-01 15:40:47.000000000 +0000 ++++ sysdeps/solaris/netlist.c +@@ -57,7 +57,7 @@ glibtop_get_netlist_s (glibtop *server, + + for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) + { +- if (strcmp(ksp->ks_class, "net") != 0) ++ if (strcmp(ksp->ks_module, "link") != 0) + continue; + + g_ptr_array_add(devices, g_strdup(ksp->ks_name)); diff --git a/sysutils/libgtop/patches/patch-sysdeps_solaris_netload.c b/sysutils/libgtop/patches/patch-sysdeps_solaris_netload.c new file mode 100644 index 00000000000..35daf19439b --- /dev/null +++ b/sysutils/libgtop/patches/patch-sysdeps_solaris_netload.c @@ -0,0 +1,15 @@ +$NetBSD: patch-sysdeps_solaris_netload.c,v 1.1 2016/04/28 22:18:58 jperkin Exp $ + +Find correct network interfaces. + +--- sysdeps/solaris/netload.c.orig 2011-06-01 15:40:47.000000000 +0000 ++++ sysdeps/solaris/netload.c +@@ -105,7 +105,7 @@ solaris_stats(glibtop *server, + /* + * chop off the trailing interface + */ +- module = strdup( name ); ++ module = strdup( "link" ); + ptr = module + strlen( module ) - 1; + while( (ptr > module) && isdigit( (int) *ptr ) ) { + *ptr = '\0'; diff --git a/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c b/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c index b9d085db0ab..9f3e2421a53 100644 --- a/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c +++ b/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c @@ -1,4 +1,4 @@ -$NetBSD: patch-sysdeps_solaris_procopenfiles.c,v 1.1 2013/02/26 15:54:16 jperkin Exp $ +$NetBSD: patch-sysdeps_solaris_procopenfiles.c,v 1.2 2016/04/28 22:18:58 jperkin Exp $ Implement stub functions for Solaris to at least get the package to build. Help filling them out with actual data would be very welcome. @@ -16,7 +16,7 @@ build. Help filling them out with actual data would be very welcome. #include <sys/types.h> #include <fcntl.h> #include <sys/stat.h> -@@ -126,3 +129,46 @@ glibtop_get_proc_open_files_s (glibtop * +@@ -126,3 +129,67 @@ glibtop_get_proc_open_files_s (glibtop * return (glibtop_open_files_entry*)g_array_free(entries, FALSE); } @@ -53,13 +53,34 @@ build. Help filling them out with actual data would be very welcome. + return NULL; +} + ++static const unsigned long _glibtop_sysdeps_sysinfo = ++(1L << GLIBTOP_SYSINFO_CPUINFO); ++ +static glibtop_sysinfo sysinfo = { .flags = 0 }; + ++static void ++init_sysinfo (glibtop *server) ++{ ++ guint ncpus = sysconf(_SC_NPROCESSORS_CONF); ++ ++ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); ++ ++ for (sysinfo.ncpu = 0; ++ sysinfo.ncpu < GLIBTOP_NCPU && sysinfo.ncpu < ncpus; ++ sysinfo.ncpu++) { ++ glibtop_entry * const cpuinfo = &sysinfo.cpuinfo[sysinfo.ncpu]; ++ cpuinfo->labels = g_ptr_array_new (); ++ cpuinfo->values = g_hash_table_new_full(g_str_hash, ++ g_str_equal, ++ NULL, g_free); ++ } ++ ++ sysinfo.flags = _glibtop_sysdeps_sysinfo; ++} ++ +const glibtop_sysinfo * +glibtop_get_sysinfo_s (glibtop *server) +{ -+ server->sysdeps.flags = -+ (1L << GLIBTOP_SYSINFO_CPUINFO); -+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); -+ return NULL; ++ init_sysinfo (server); ++ return &sysinfo; +} |