summaryrefslogtreecommitdiff
path: root/sysutils/libgtop
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2013-02-26 15:54:16 +0000
committerjperkin <jperkin@pkgsrc.org>2013-02-26 15:54:16 +0000
commitbbe80994dd89c242a0ba7b2d7dcdf18fa7020da8 (patch)
tree9edcedd0981373ac58d8f2d31b6cc5c2b2c77af1 /sysutils/libgtop
parentbaaa5cc712ea0580558ad977b5ae5c2e0cdb3f5d (diff)
downloadpkgsrc-bbe80994dd89c242a0ba7b2d7dcdf18fa7020da8.tar.gz
Implement stubs for missing functions on Solaris. This at least gets us a
working package - help fleshing them out with actual data is appreciated.
Diffstat (limited to 'sysutils/libgtop')
-rw-r--r--sysutils/libgtop/Makefile5
-rw-r--r--sysutils/libgtop/distinfo4
-rw-r--r--sysutils/libgtop/patches/patch-sysdeps_solaris_glibtop__server.h15
-rw-r--r--sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c65
4 files changed, 85 insertions, 4 deletions
diff --git a/sysutils/libgtop/Makefile b/sysutils/libgtop/Makefile
index 17dfbc12b2f..224fd78c10d 100644
--- a/sysutils/libgtop/Makefile
+++ b/sysutils/libgtop/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.43 2013/01/22 21:57:45 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2013/02/26 15:54:16 jperkin Exp $
DISTNAME= libgtop-2.28.4
PKGREVISION= 4
@@ -66,7 +66,6 @@ SPECIAL_PERMS= bin/libgtop_server2 ${REAL_ROOT_USER} kmem 2755
#PLIST.suid.h= no
.elif ${OPSYS} == "SunOS"
PLIST.server= yes
-PLIST.suid.h= yes
SPECIAL_PERMS= bin/libgtop_server2 ${REAL_ROOT_USER} sys 2755
.else
PLIST.server= yes
@@ -74,7 +73,7 @@ PLIST.suid.h= yes
.endif
PLIST_VARS+= glibtop_private.h
-.if ${OPSYS} == "SunOS" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
PLIST.glibtop_private.h= yes
.endif
diff --git a/sysutils/libgtop/distinfo b/sysutils/libgtop/distinfo
index 3fd15f13f03..08eca1d9e40 100644
--- a/sysutils/libgtop/distinfo
+++ b/sysutils/libgtop/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2012/03/23 17:29:51 marino Exp $
+$NetBSD: distinfo,v 1.28 2013/02/26 15:54:16 jperkin Exp $
SHA1 (libgtop-2.28.4.tar.bz2) = b6f002cc80a61dc0908dd96e0b543113a46bc4b7
RMD160 (libgtop-2.28.4.tar.bz2) = 96ac76aa409bbd202bedacd94df14cd549e10d6b
@@ -37,3 +37,5 @@ SHA1 (patch-dl) = 9d6a44be02ec21d195076125c0cdfe5b51a0ab0a
SHA1 (patch-dm) = ef08973aecacb1fb69f258632dd36edfdafd8c50
SHA1 (patch-dn) = 66f66731a3abd1290f67d62f9ef654f68756bccb
SHA1 (patch-sysdeps_freebsd_procwd.c) = 89961a4115785809b1a1dc5dd07f263cf35cf1b8
+SHA1 (patch-sysdeps_solaris_glibtop__server.h) = ed3a657ecc024d0d5edc3d436e593b86ed39d726
+SHA1 (patch-sysdeps_solaris_procopenfiles.c) = 8aef9e53cdd9d2e13a964e0cde43e71b507fcfa5
diff --git a/sysutils/libgtop/patches/patch-sysdeps_solaris_glibtop__server.h b/sysutils/libgtop/patches/patch-sysdeps_solaris_glibtop__server.h
new file mode 100644
index 00000000000..110eeb2f2c7
--- /dev/null
+++ b/sysutils/libgtop/patches/patch-sysdeps_solaris_glibtop__server.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-sysdeps_solaris_glibtop__server.h,v 1.1 2013/02/26 15:54:16 jperkin Exp $
+
+Add missing defines.
+
+--- sysdeps/solaris/glibtop_server.h.orig 2011-06-01 15:40:47.000000000 +0000
++++ sysdeps/solaris/glibtop_server.h
+@@ -45,6 +45,8 @@ G_BEGIN_DECLS
+ #define GLIBTOP_SUID_NETLOAD 0
+ #define GLIBTOP_SUID_NETLIST 0
+ #define GLIBTOP_SUID_PPP 0
++#define GLIBTOP_SUID_PROC_WD 0
++#define GLIBTOP_SUID_PROC_AFFINITY 0
+
+ G_END_DECLS
+
diff --git a/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c b/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c
new file mode 100644
index 00000000000..b9d085db0ab
--- /dev/null
+++ b/sysutils/libgtop/patches/patch-sysdeps_solaris_procopenfiles.c
@@ -0,0 +1,65 @@
+$NetBSD: patch-sysdeps_solaris_procopenfiles.c,v 1.1 2013/02/26 15:54:16 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.
+
+--- sysdeps/solaris/procopenfiles.c.orig 2011-06-01 15:40:47.000000000 +0000
++++ sysdeps/solaris/procopenfiles.c
+@@ -22,7 +22,10 @@
+ #include <config.h>
+ #include <glibtop.h>
+ #include <glibtop/error.h>
++#include <glibtop/procaffinity.h>
+ #include <glibtop/procopenfiles.h>
++#include <glibtop/procwd.h>
++#include <glibtop/sysinfo.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
+@@ -126,3 +129,46 @@ glibtop_get_proc_open_files_s (glibtop *
+
+ return (glibtop_open_files_entry*)g_array_free(entries, FALSE);
+ }
++
++/*
++ * Stub functions, currently unimplemented on Solaris
++ */
++void
++_glibtop_init_proc_wd_s (glibtop *server)
++{
++ server->sysdeps.proc_wd =
++ (1 << GLIBTOP_PROC_WD_EXE) |
++ (1 << GLIBTOP_PROC_WD_ROOT) |
++ (1 << GLIBTOP_PROC_WD_NUMBER);
++}
++char **
++glibtop_get_proc_wd_s (glibtop *server, glibtop_proc_wd *buf, pid_t pid)
++{
++ memset (buf, 0, sizeof (glibtop_proc_wd));
++ return NULL;
++}
++
++void
++_glibtop_init_proc_affinity_s(glibtop *server)
++{
++ server->sysdeps.proc_affinity =
++ (1 << GLIBTOP_PROC_AFFINITY_NUMBER) |
++ (1 << GLIBTOP_PROC_AFFINITY_ALL);
++}
++guint16 *
++glibtop_get_proc_affinity_s(glibtop *server, glibtop_proc_affinity *buf, pid_t pid)
++{
++ memset(buf, 0, sizeof (glibtop_proc_affinity));
++ return NULL;
++}
++
++static glibtop_sysinfo sysinfo = { .flags = 0 };
++
++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;
++}