pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/libgtop2 Fix build on DragonFly 1.8+.
details: https://anonhg.NetBSD.org/pkgsrc/rev/69657741c4f5
branches: trunk
changeset: 530337:69657741c4f5
user: joerg <joerg%pkgsrc.org@localhost>
date: Mon Jun 25 21:18:52 2007 +0000
description:
Fix build on DragonFly 1.8+.
diffstat:
sysutils/libgtop2/distinfo | 9 ++--
sysutils/libgtop2/patches/patch-ab | 64 +++++++++++++++++++-------------------
sysutils/libgtop2/patches/patch-ak | 41 +++++++++++++++++++----
sysutils/libgtop2/patches/patch-al | 23 ++++++++++--
sysutils/libgtop2/patches/patch-bh | 15 --------
5 files changed, 87 insertions(+), 65 deletions(-)
diffs (261 lines):
diff -r b3b7d14d8503 -r 69657741c4f5 sysutils/libgtop2/distinfo
--- a/sysutils/libgtop2/distinfo Mon Jun 25 21:18:37 2007 +0000
+++ b/sysutils/libgtop2/distinfo Mon Jun 25 21:18:52 2007 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.28 2007/04/04 18:53:44 gdt Exp $
+$NetBSD: distinfo,v 1.29 2007/06/25 21:18:52 joerg Exp $
SHA1 (libgtop-2.14.2.tar.bz2) = 20e79a58c08e06e5f5e68d8ebbd575471f754e96
RMD160 (libgtop-2.14.2.tar.bz2) = cb51f7252e015e17dcf3f1f991b36bf3e5496efe
Size (libgtop-2.14.2.tar.bz2) = 664817 bytes
SHA1 (patch-aa) = 01f43f6786e1d2727b68acb0083283e33cbc9ae5
-SHA1 (patch-ab) = 6e6c9c6d30ed8fad0b2d714263a752145faed0ba
+SHA1 (patch-ab) = 3a00a1c4f0d895d0e2ecc2bceabc4bbc5dbaa422
SHA1 (patch-ac) = c645307376eddb5c469ab00bd7ec8217feb3e2d5
SHA1 (patch-ad) = ada3c0128c0b7d3b670f8d30c910fe4c1e2e351a
SHA1 (patch-ae) = 035419a4e8a505c672f727c843dbd977acd8ce35
@@ -13,8 +13,8 @@
SHA1 (patch-ah) = 57d112d551149190a6b9c24074427457f8591691
SHA1 (patch-ai) = 57d891785a45ec532757a48e77adafec091f3953
SHA1 (patch-aj) = c244b5c60e61594c3d2c0bc95e05e12ad68938db
-SHA1 (patch-ak) = 0a29c6b7daf1ae34b528dbb2535d05009ad61b84
-SHA1 (patch-al) = cda2af81f098924be5f1fa1975c684257fc233ff
+SHA1 (patch-ak) = b8365370cd25da8626fc636d4c9faf91a626067d
+SHA1 (patch-al) = 5f7fb52914005c089c72589e8883bc062d3f14ab
SHA1 (patch-am) = 42bfab5f3e65734e98cee0c4035b17dc515514cf
SHA1 (patch-an) = 57a79bddc3f0e8237b72486aa8f8906f318ca38d
SHA1 (patch-ao) = 456feb151050332f1bc6577363329da175499dbc
@@ -25,4 +25,3 @@
SHA1 (patch-bc) = 3638dfee30a4f10bc9662c23063df3f6a8cdc914
SHA1 (patch-bd) = 7825fd4d2e6c06510fa3d76b4efa4d2ffab2a7d8
SHA1 (patch-bg) = f4adb1f60c777a92e63f4ad0fef6d9addea5f856
-SHA1 (patch-bh) = afdf0dec92984528efd181a24d3ef8f3eb383173
diff -r b3b7d14d8503 -r 69657741c4f5 sysutils/libgtop2/patches/patch-ab
--- a/sysutils/libgtop2/patches/patch-ab Mon Jun 25 21:18:37 2007 +0000
+++ b/sysutils/libgtop2/patches/patch-ab Mon Jun 25 21:18:52 2007 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ab,v 1.7 2006/08/22 16:11:12 joerg Exp $
+$NetBSD: patch-ab,v 1.8 2007/06/25 21:18:52 joerg Exp $
---- sysdeps/freebsd/proctime.c.orig 2006-04-04 22:01:43.000000000 +0200
+--- sysdeps/freebsd/proctime.c.orig 2006-04-04 20:01:43.000000000 +0000
+++ sysdeps/freebsd/proctime.c
@@ -32,6 +32,10 @@
#include <osreldate.h>
@@ -22,7 +22,17 @@
#ifndef __FreeBSD__
static void
-@@ -142,11 +146,15 @@ glibtop_get_proc_time_p (glibtop *server
+@@ -125,7 +129,9 @@ glibtop_get_proc_time_p (glibtop *server
+ #else
+ struct user *u_addr = (struct user *)USRSTACK;
+ #endif
++#if !defined(__DragonFly__)
+ struct pstats pstats;
++#endif
+ int count;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
+@@ -142,11 +148,15 @@ glibtop_get_proc_time_p (glibtop *server
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
@@ -40,7 +50,7 @@
#elif (defined __FreeBSD__) && (__FreeBSD_version <= 500013)
buf->rtime = pinfo [0].kp_proc.p_runtime;
#else
-@@ -189,18 +197,26 @@ glibtop_get_proc_time_p (glibtop *server
+@@ -189,16 +199,38 @@ glibtop_get_proc_time_p (glibtop *server
if ((pinfo [0].ki_flag & P_INMEM)) {
#endif
buf->utime = pinfo [0].ki_runtime;
@@ -60,35 +70,25 @@
glibtop_suid_enter (server);
-#elif (__FreeBSD_version <= 500013)
-+#elif defined(__DragonFly__) || (defined(__FreeBSD__) || (__FreeBSD_version <= 500013))
-
-+#if defined(__DragonFly__)
-+ if ((pinfo [0].kp_proc.p_flag & P_SWAPPEDOUT) == 0 &&
++#elif defined(__DragonFly__)
++
++ if ((pinfo [0].kp_proc.p_flag & P_SWAPPEDOUT) == 0)
++ {
++
++ buf->utime = pinfo[0].kp_eproc.e_uticks / 1000000;
++ buf->stime = pinfo[0].kp_eproc.e_sticks / 1000000;
++#if __DragonFly_version >= 180000
++ buf->cutime = 0; /* XXX no idea about this */
++ buf->cstime = 0;
+#else
- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
++ buf->cutime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_utime);
++ buf->cstime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_stime);
+#endif
- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
- (unsigned long) &u_addr->u_stats,
- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
-@@ -210,13 +226,21 @@ glibtop_get_proc_time_p (glibtop *server
- buf->stime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_stime);
- buf->cutime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_utime);
- buf->cstime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_stime);
-+#if defined(__DragonFly__)
+ buf->start_time = tv2sec (pinfo[0].kp_thread.td_start);
-+#else
- buf->start_time = tv2sec (pinfo[0].kp_eproc.e_stats.p_start);
-+#endif
- buf->flags = _glibtop_sysdeps_proc_time_user;
- glibtop_suid_leave (server);
- }
- #else
++ buf->flags = _glibtop_sysdeps_proc_time_user;
++ glibtop_suid_leave (server);
++ }
++#elif defined(__FreeBSD__) && (__FreeBSD_version <= 500013)
-+#if defined(__DragonFly__)
-+ if ((pinfo [0].kp_proc.p_flag & P_SWAPPEDOUT) == 0 &&
-+#else
- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-+#endif
- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
- (unsigned long) &u_addr->u_stats,
- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
+ if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
+ kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
diff -r b3b7d14d8503 -r 69657741c4f5 sysutils/libgtop2/patches/patch-ak
--- a/sysutils/libgtop2/patches/patch-ak Mon Jun 25 21:18:37 2007 +0000
+++ b/sysutils/libgtop2/patches/patch-ak Mon Jun 25 21:18:52 2007 +0000
@@ -1,8 +1,19 @@
-$NetBSD: patch-ak,v 1.1 2006/02/28 23:48:12 joerg Exp $
+$NetBSD: patch-ak,v 1.2 2007/06/25 21:18:52 joerg Exp $
---- sysdeps/freebsd/procmap.c.orig 2005-02-23 08:20:45.000000000 +0000
+--- sysdeps/freebsd/procmap.c.orig 2005-12-12 10:09:39.000000000 +0000
+++ sysdeps/freebsd/procmap.c
-@@ -40,7 +40,7 @@
+@@ -21,6 +21,10 @@
+ Boston, MA 02111-1307, USA.
+ */
+
++#ifdef __DragonFly__
++#define _KERNEL_STRUCTURES
++#endif
++
+ #include <config.h>
+ #include <glibtop.h>
+ #include <glibtop/error.h>
+@@ -41,7 +45,7 @@
#else
#include <vm/vm_object.h>
#include <vm/vm_map.h>
@@ -11,7 +22,7 @@
#include <vm/vm.h>
#else
#include <vm/vm_prot.h>
-@@ -108,9 +108,9 @@ glibtop_get_proc_map_p (glibtop *server,
+@@ -109,9 +113,9 @@ glibtop_get_proc_map_p (glibtop *server,
struct vm_object object;
#endif
glibtop_map_entry *maps;
@@ -23,18 +34,32 @@
struct inode inode;
#endif
#endif
-@@ -178,8 +178,8 @@ glibtop_get_proc_map_p (glibtop *server,
+@@ -130,7 +134,7 @@ glibtop_get_proc_map_p (glibtop *server,
+ /* Get the process data */
+ pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
+ if ((pinfo == NULL) || (count < 1)) {
+- glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
++ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
+ return NULL;
+ }
+
+@@ -178,9 +182,12 @@ glibtop_get_proc_map_p (glibtop *server,
+ } else {
update = 1;
}
-
+-
-#ifdef __FreeBSD__
-#if __FreeBSD__ >= 4
+#if defined(__FreeBSD__) || defined(__DragonFly__)
-+#if (defined(__FreeBSD__) && __FreeBSD__ >= 4) || defined(__DragonFly__)
++#if defined(__DragonFly__) && __DragonFly_version >= 180000
++ if (entry.eflags != VM_MAPTYPE_NORMAL &&
++ entry.eflags != VM_MAPTYPE_VPAGETABLE)
++ continue;
++#elif (defined(__FreeBSD__) && __FreeBSD__ >= 4) || defined(__DragonFly__)
if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
continue;
#else
-@@ -255,7 +255,7 @@ glibtop_get_proc_map_p (glibtop *server,
+@@ -256,7 +263,7 @@ glibtop_get_proc_map_p (glibtop *server,
#endif
diff -r b3b7d14d8503 -r 69657741c4f5 sysutils/libgtop2/patches/patch-al
--- a/sysutils/libgtop2/patches/patch-al Mon Jun 25 21:18:37 2007 +0000
+++ b/sysutils/libgtop2/patches/patch-al Mon Jun 25 21:18:52 2007 +0000
@@ -1,8 +1,18 @@
-$NetBSD: patch-al,v 1.4 2006/06/26 12:14:25 drochner Exp $
+$NetBSD: patch-al,v 1.5 2007/06/25 21:18:52 joerg Exp $
---- sysdeps/freebsd/procmem.c.orig 2005-12-12 11:09:39.000000000 +0100
+--- sysdeps/freebsd/procmem.c.orig 2005-12-12 10:09:39.000000000 +0000
+++ sysdeps/freebsd/procmem.c
-@@ -63,6 +63,10 @@
+@@ -41,7 +41,9 @@
+
+ #include <sys/vnode.h>
+ #include <ufs/ufs/quota.h>
++#if !defined(__DragonFly__)
+ #include <ufs/ufs/inode.h>
++#endif
+
+ #include <sys/ucred.h>
+ #if (!defined __OpenBSD__) && (!defined __bsdi__)
+@@ -63,6 +65,10 @@
#include <uvm/uvm.h>
#endif
@@ -13,13 +23,16 @@
static const unsigned long _glibtop_sysdeps_proc_mem =
(1L << GLIBTOP_PROC_MEM_SIZE) +
(1L << GLIBTOP_PROC_MEM_VSIZE) +
-@@ -214,8 +218,8 @@ glibtop_get_proc_mem_p (glibtop *server,
+@@ -214,8 +220,11 @@ glibtop_get_proc_mem_p (glibtop *server,
return;
}
-#ifdef __FreeBSD__
-#if __FreeBSD__ >= 4
-+#if defined(__FreeBSD__) || defined(__DragonFly__)
++#if defined(__DragonFly__) && (__DragonFly_version >= 180000)
++ if (entry.maptype != VM_MAPTYPE_NORMAL && entry.maptype != VM_MAPTYPE_VPAGETABLE)
++ continue;
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__DragonFly__) || (defined(__FreeBSD__) && __FreeBSD__ >= 4)
if (entry.eflags & (MAP_ENTRY_IS_SUB_MAP))
continue;
diff -r b3b7d14d8503 -r 69657741c4f5 sysutils/libgtop2/patches/patch-bh
--- a/sysutils/libgtop2/patches/patch-bh Mon Jun 25 21:18:37 2007 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-$NetBSD: patch-bh,v 1.1 2005/10/12 21:49:39 jmmv Exp $
-
-From FreeBSD's GNOME development repository.
-
---- sysdeps/freebsd/procmap.c Wed Feb 23 17:20:45 2005
-+++ sysdeps/freebsd/procmap.c.orig Sat Mar 19 02:46:57 2005
-@@ -129,7 +129,7 @@
- /* Get the process data */
- pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
- if ((pinfo == NULL) || (count < 1)) {
-- glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
- return NULL;
- }
-
Home |
Main Index |
Thread Index |
Old Index