pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/libgtop Add support for DragonFly (incomplete...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4fcd41b6a517
branches:  trunk
changeset: 395728:4fcd41b6a517
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Sat Jul 11 13:14:13 2009 +0000

description:
Add support for DragonFly (incomplete, but builds). Fix PLIST for Linux,
Solaris and FreeBSD. Bump PKGREVISION.

diffstat:

 sysutils/libgtop/Makefile         |   8 +++-
 sysutils/libgtop/PLIST            |   3 +-
 sysutils/libgtop/distinfo         |  16 +++++++-
 sysutils/libgtop/patches/patch-da |  22 ++++++++++
 sysutils/libgtop/patches/patch-db |  14 ++++++
 sysutils/libgtop/patches/patch-dc |  18 ++++++++
 sysutils/libgtop/patches/patch-dd |  13 ++++++
 sysutils/libgtop/patches/patch-de |  82 +++++++++++++++++++++++++++++++++++++++
 sysutils/libgtop/patches/patch-df |  50 +++++++++++++++++++++++
 sysutils/libgtop/patches/patch-dg |  30 ++++++++++++++
 sysutils/libgtop/patches/patch-dh |  28 +++++++++++++
 sysutils/libgtop/patches/patch-di |  29 +++++++++++++
 sysutils/libgtop/patches/patch-dj |  22 ++++++++++
 sysutils/libgtop/patches/patch-dk |  43 ++++++++++++++++++++
 sysutils/libgtop/patches/patch-dl |  18 ++++++++
 sysutils/libgtop/patches/patch-dm |  18 ++++++++
 sysutils/libgtop/patches/patch-dn |  39 ++++++++++++++++++
 17 files changed, 450 insertions(+), 3 deletions(-)

diffs (truncated from 550 to 300 lines):

diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/Makefile
--- a/sysutils/libgtop/Makefile Sat Jul 11 10:35:09 2009 +0000
+++ b/sysutils/libgtop/Makefile Sat Jul 11 13:14:13 2009 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.26 2009/05/26 18:49:04 drochner Exp $
+# $NetBSD: Makefile,v 1.27 2009/07/11 13:14:13 hasso Exp $
 
 DISTNAME=              libgtop-2.26.1
+PKGREVISION=           1
 CATEGORIES=            sysutils gnome
 MASTER_SITES=          ${MASTER_SITE_GNOME:=sources/libgtop/2.26/}
 EXTRACT_SUFX=          .tar.bz2
@@ -62,6 +63,11 @@
        ${CHMOD} g+s ${DESTDIR}${PREFIX}/bin/libgtop_server2
 .endif
 
+PLIST_VARS+=    glibtop_private.h
+.if ${OPSYS} == "Linux" || ${OPSYS} == "SunOS" || ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
+PLIST.glibtop_private.h= yes
+.endif
+
 # XXX This needs a check in the configure script, which should be clean
 # enough to be integrated in the mainstream sources.
 statvfs_h=     /usr/include/sys/statvfs.h
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/PLIST
--- a/sysutils/libgtop/PLIST    Sat Jul 11 10:35:09 2009 +0000
+++ b/sysutils/libgtop/PLIST    Sat Jul 11 13:14:13 2009 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2009/06/14 18:16:09 joerg Exp $
+@comment $NetBSD: PLIST,v 1.11 2009/07/11 13:14:13 hasso Exp $
 ${PLIST.server}bin/libgtop_daemon2
 ${PLIST.server}bin/libgtop_server2
 include/libgtop-2.0/glibtop.h
@@ -40,6 +40,7 @@
 include/libgtop-2.0/glibtop/uptime.h
 include/libgtop-2.0/glibtop/version.h
 include/libgtop-2.0/glibtop_machine.h
+${PLIST.glibtop_private.h}include/libgtop-2.0/glibtop_private.h
 include/libgtop-2.0/glibtop_server.h
 ${PLIST.suid.h}include/libgtop-2.0/glibtop_suid.h
 include/libgtop-2.0/libgtopconfig.h
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/distinfo
--- a/sysutils/libgtop/distinfo Sat Jul 11 10:35:09 2009 +0000
+++ b/sysutils/libgtop/distinfo Sat Jul 11 13:14:13 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2009/05/26 18:49:04 drochner Exp $
+$NetBSD: distinfo,v 1.15 2009/07/11 13:14:13 hasso Exp $
 
 SHA1 (libgtop-2.26.1.tar.bz2) = 758bbf69009c6bcfe2765de97e7027124c5a147e
 RMD160 (libgtop-2.26.1.tar.bz2) = 5177aad953508b20d794d2390204b5b07bc364f5
@@ -20,3 +20,17 @@
 SHA1 (patch-cb) = cabc971530d8113694ff6d04108490749d40bcec
 SHA1 (patch-cc) = 2cb1d2da57a8622c93ed255a416ed9c811e775a2
 SHA1 (patch-cd) = cf96896ddde9c830c1e808d8bf37b9fdb611ed24
+SHA1 (patch-da) = 9b3a1ecdc149b1d4e8f64c5e035a51d78aa6578b
+SHA1 (patch-db) = e3efc8ac9cf2320fef788b6265b0012ea4d3d660
+SHA1 (patch-dc) = ada7813f4a4203cc8d1bfa46bce7b87ecee06bc0
+SHA1 (patch-dd) = fea61bea21b1d1ae52f614ce9804a1132f3f368f
+SHA1 (patch-de) = 85c5cb3d1185c8cc68ab09c7d16ed39e22a12093
+SHA1 (patch-df) = 8c1dab41b7449a2c706792036cf393553cebf9f0
+SHA1 (patch-dg) = b10933f50a1561d211afb6e817be9613cab37607
+SHA1 (patch-dh) = 1c07bccae7a69974e4ab38ffc9ee74b3f10c4ba4
+SHA1 (patch-di) = 95a8566cc319f6f00510135902f921e3e0686ad4
+SHA1 (patch-dj) = 8389a0c6ca45e509022aa6bdbba51800bb57c4db
+SHA1 (patch-dk) = c95e5aa709dff7685af03f19e830d15fd17c0315
+SHA1 (patch-dl) = 9d6a44be02ec21d195076125c0cdfe5b51a0ab0a
+SHA1 (patch-dm) = ef08973aecacb1fb69f258632dd36edfdafd8c50
+SHA1 (patch-dn) = 66f66731a3abd1290f67d62f9ef654f68756bccb
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-da
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-da Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-da,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- configure.orig     2009-04-13 22:32:32 +0300
++++ configure  2009-07-11 14:14:29 +0300
+@@ -21527,7 +21527,7 @@ echo $ECHO_N "checking for libgtop sysde
+         libgtop_need_server=yes
+         libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2'
+         ;;
+-      freebsd*|kfreebsd*)
++      freebsd*|kfreebsd*|dragonfly*)
+         libgtop_sysdeps_dir=freebsd
+         libgtop_use_machine_h=yes
+         libgtop_need_server=yes
+@@ -21594,7 +21594,7 @@ echo "${ECHO_T}$libgtop_sysdeps_dir" >&6
+ 
+ 
+       case "$host_os" in
+-      *bsd*)
++      *bsd*|dragonfly*)
+               case "$host_os" in
+               *kfreebsd*)
+               { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-db
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-db Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-db,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/glibtop_machine.h.orig     2009-07-10 22:47:31 +0300
++++ sysdeps/freebsd/glibtop_machine.h  2009-07-10 22:47:58 +0300
+@@ -25,7 +25,9 @@
+ #include <sys/param.h>
+ #include <nlist.h>
+ #include <kvm.h>
++#ifndef __DragonFly__
+ #include <sys/dkstat.h>
++#endif
+ #include <time.h>
+ #include <sys/user.h>
+ #include <sys/types.h>
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-dc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-dc Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-dc,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/cpu.c.orig 2009-07-10 22:48:38 +0300
++++ sysdeps/freebsd/cpu.c      2009-07-10 22:51:26 +0300
+@@ -53,6 +53,7 @@ _glibtop_init_cpu_s (glibtop *server)
+ void
+ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
+ {
++#ifndef __DragonFly__
+       long cpts [CPUSTATES];
+       struct clockinfo ci;
+       size_t length;
+@@ -111,4 +112,5 @@ glibtop_get_cpu_s (glibtop *server, glib
+       if (ncpu > 1) {
+               buf->flags |= _glibtop_sysdeps_cpu_smp;
+       }
++#endif
+ }
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-dd
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-dd Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-dd,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/open.c.orig        2009-07-10 22:52:03 +0300
++++ sysdeps/freebsd/open.c     2009-07-10 22:53:37 +0300
+@@ -65,6 +65,8 @@ glibtop_open_p (glibtop *server, const c
+       server->machine.egid = getegid ();
+ #if defined(__FreeBSD_kernel__)
+       server->os_version_code = __FreeBSD_kernel_version;
++#elif defined(__DragonFly__)
++      server->os_version_code = __DragonFly_version;
+ #else
+       server->os_version_code = __FreeBSD_version;
+ #endif
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-de
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-de Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,82 @@
+$NetBSD: patch-de,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/proclist.c.orig    2009-07-10 23:21:10 +0300
++++ sysdeps/freebsd/proclist.c 2009-07-10 23:30:28 +0300
+@@ -95,7 +95,11 @@ glibtop_get_proclist_p (glibtop *server,
+       for (i = 0; i < len; i++) {
+               pid_t pid;
+ 
++#ifdef __DragonFly__
++              pid = (pid_t) pinfo[i].kp_pid;
++#else
+               pid = (pid_t) pinfo[i].ki_pid;
++#endif
+ 
+               switch (which & GLIBTOP_KERN_PROC_MASK) {
+                       case GLIBTOP_KERN_PROC_ALL:
+@@ -105,29 +109,53 @@ glibtop_get_proclist_p (glibtop *server,
+                                       continue;
+                               break;
+                       case GLIBTOP_KERN_PROC_UID:
++#ifdef __DragonFly__
++                              if ((uid_t) arg != pinfo[i].kp_ruid)
++#else
+                               if ((uid_t) arg != pinfo[i].ki_ruid)
++#endif
+                                       continue;
+                               break;
+                       case GLIBTOP_KERN_PROC_PGRP:
++#ifdef __DragonFly__
++                              if ((pid_t) arg != pinfo[i].kp_pgid)
++#else
+                               if ((pid_t) arg != pinfo[i].ki_pgid)
++#endif
+                                       continue;
+                               break;
+                       case GLIBTOP_KERN_PROC_SESSION:
++#ifdef __DragonFly__
++                              if ((pid_t) arg != pinfo[i].kp_sid)
++#else
+                               if ((pid_t) arg != pinfo[i].ki_sid)
++#endif
+                                       continue;
+                               break;
+                       case GLIBTOP_KERN_PROC_TTY:
++#ifdef __DragonFly__
++                              if ((dev_t) arg != pinfo[i].kp_tdev)
++#else
+                               if ((dev_t) arg != pinfo[i].ki_tdev)
++#endif
+                                       continue;
+                               break;
+                       case GLIBTOP_KERN_PROC_RUID:
++#ifdef __DragonFly__
++                              if ((uid_t) arg != pinfo[i].kp_ruid)
++#else
+                               if ((uid_t) arg != pinfo[i].ki_ruid)
++#endif
+                                       continue;
+                               break;
+                       }
+ 
+               if (which & GLIBTOP_EXCLUDE_NOTTY)
++#ifdef __DragonFly__
++                      if (pinfo[i].kp_tdev == (dev_t) -1) continue;
++#else
+                       if (pinfo[i].ki_tdev == (dev_t) -1) continue;
++#endif
+ 
+               if (which & GLIBTOP_EXCLUDE_IDLE) {
+                       glibtop_get_proc_state_p (server, &procstate, pid);
+@@ -136,7 +164,11 @@ glibtop_get_proclist_p (glibtop *server,
+               }
+ 
+               if (which & GLIBTOP_EXCLUDE_SYSTEM)
++#ifdef __DragonFly__
++                      if (pinfo[i].kp_ruid == (uid_t) 0) continue;
++#else
+                       if (pinfo[i].ki_ruid == (uid_t) 0) continue;
++#endif
+ 
+               g_array_append_val (pids, pid);
+       }
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-df
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-df Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,50 @@
+$NetBSD: patch-df,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/procstate.c.orig   2008-05-24 01:13:23 +0300
++++ sysdeps/freebsd/procstate.c        2009-07-11 15:26:10 +0300
+@@ -64,6 +64,37 @@ glibtop_get_proc_state_p (glibtop *serve
+               return;
+       }
+ 
++#ifdef __DragonFly__
++      buf->uid = pinfo[0].kp_ruid;
++      buf->gid = pinfo[0].kp_rgid;
++
++      g_strlcpy (buf->cmd, pinfo[0].kp_comm, sizeof (buf->cmd));
++
++      switch (pinfo[0].kp_stat) {
++              case SACTIVE:
++                      switch (pinfo[0].kp_lwp.kl_stat) {
++                              case LSRUN:
++                                      buf->state = GLIBTOP_PROCESS_RUNNING;
++                                      break;
++                              case LSSLEEP:
++                                      buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
++                                      break;
++                              case LSSTOP:
++                                      buf->state = GLIBTOP_PROCESS_STOPPED;
++                                      break;
++                              default:
++                                      buf->state = 0;
++                                      break;
++                      }
++              case SZOMB:
++                      buf->state = GLIBTOP_PROCESS_ZOMBIE;
++                      break;
++              case SIDL:
++              default:
++                      buf->state = 0;
++                      break;
++      }
++#else
+       buf->uid = pinfo[0].ki_ruid;
+       buf->gid = pinfo[0].ki_rgid;
+ 
+@@ -91,6 +122,7 @@ glibtop_get_proc_state_p (glibtop *serve
+                       buf->state = 0;
+                       break;
+       }
++#endif
+ 
+       buf->flags = _glibtop_sysdeps_proc_state;
+ }
diff -r 8cc6f61f4373 -r 4fcd41b6a517 sysutils/libgtop/patches/patch-dg
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-dg Sat Jul 11 13:14:13 2009 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-dg,v 1.1 2009/07/11 13:14:13 hasso Exp $
+
+--- sysdeps/freebsd/procuid.c.orig     2009-07-10 23:41:21 +0300
++++ sysdeps/freebsd/procuid.c  2009-07-10 23:43:41 +0300
+@@ -64,6 +64,17 @@ glibtop_get_proc_uid_p (glibtop *server,



Home | Main Index | Thread Index | Old Index