aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libgtop2
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-04-05 11:11:39 +0800
committermarcus <marcus@FreeBSD.org>2004-04-05 11:11:39 +0800
commit6e5039e5d8ce567e36edb3ab0ea7a8cbaca5698c (patch)
tree80dd01ef786490f07295a989b1efd8ed753a8fef /devel/libgtop2
parentd49bf2116376af3147360d03cc88ffae85b3248d (diff)
downloadfreebsd-ports-gnome-6e5039e5d8ce567e36edb3ab0ea7a8cbaca5698c.tar.gz
freebsd-ports-gnome-6e5039e5d8ce567e36edb3ab0ea7a8cbaca5698c.tar.zst
freebsd-ports-gnome-6e5039e5d8ce567e36edb3ab0ea7a8cbaca5698c.zip
Presenting GNOME 2.6.0. The FreeBSD GNOME Team feels this our best release
ever. It fixes many bugs, and adds some features missing in previous FreeBSD ports. To help users upgrade from GNOME 2.4, we have constructed an upgrade FAQ at: http://www.freebsd.org/gnome/docs/faq26.html Please read it carefully. GNOME 2.6 packages are also available for all supported i386 versions of FreeBSD at: http://www.marcuscom.com/tinderbox/ The FreeBSD GNOME Team would like the thank the following users for their wonderful testing and patching efforts. We would especially like to thank Franz Klammer <klammer@webonaut.com> for his wonderful new splash screen. Without these people, our team, and our team alumni, GNOME on FreeBSD would not be possible. Jeremy Messenger <mezz7@cox.net> Khairil Yusof <kaeru@pd.jaring.my> Koop Mast <kwm@rainbow-runner.nl> Simon Barner <barner@in.tum.de> Tom McLaughlin <tmclaugh@sdf.lonestar.org> Scott Dodson <sdodson@sdodson.com> Vladimir Grebenschikov <vova@sw.ru>
Diffstat (limited to 'devel/libgtop2')
-rw-r--r--devel/libgtop2/Makefile8
-rw-r--r--devel/libgtop2/distinfo4
-rw-r--r--devel/libgtop2/files/patch-ab11
-rw-r--r--devel/libgtop2/files/patch-ah58
-rw-r--r--devel/libgtop2/files/patch-aj243
-rw-r--r--devel/libgtop2/files/patch-configure68
-rw-r--r--devel/libgtop2/files/patch-lib::read.c12
-rw-r--r--devel/libgtop2/files/patch-src::daemon::gnuserv.c24
-rw-r--r--devel/libgtop2/files/patch-src::daemon::io.c4
-rw-r--r--devel/libgtop2/files/patch-src_daemon_Makefile.in11
-rw-r--r--devel/libgtop2/files/patch-support_Makefile.in11
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c145
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c49
-rw-r--r--devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c131
-rw-r--r--devel/libgtop2/files/patch-sysdeps_common_fsusage.c29
-rw-r--r--devel/libgtop2/files/patch-sysdeps_common_fsusage.h25
-rw-r--r--devel/libgtop2/files/patch-sysdeps_common_mountlist.c18
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in20
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_mem.c11
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_netload.c81
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c13
-rw-r--r--devel/libgtop2/pkg-descr6
-rw-r--r--devel/libgtop2/pkg-plist17
23 files changed, 152 insertions, 847 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile
index bb4066490d7c..6bb388973510 100644
--- a/devel/libgtop2/Makefile
+++ b/devel/libgtop2/Makefile
@@ -6,11 +6,10 @@
#
PORTNAME= libgtop2
-PORTVERSION= 2.0.8
-PORTREVISION= 1
+PORTVERSION= 2.5.2
CATEGORIES= devel gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
-MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.0
+MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.5
DISTNAME= libgtop-${PORTVERSION}
DIST_SUBDIR= gnome2
@@ -21,11 +20,12 @@ LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
USE_BZIP2= yes
USE_PERL5= yes
+USE_X_PREFIX= yes
USE_GMAKE= yes
USE_GNOME= gnomehack glib20
+USE_REINPLACE= yes
INSTALLS_SHLIB= yes
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --without-x
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo
index 410d31fa3170..7614d6251656 100644
--- a/devel/libgtop2/distinfo
+++ b/devel/libgtop2/distinfo
@@ -1,2 +1,2 @@
-MD5 (gnome2/libgtop-2.0.8.tar.bz2) = 9e5b728a8639fd7c7f86ddf2cb726435
-SIZE (gnome2/libgtop-2.0.8.tar.bz2) = 916084
+MD5 (gnome2/libgtop-2.5.2.tar.bz2) = 92b9665293df3b54a00ddfda40c9d04e
+SIZE (gnome2/libgtop-2.5.2.tar.bz2) = 935545
diff --git a/devel/libgtop2/files/patch-ab b/devel/libgtop2/files/patch-ab
deleted file mode 100644
index 9c88c62bc771..000000000000
--- a/devel/libgtop2/files/patch-ab
+++ /dev/null
@@ -1,11 +0,0 @@
---- Makefile.in.orig Mon Apr 29 12:00:07 2002
-+++ Makefile.in Mon Apr 29 12:00:24 2002
-@@ -503,7 +503,7 @@
- $(top_srcdir)/aclocal.m4: libgtop-sysdeps.m4 LIBGTOP-VERSION
-
- libgtopConf.sh: libgtopConf.sh.in Makefile
-- sed -e 's#\@LIBGTOP_LIBDIR\@#$(libdir)#g' \
-+ sed -e 's#\@LIBGTOP_LIBDIR\@#$(sysconfdir)#g' \
- -e 's#\@LIBGTOP_INCLUDEDIR\@#$(includedir)/libgtop-2.0#g' \
- -e 's#\@LIBGTOP_DATADIR\@#$(datadir)#g' \
- -e 's#\@LIBGTOP_EXTRA_LIBS\@#$(LIBGTOP_EXTRA_LIBS)#g' \
diff --git a/devel/libgtop2/files/patch-ah b/devel/libgtop2/files/patch-ah
index c01ec4e1826b..bbffe4a0c430 100644
--- a/devel/libgtop2/files/patch-ah
+++ b/devel/libgtop2/files/patch-ah
@@ -1,67 +1,27 @@
---- sysdeps/freebsd/procmap.c.orig Fri May 28 03:56:48 1999
-+++ sysdeps/freebsd/procmap.c Tue Sep 9 11:38:18 2003
-@@ -33,7 +33,11 @@
- #include <sys/proc.h>
- #include <sys/resource.h>
- #include <vm/vm_object.h>
-+#if (__FreeBSD_version >= 400011)
-+#include <vm/vm.h>
-+#else
- #include <vm/vm_prot.h>
-+#endif
- #include <vm/vm_map.h>
-
- #include <sys/vnode.h>
-@@ -91,8 +95,9 @@
+--- sysdeps/freebsd/procmap.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/procmap.c Thu Mar 11 21:45:33 2004
+@@ -104,7 +104,7 @@
glibtop_map_entry *maps;
#if defined __FreeBSD__
struct vnode vnode;
+-#if __FreeBSD_version >= 500039
+#if __FreeBSD_version < 500039
struct inode inode;
-- struct mount mount;
-+#endif
#endif
- int count, i = 0;
- int update = 0;
-@@ -108,13 +113,19 @@
+ #endif
+@@ -122,8 +122,10 @@
/* 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);
+ if ((pinfo == NULL) || (count < 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
+ glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
+ return NULL;
+ }
/* Now we get the memory maps. */
- if (kvm_read (server->machine.kd,
-+#if (__FreeBSD_version >= 500013)
-+ (unsigned long) pinfo [0].ki_vmspace,
-+#else
- (unsigned long) pinfo [0].kp_proc.p_vmspace,
-+#endif
- (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace))
- glibtop_error_io_r (server, "kvm_read (vmspace)");
-
-@@ -244,6 +255,15 @@
- &vnode, sizeof (vnode)) != sizeof (vnode))
- glibtop_error_io_r (server, "kvm_read (vnode)");
-
-+#if __FreeBSD_version >= 500039
-+ switch (vnode.v_type) {
-+ case VREG:
-+ maps [i-1].inode = vnode.v_cachedid;
-+ maps [i-1].device = vnode.v_cachedfs;
-+ default:
-+ continue;
-+ }
-+#else
- if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) ||
- !vnode.v_data) continue;
-
-@@ -252,13 +272,9 @@
+@@ -280,13 +282,9 @@
&inode, sizeof (inode)) != sizeof (inode))
glibtop_error_io_r (server, "kvm_read (inode)");
@@ -69,7 +29,7 @@
- (unsigned long) vnode.v_mount,
- &mount, sizeof (mount)) != sizeof (mount))
- glibtop_error_io_r (server, "kvm_read (mount)");
--
+-#endif
maps [i-1].inode = inode.i_number;
maps [i-1].device = inode.i_dev;
+#endif
diff --git a/devel/libgtop2/files/patch-aj b/devel/libgtop2/files/patch-aj
deleted file mode 100644
index b7ea24ebab8e..000000000000
--- a/devel/libgtop2/files/patch-aj
+++ /dev/null
@@ -1,243 +0,0 @@
---- sysdeps/freebsd/proclist.c.orig Thu May 27 23:04:05 1999
-+++ sysdeps/freebsd/proclist.c Sun Sep 7 20:37:30 2003
-@@ -86,13 +86,24 @@
- pids = glibtop_realloc_r (server, pids, count * sizeof (unsigned));
- /* Copy the pids over to this chain */
- for (i=j=0; i < count; i++) {
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_STAT ki_stat
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_PID ki_pid
-+
-+#else
-+#define XXX_P_STAT kp_proc.p_stat
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_PID kp_proc.p_pid
-+
-+#endif
- if ((real_which & GLIBTOP_EXCLUDE_IDLE) &&
-- (pinfo[i].kp_proc.p_stat != SRUN))
-+ (pinfo[i].XXX_P_STAT != SRUN))
- continue;
- else if ((real_which & GLIBTOP_EXCLUDE_SYSTEM) &&
-- (pinfo[i].kp_eproc.e_pcred.p_ruid == 0))
-+ (pinfo[i].XXX_P_RUID == 0))
- continue;
-- pids [j++] = (unsigned) pinfo[i].kp_proc.p_pid;
-+ pids [j++] = (unsigned) pinfo[i].XXX_P_PID;
- } /* end for */
- /* Set the fields in buf */
- buf->number = j;
---- sysdeps/freebsd/procstate.c.orig Sun Oct 17 03:01:39 1999
-+++ sysdeps/freebsd/procstate.c Sun Sep 7 20:37:30 2003
-@@ -28,7 +28,7 @@
- #include <glibtop_suid.h>
-
- #if !defined(__OpenBSD__)
--//&& (!defined __bsdi__)
-+/*&& (!defined __bsdi__)*/
- #include <sys/user.h>
- #endif
-
-@@ -37,11 +37,7 @@
- (1L << GLIBTOP_PROC_STATE_GID);
-
- static const unsigned long _glibtop_sysdeps_proc_state_new =
--#if LIBGTOP_VERSION_CODE >= 1001000
--(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID);
--#else
- 0;
--#endif
-
- /* Init function. */
-
-@@ -76,43 +72,35 @@
- return;
- }
-
-- strncpy (buf->cmd, pinfo [0].kp_proc.p_comm, sizeof (buf->cmd)-1);
-- buf->cmd [sizeof (buf->cmd)-1] = 0;
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_COMM ki_comm
-+#define XXX_P_SVUID ki_svuid
-+#define XXX_P_SVGID ki_svgid
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_RGID ki_rgid
-+#define XXX_P_STAT ki_stat
-
-- buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid;
-- buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid;
-+#else
-+#define XXX_P_COMM kp_proc.p_comm
-+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid
-+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid
-+#define XXX_P_STAT kp_proc.p_stat
-
--#if LIBGTOP_VERSION_CODE >= 1001000
-- buf->ruid = pinfo [0].kp_eproc.e_pcred.p_ruid;
-- buf->rgid = pinfo [0].kp_eproc.e_pcred.p_rgid;
- #endif
-
-+ strncpy (buf->cmd, pinfo [0].XXX_P_COMM, sizeof (buf->cmd)-1);
-+ buf->cmd [sizeof (buf->cmd)-1] = 0;
-+
-+ buf->uid = pinfo [0].XXX_P_SVUID;
-+ buf->gid = pinfo [0].XXX_P_SVGID;
-+
- /* Set the flags for the data we're about to return*/
- buf->flags = _glibtop_sysdeps_proc_state |
- _glibtop_sysdeps_proc_state_new;
-
--#if LIBGTOP_VERSION_CODE >= 1001000
-- switch (pinfo [0].kp_proc.p_stat) {
-- case SIDL:
-- buf->state = 0;
-- break;
-- case SRUN:
-- buf->state = GLIBTOP_PROCESS_RUNNING;
-- break;
-- case SSLEEP:
-- buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
-- break;
-- case SSTOP:
-- buf->state = GLIBTOP_PROCESS_STOPPED;
-- break;
-- case SZOMB:
-- buf->state = GLIBTOP_PROCESS_ZOMBIE;
-- break;
-- default:
-- return;
-- }
--#else
-- switch (pinfo [0].kp_proc.p_stat) {
-+ switch (pinfo [0].XXX_P_STAT) {
- case SIDL:
- buf->state = 'S';
- break;
-@@ -131,7 +119,6 @@
- default:
- return;
- }
--#endif
-
- buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE);
- }
---- sysdeps/freebsd/procuid.c.orig Fri Sep 17 06:08:07 1999
-+++ sysdeps/freebsd/procuid.c Sun Sep 7 20:37:30 2003
-@@ -84,17 +84,46 @@
- return;
- }
-
-- buf->uid = pinfo [0].kp_eproc.e_pcred.p_ruid;
-- buf->euid = pinfo [0].kp_eproc.e_pcred.p_svuid;
-- buf->gid = pinfo [0].kp_eproc.e_pcred.p_rgid;
-- buf->egid = pinfo [0].kp_eproc.e_pcred.p_svgid;
--
-- buf->ppid = pinfo [0].kp_eproc.e_ppid;
-- buf->pgrp = pinfo [0].kp_eproc.e_pgid;
-- buf->tpgid = pinfo [0].kp_eproc.e_tpgid;
-+#if __FreeBSD_version >= 500013
-
-- buf->nice = pinfo [0].kp_proc.p_nice;
-- buf->priority = pinfo [0].kp_proc.p_priority;
-+#define XXX_P_RUID ki_ruid
-+#define XXX_P_SVUID ki_svuid
-+#define XXX_P_RGID ki_rgid
-+#define XXX_P_SVGID ki_svgid
-+#define XXX_E_PPID ki_ppid
-+#define XXX_E_PGID ki_pgid
-+#define XXX_E_TPGID ki_tpgid
-+#define XXX_P_NICE ki_nice
-+#if __FreeBSD_version >= 500013
-+#define XXX_P_PRIORITY ki_pri.pri_user
-+#else
-+#define XXX_P_PRIORITY ki_priority
-+#endif
-+#else
-+
-+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid
-+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid
-+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid
-+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid
-+#define XXX_E_PPID kp_eproc.e_ppid
-+#define XXX_E_PGID kp_eproc.e_pgid
-+#define XXX_E_TPGID kp_eproc.e_tpgid
-+#define XXX_P_NICE kp_proc.p_nice
-+#define XXX_P_PRIORITY kp_proc.p_priority
-+
-+#endif
-+
-+ buf->uid = pinfo [0].XXX_P_RUID;
-+ buf->euid = pinfo [0].XXX_P_SVUID;
-+ buf->gid = pinfo [0].XXX_P_RGID;
-+ buf->egid = pinfo [0].XXX_P_SVGID;
-+
-+ buf->ppid = pinfo [0].XXX_E_PPID;
-+ buf->pgrp = pinfo [0].XXX_E_PGID;
-+ buf->tpgid = pinfo [0].XXX_E_TPGID;
-+
-+ buf->nice = pinfo [0].XXX_P_NICE;
-+ buf->priority = pinfo [0].XXX_P_PRIORITY;
-
- /* Set the flags for the data we're about to return*/
- buf->flags = _glibtop_sysdeps_proc_uid;
---- sysdeps/freebsd/procsignal.c.orig Mon Feb 14 06:31:39 2000
-+++ sysdeps/freebsd/procsignal.c Sun Sep 7 20:37:30 2003
-@@ -67,11 +67,27 @@
- return;
- }
-
-+#if __FreeBSD_version >= 500013
-+
-+#define XXX_P_SIGLIST ki_siglist
-+#define XXX_P_SIGMASK ki_sigmask
-+#define XXX_P_SIGIGNORE ki_sigignore
-+#define XXX_P_SIGCATCH ki_sigcatch
-+
-+#else
-+
-+#define XXX_P_SIGLIST kp_proc.p_siglist
-+#define XXX_P_SIGMASK kp_proc.p_sigmask
-+#define XXX_P_SIGIGNORE kp_proc.p_sigignore
-+#define XXX_P_SIGCATCH kp_proc.p_sigcatch
-+
-+#endif
-+
- /* signal: mask of pending signals.
- * pinfo [0].kp_proc.p_siglist
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->signal [0] = pinfo [0].kp_proc.p_siglist.__bits[0];
-+ buf->signal [0] = pinfo [0].XXX_P_SIGLIST.__bits[0];
- #else
- buf->signal [0] = pinfo [0].kp_proc.p_siglist;
- #endif
-@@ -80,7 +96,7 @@
- * pinfo [0].kp_proc.p_sigmask
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->blocked [0] = pinfo [0].kp_proc.p_sigmask.__bits[0];
-+ buf->blocked [0] = pinfo [0].XXX_P_SIGMASK.__bits[0];
- #else
- buf->blocked [0] = pinfo [0].kp_proc.p_sigmask;
- #endif
-@@ -89,7 +105,7 @@
- * pinfo [0].kp_proc.p_sigignore
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore.__bits[0];
-+ buf->sigignore [0] = pinfo [0].XXX_P_SIGIGNORE.__bits[0];
- #else
- buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore;
- #endif
-@@ -98,7 +114,7 @@
- * pinfo [0].kp_proc.p_sigcatch
- */
- #if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
-- buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch.__bits[0];
-+ buf->sigcatch [0] = pinfo [0].XXX_P_SIGCATCH.__bits[0];
- #else
- buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch;
- #endif
diff --git a/devel/libgtop2/files/patch-configure b/devel/libgtop2/files/patch-configure
index e451557e7674..662f75ac3671 100644
--- a/devel/libgtop2/files/patch-configure
+++ b/devel/libgtop2/files/patch-configure
@@ -1,69 +1,15 @@
---- configure.orig Tue Nov 4 14:55:15 2003
-+++ configure Tue Nov 4 15:10:15 2003
-@@ -1580,10 +1580,10 @@
-
- # The aliases save the names the user supplied, while $host etc.
- # will get canonicalized.
--test -n "$target_alias" &&
-- test "$program_prefix$program_suffix$program_transform_name" = \
-- NONENONEs,x,x, &&
-- program_prefix=${target_alias}-
-+#test -n "$target_alias" &&
-+# test "$program_prefix$program_suffix$program_transform_name" = \
-+# NONENONEs,x,x, &&
-+# program_prefix=${target_alias}-
- # Making releases:
- # LIBGTOP_MICRO_VERSION += 1;
- # LIBGTOP_INTERFACE_AGE += 1;
-@@ -1886,9 +1886,9 @@
+--- configure.orig Thu Mar 11 15:38:00 2004
++++ configure Thu Mar 11 15:38:00 2004
+@@ -1917,9 +1917,9 @@
# libtool versioning
LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
--LT_CURRENT=`expr $LIBGTOP_MICRO_VERSION - $LIBGTOP_INTERFACE_AGE`
--LT_REVISION=$LIBGTOP_INTERFACE_AGE
--LT_AGE=`expr $LIBGTOP_BINARY_AGE - $LIBGTOP_INTERFACE_AGE`
+-LT_CURRENT=$LIBGTOP_CURRENT
+-LT_REVISION=$LIBGTOP_REVISION
+-LT_AGE=$LIBGTOP_AGE
+LT_CURRENT=2
+LT_REVISION=0
+LT_AGE=0
- LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
-
-
-@@ -20821,7 +20821,7 @@
-
-
- # this should go away soon
-- need_gnome_support=yes
-+ need_gnome_support=no
-
-
- for ac_func in getopt_long
-@@ -30052,13 +30052,13 @@
-
- fi;
-
--if test "x$gnome_found" = xyes ; then
-- LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
-- SUPPORTINCS="$GNOME_INCLUDEDIR"
--else
-- LIBSUPPORT='$(top_builddir)/support/libgnomesupport-2.0.la'
-- SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
--fi
-+#if test "x$gnome_found" = xyes ; then
-+# LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
-+# SUPPORTINCS="$GNOME_INCLUDEDIR"
-+#else
-+# LIBSUPPORT='$(top_builddir)/support/libgnomesupport-2.0.la'
-+# SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
-+#fi
-
- case "$GNOME_LIBS" in
- '*-lgnomesupport*' )
-@@ -30160,7 +30160,7 @@
+ LT_VERSION_INFO="-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}"
- if test x$libgtop_need_server = xyes ; then
-- sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la"
-+ sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la \$(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la"
- server_programs='libgtop_server2'
- else
- sysdeps_suid_lib=
diff --git a/devel/libgtop2/files/patch-lib::read.c b/devel/libgtop2/files/patch-lib::read.c
index 0190c885d713..38583f8766a9 100644
--- a/devel/libgtop2/files/patch-lib::read.c
+++ b/devel/libgtop2/files/patch-lib::read.c
@@ -1,14 +1,14 @@
---- lib/read.c.orig Fri May 7 07:09:24 1999
-+++ lib/read.c Tue Sep 9 10:02:54 2003
-@@ -21,6 +21,7 @@
- Boston, MA 02111-1307, USA.
+--- lib/read.c.orig Mon Oct 20 11:19:41 2003
++++ lib/read.c Fri Nov 14 14:37:00 2003
+@@ -22,6 +22,7 @@
*/
+ #include <config.h>
+#include <errno.h>
#include <glibtop/read.h>
+ #include <libgnome/gnome-i18n.h>
- /* Reads some data from server. */
-@@ -65,12 +66,16 @@
+@@ -68,12 +69,16 @@
fprintf (stderr, "LIBRARY: really reading %d bytes.\n", size);
#endif
diff --git a/devel/libgtop2/files/patch-src::daemon::gnuserv.c b/devel/libgtop2/files/patch-src::daemon::gnuserv.c
deleted file mode 100644
index a398b2aca70d..000000000000
--- a/devel/libgtop2/files/patch-src::daemon::gnuserv.c
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/daemon/gnuserv.c.orig Mon Oct 20 01:54:32 2003
-+++ src/daemon/gnuserv.c Tue Nov 4 15:22:38 2003
-@@ -42,7 +42,7 @@
- #include <glibtop/gnuserv.h>
-
- #include <errno.h>
--#include <popt-gnome.h>
-+#include <popt.h>
-
- #include "daemon.h"
-
-@@ -202,6 +202,12 @@
-
- if (auth_data_len < 1 || auth_data_len > sizeof(buf)) {
- syslog_message(LOG_WARNING, "Invalid data length supplied by client");
-+ return FALSE;
-+ }
-+
-+ if (auth_data_len < 1 || auth_data_len > sizeof(buf)) {
-+ syslog_message(LOG_WARNING,
-+ "Invalid data length supplied by client");
- return FALSE;
- }
-
diff --git a/devel/libgtop2/files/patch-src::daemon::io.c b/devel/libgtop2/files/patch-src::daemon::io.c
index b4079dec132d..0a11649ced4d 100644
--- a/devel/libgtop2/files/patch-src::daemon::io.c
+++ b/devel/libgtop2/files/patch-src::daemon::io.c
@@ -1,5 +1,5 @@
---- src/daemon/io.c.orig Tue Sep 9 09:51:15 2003
-+++ src/daemon/io.c Tue Sep 9 10:07:10 2003
+--- src/daemon/io.c.orig Sun Oct 19 12:54:32 2003
++++ src/daemon/io.c Mon Dec 1 13:50:25 2003
@@ -21,6 +21,7 @@
Boston, MA 02111-1307, USA.
*/
diff --git a/devel/libgtop2/files/patch-src_daemon_Makefile.in b/devel/libgtop2/files/patch-src_daemon_Makefile.in
deleted file mode 100644
index 04aa141eb588..000000000000
--- a/devel/libgtop2/files/patch-src_daemon_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/daemon/Makefile.in.orig Mon Apr 29 12:05:45 2002
-+++ src/daemon/Makefile.in Mon Apr 29 12:12:14 2002
-@@ -92,7 +92,7 @@
- LIBGTOP_GUILE_NAMES_LIBS = @LIBGTOP_GUILE_NAMES_LIBS@
- LIBGTOP_INCS = @LIBGTOP_INCS@
- LIBGTOP_INTERFACE_AGE = @LIBGTOP_INTERFACE_AGE@
--LIBGTOP_LIBS = @LIBGTOP_LIBS@
-+LIBGTOP_LIBS =
- LIBGTOP_MAJOR_VERSION = @LIBGTOP_MAJOR_VERSION@
- LIBGTOP_MICRO_VERSION = @LIBGTOP_MICRO_VERSION@
- LIBGTOP_MINOR_VERSION = @LIBGTOP_MINOR_VERSION@
diff --git a/devel/libgtop2/files/patch-support_Makefile.in b/devel/libgtop2/files/patch-support_Makefile.in
deleted file mode 100644
index e7cf9ec0ab23..000000000000
--- a/devel/libgtop2/files/patch-support_Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- support/Makefile.in.orig Mon Apr 29 13:02:18 2002
-+++ support/Makefile.in Mon Apr 29 13:03:33 2002
-@@ -146,7 +146,7 @@
- sysdeps_dir = @sysdeps_dir@
- sysdeps_suid_lib = @sysdeps_suid_lib@
-
--supportexecincludedir = $(includedir)/gnome/$(GNOME_INTERFACE_VERSION)
-+supportexecincludedir = $(includedir)/libgtop-2.0
-
- INCLUDES = -D_GNU_SOURCE
-
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c b/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c
deleted file mode 100644
index 396ae9c8d7b6..000000000000
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::prockernel.c
+++ /dev/null
@@ -1,145 +0,0 @@
---- sysdeps/freebsd/prockernel.c.orig Sun Oct 17 03:31:43 1999
-+++ sysdeps/freebsd/prockernel.c Tue Sep 9 11:36:35 2003
-@@ -34,12 +34,6 @@
- #if (!defined __OpenBSD__) && (!defined __bsdi__)
- #include <sys/user.h>
- #endif
--#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__))
--#include <machine/pcb.h>
--#endif
--#if defined(__FreeBSD__) && !defined(__alpha__)
--#include <machine/tss.h>
--#endif
-
- #include <unistd.h>
- #include <fcntl.h>
-@@ -78,14 +72,8 @@
- pid_t pid)
- {
- struct kinfo_proc *pinfo;
-- struct user *u_addr = (struct user *)USRSTACK;
-- struct pstats pstats;
-- struct pcb pcb;
- int count;
-
-- char filename [BUFSIZ];
-- struct stat statb;
--
- glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0);
-
- memset (buf, 0, sizeof (glibtop_proc_kernel));
-@@ -98,14 +86,30 @@
-
- /* Get the process information */
- 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);
-+ if ((pinfo == NULL) || (count != 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
-+ return;
-+ }
-+
-+#if __FreeBSD_version >= 500013
-+
-+#define XXX_P_WCHAN ki_wchan
-+#define XXX_P_WMESG ki_wmesg
-+#define XXX_E_WMESG ki_wmesg
-
-- buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE;
-+#else
-+
-+#define XXX_P_WCHAN kp_proc.p_wchan
-+#define XXX_P_WMESG kp_proc.p_wmesg
-+#define XXX_E_WMESG kp_eproc.e_wmesg
-+
-+#endif
-+
-+ buf->nwchan = (unsigned long) pinfo [0].XXX_P_WCHAN &~ KERNBASE;
- buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN);
-
-- if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) {
-- strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg,
-+ if (pinfo [0].XXX_P_WCHAN && pinfo [0].XXX_P_WMESG) {
-+ strncpy (buf->wchan, pinfo [0].XXX_E_WMESG,
- sizeof (buf->wchan) - 1);
- buf->wchan [sizeof (buf->wchan) - 1] = 0;
- buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN);
-@@ -113,72 +117,10 @@
- buf->wchan [0] = 0;
- }
-
-- /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */
--
-- /* [FIXME]: /usr/include/sys/user.h tells me that the user area
-- * may or may not be at the same kernel address in all
-- * processes, but I don't see any way to get that address.
-- * Since `ps' simply uses its own address, I think it's
-- * safe to do this here, too. */
--
-- /* NOTE: You need to mount the /proc filesystem to make
-- * `kvm_uread' work. */
--
-- sprintf (filename, "/proc/%d/mem", (int) pid);
-- if (stat (filename, &statb)) return;
--
-- glibtop_suid_enter (server);
--
-- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
-- (unsigned long) &u_addr->u_stats,
-- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
-- {
-- /*
-- * The u-area might be swapped out, and we can't get
-- * at it because we have a crashdump and no swap.
-- * If it's here fill in these fields, otherwise, just
-- * leave them 0.
-- */
--
-- buf->min_flt = (u_int64_t) pstats.p_ru.ru_minflt;
-- buf->maj_flt = (u_int64_t) pstats.p_ru.ru_majflt;
-- buf->cmin_flt = (u_int64_t) pstats.p_cru.ru_minflt;
-- buf->cmaj_flt = (u_int64_t) pstats.p_cru.ru_majflt;
--
-- buf->flags |= _glibtop_sysdeps_proc_kernel_pstats;
-- }
--
-- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-- kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc,
-- (unsigned long) &u_addr->u_pcb,
-- (char *) &pcb, sizeof (pcb)) == sizeof (pcb))
-- {
--#ifdef __FreeBSD__
--#ifndef __alpha__
--#if (__FreeBSD_version >= 300003)
-- buf->kstk_esp = (u_int64_t) pcb.pcb_esp;
-- buf->kstk_eip = (u_int64_t) pcb.pcb_eip;
--#else
-- buf->kstk_esp = (u_int64_t) pcb.pcb_ksp;
-- buf->kstk_eip = (u_int64_t) pcb.pcb_pc;
--#endif
--#else
-- /*xxx FreeBSD/Alpha? */
--#endif
--#else
-- buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0;
--#ifdef __bsdi__
-- buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip;
--#else
-- buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip;
--#endif
--
-- buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
--#endif
-- }
--
-- /* Taken from `wchan ()' in `/usr/src/bin/ps/print.c'. */
--
-- glibtop_suid_leave (server);
-+ /* XXX: the code here was, quite frankly, junk, and almost
-+ * certainly wrong - remove it all, leave these fields
-+ * unpopulated, and give up until such time as the right
-+ * code is produced for both FreeBSD 4.x and 5.x
-+ */
-+ return;
- }
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
index 83e5080548ab..e61274b13864 100644
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
+++ b/devel/libgtop2/files/patch-sysdeps::freebsd::procmem.c
@@ -1,6 +1,6 @@
---- sysdeps/freebsd/procmem.c.orig Sun Oct 19 12:55:32 2003
-+++ sysdeps/freebsd/procmem.c Sat Feb 7 22:48:12 2004
-@@ -117,7 +117,7 @@
+--- sysdeps/freebsd/procmem.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/procmem.c Thu Mar 11 15:46:05 2004
+@@ -125,7 +125,7 @@
#else
struct vm_object object;
#endif
@@ -9,53 +9,22 @@
int count;
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0);
-@@ -137,15 +137,29 @@
- return;
- }
+@@ -160,15 +160,12 @@
+
+ #define PROC_VMSPACE kp_proc.p_vmspace
- if (kvm_read (server->machine.kd,
-- (unsigned long) pinfo [0].kp_proc.p_limit,
+- (unsigned long) pinfo [0].PROC_VMSPACE,
- (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) {
- glibtop_warn_io_r (server, "kvm_read (plimit)");
-+#if __FreeBSD_version >= 500013
-+
-+#define XXX_P_VMSPACE ki_vmspace
-+
-+ buf->rss_rlim = pinfo [0].ki_rssize;
-+
-+ buf->vsize = (u_int64_t) pinfo [0].ki_size;
-+ buf->size = (u_int64_t) pagetok
-+ (pinfo [0].ki_tsize + pinfo [0].ki_dsize + pinfo[0].ki_ssize)
-+ << LOG1024;
-+ buf->resident = buf->rss = (u_int64_t) pagetok
-+ (pinfo [0].ki_rssize) << LOG1024;
-+
-+#else
-+
-+#define XXX_P_VMSPACE kp_proc.p_vmspace
-+
+ if (getrlimit (RLIMIT_RSS, &rlimit) < 0) {
-+ glibtop_warn_io_r (server, "getrlimit");
++ glibtop_warn_io_r (server, "getrlimit");
return;
}
-- buf->rss_rlim = (u_int64_t)
+- buf->rss_rlim = (guint64)
- (plimit.pl_rlimit [RLIMIT_RSS].rlim_cur);
+ buf->rss_rlim = (u_int64_t) (rlimit.rlim_cur);
vms = &pinfo [0].kp_eproc.e_vm;
-@@ -154,11 +168,12 @@
-
- buf->resident = buf->rss = (u_int64_t) pagetok
- (vms->vm_rssize) << LOG1024;
-+#endif
-
- /* Now we get the shared memory. */
-
- if (kvm_read (server->machine.kd,
-- (unsigned long) pinfo [0].kp_proc.p_vmspace,
-+ (unsigned long) pinfo [0].XXX_P_VMSPACE,
- (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) {
- glibtop_warn_io_r (server, "kvm_read (vmspace)");
- return;
diff --git a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
index 8905fd21ba83..37b5b56df49a 100644
--- a/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
+++ b/devel/libgtop2/files/patch-sysdeps::freebsd::proctime.c
@@ -1,30 +1,20 @@
---- sysdeps/freebsd/proctime.c.orig Thu Feb 15 06:36:42 2001
-+++ sysdeps/freebsd/proctime.c Tue Sep 9 11:17:56 2003
-@@ -57,6 +57,7 @@
- * system, and interrupt time usage.
- */
+--- sysdeps/freebsd/proctime.c.orig Wed Mar 10 21:23:52 2004
++++ sysdeps/freebsd/proctime.c Thu Mar 11 15:47:35 2004
+@@ -59,6 +59,7 @@
+
+ #ifndef __FreeBSD__
+#ifndef __FreeBSD__
static void
calcru(p, up, sp, ip)
struct proc *p;
-@@ -66,9 +67,6 @@
- {
- quad_t totusec;
- u_quad_t u, st, ut, it, tot;
--#if (__FreeBSD_version < 300003)
-- long sec, usec;
--#endif
- struct timeval tv;
-
- st = p->p_sticks;
-@@ -81,19 +79,10 @@
+@@ -81,19 +82,10 @@
tot = 1;
}
-#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
-
-- /* This was changed from a `struct timeval' into a `u_int64_t'
+- /* This was changed from a `struct timeval' into a `guint64'
- * on FreeBSD 3.0 and renamed p_rtime -> p_runtime.
- */
-
@@ -38,116 +28,21 @@
if (totusec < 0) {
/* XXX no %qd in kernel. Truncate. */
-@@ -116,6 +105,7 @@
+@@ -116,6 +108,7 @@
ip->tv_usec = it % 1000000;
}
}
+#endif
- /* Provides detailed information about a process. */
+ #endif /* !__FreeBSD__ */
-@@ -132,9 +122,6 @@
+@@ -133,9 +126,6 @@
+ #endif
struct pstats pstats;
int count;
-
+-
- char filename [BUFSIZ];
- struct stat statb;
--
+
glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0);
- memset (buf, 0, sizeof (glibtop_proc_time));
-@@ -142,25 +129,23 @@
- /* It does not work for the swapper task. */
- if (pid == 0) return;
-
--#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
-+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
- if (server->sysdeps.proc_time == 0)
- return;
-
--#ifndef __bsdi__
-- sprintf (filename, "/proc/%d/mem", (int) pid);
-- if (stat (filename, &statb)) return;
--#endif
- #endif
-
- /* Get the process information */
- 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);
-+ if ((pinfo == NULL) || (count != 1)) {
-+ glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
-+ return;
-+ }
-
--#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
-- buf->rtime = pinfo [0].kp_proc.p_runtime;
-+#if (defined __FreeBSD__) && (__FreeBSD_version >= 500013)
-+ buf->rtime = pinfo [0].ki_runtime;
- #else
-- buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime);
-+ buf->rtime = pinfo [0].kp_proc.p_runtime;
- #endif
-
- buf->frequency = 1000000;
-@@ -192,6 +177,21 @@
-
- buf->flags |= _glibtop_sysdeps_proc_time_user;
- #else
-+#if __FreeBSD_version >= 500013
-+#if __FreeBSD_version >= 500016
-+ if ((pinfo [0].ki_sflag & PS_INMEM)) {
-+#else
-+ if ((pinfo [0].ki_flag & P_INMEM)) {
-+#endif
-+ buf->utime = pinfo [0].ki_runtime;
-+ buf->stime = 0; /* XXX */
-+ buf->cutime = tv2sec (pinfo [0].ki_childtime);
-+ buf->cstime = 0; /* XXX */
-+ buf->start_time = tv2sec (pinfo [0].ki_start);
-+ buf->flags |= _glibtop_sysdeps_proc_time_user;
-+ }
-+
-+#else
- glibtop_suid_enter (server);
-
- if ((pinfo [0].kp_proc.p_flag & P_INMEM) &&
-@@ -199,31 +199,17 @@
- (unsigned long) &u_addr->u_stats,
- (char *) &pstats, sizeof (pstats)) == sizeof (pstats))
- {
-- /* This is taken form the kernel source code of
-- * FreeBSD 2.2.6. */
--
-- /* Well, we just do the same getrusage () does ... */
--
-- register struct rusage *rup;
-
-+ buf->utime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_utime);
-+ 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);
-+ buf->start_time = tv2sec (pinfo[0].kp_eproc.e_stats.p_start);
-+ buf->flags |= _glibtop_sysdeps_proc_time_user;
- glibtop_suid_leave (server);
--
-- rup = &pstats.p_ru;
-- calcru(&(pinfo [0]).kp_proc,
-- &rup->ru_utime, &rup->ru_stime, NULL);
--
-- buf->utime = tv2sec (pstats.p_ru.ru_utime);
-- buf->stime = tv2sec (pstats.p_ru.ru_stime);
--
-- buf->cutime = tv2sec (pstats.p_cru.ru_utime);
-- buf->cstime = tv2sec (pstats.p_cru.ru_stime);
--
-- buf->start_time = tv2sec (pstats.p_start);
--
-- buf->flags = _glibtop_sysdeps_proc_time_user;
- }
--
- glibtop_suid_leave (server);
-+#endif
- #endif
- }
-
diff --git a/devel/libgtop2/files/patch-sysdeps_common_fsusage.c b/devel/libgtop2/files/patch-sysdeps_common_fsusage.c
new file mode 100644
index 000000000000..b64ec49863bf
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_common_fsusage.c
@@ -0,0 +1,29 @@
+--- sysdeps/common/fsusage.c.orig Thu Mar 11 15:53:36 2004
++++ sysdeps/common/fsusage.c Thu Mar 11 15:56:37 2004
+@@ -28,7 +28,7 @@
+ # endif
+ #endif
+ #ifndef UINTMAX_MAX
+-# define UINTMAX_MAX ((uintmax_t) -1)
++# define UINTMAX_MAX ((uint64_t) -1)
+ #endif
+
+ #include <sys/types.h>
+@@ -84,7 +84,7 @@
+ a uintmax_t value that is all 1 bits if X is all 1 bits, even if X
+ is unsigned and narrower than uintmax_t. */
+ #define PROPAGATE_ALL_ONES(x) \
+- ((sizeof (x) < sizeof (uintmax_t) \
++ ((sizeof (x) < sizeof (uint64_t) \
+ && (~ (x) == (sizeof (x) < sizeof (int) \
+ ? - (1 << (sizeof (x) * CHAR_BIT)) \
+ : 0))) \
+@@ -92,7 +92,7 @@
+
+ /* Extract the top bit of X as an uintmax_t value. */
+ #define EXTRACT_TOP_BIT(x) ((x) \
+- & ((uintmax_t) 1 << (sizeof (x) * CHAR_BIT - 1)))
++ & ((uint64_t) 1 << (sizeof (x) * CHAR_BIT - 1)))
+
+ /* If a value is negative, many space usage primitives store it into an
+ integer variable by assignment, even if the variable's type is unsigned.
diff --git a/devel/libgtop2/files/patch-sysdeps_common_fsusage.h b/devel/libgtop2/files/patch-sysdeps_common_fsusage.h
new file mode 100644
index 000000000000..bca23d9aea9d
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_common_fsusage.h
@@ -0,0 +1,25 @@
+--- sysdeps/common/fsusage.h.orig Thu Mar 11 15:54:03 2004
++++ sysdeps/common/fsusage.h Thu Mar 11 15:56:12 2004
+@@ -20,15 +20,17 @@
+ #if !defined FSUSAGE_H_
+ # define FSUSAGE_H_
+
++#include <sys/types.h>
++
+ struct fs_usage
+ {
+ int fsu_blocksize; /* Size of a block. */
+- uintmax_t fsu_blocks; /* Total blocks. */
+- uintmax_t fsu_bfree; /* Free blocks available to superuser. */
+- uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */
++ uint64_t fsu_blocks; /* Total blocks. */
++ uint64_t fsu_bfree; /* Free blocks available to superuser. */
++ uint64_t fsu_bavail; /* Free blocks available to non-superuser. */
+ int fsu_bavail_top_bit_set; /* 1 if fsu_bavail represents a value < 0. */
+- uintmax_t fsu_files; /* Total file nodes. */
+- uintmax_t fsu_ffree; /* Free file nodes. */
++ uint64_t fsu_files; /* Total file nodes. */
++ uint64_t fsu_ffree; /* Free file nodes. */
+ };
+
+ # ifndef PARAMS
diff --git a/devel/libgtop2/files/patch-sysdeps_common_mountlist.c b/devel/libgtop2/files/patch-sysdeps_common_mountlist.c
index 31b0d3288347..62269380b46b 100644
--- a/devel/libgtop2/files/patch-sysdeps_common_mountlist.c
+++ b/devel/libgtop2/files/patch-sysdeps_common_mountlist.c
@@ -1,6 +1,6 @@
---- sysdeps/common/mountlist.c.orig Fri Dec 19 12:23:02 2003
-+++ sysdeps/common/mountlist.c Fri Dec 19 12:23:41 2003
-@@ -136,7 +136,7 @@
+--- sysdeps/common/mountlist.c.orig Mon Dec 1 13:59:28 2003
++++ sysdeps/common/mountlist.c Mon Dec 1 16:13:15 2003
+@@ -127,7 +127,7 @@
}
#endif /* MOUNTED_GETMNTENT1. */
@@ -9,12 +9,12 @@
static char *
fstype_to_string (t)
short t;
-@@ -354,7 +354,7 @@
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (fsp->f_mntfromname);
- me->me_mountdir = xstrdup (fsp->f_mntonname);
+@@ -345,7 +345,7 @@
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (fsp->f_mntfromname);
+ me->me_mountdir = g_strdup (fsp->f_mntonname);
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
- me->me_type = xstrdup (fsp->f_fstypename);
+ me->me_type = g_strdup (fsp->f_fstypename);
#else
- me->me_type = xstrdup (fstype_to_string (fsp->f_type));
+ me->me_type = g_strdup (fstype_to_string (fsp->f_type));
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in b/devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in
new file mode 100644
index 000000000000..16bcbb055472
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in
@@ -0,0 +1,20 @@
+--- sysdeps/freebsd/Makefile.in.orig Sun Feb 15 16:13:22 2004
++++ sysdeps/freebsd/Makefile.in Sun Feb 15 16:16:05 2004
+@@ -138,7 +138,7 @@
+
+ noinst_LTLIBRARIES = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
+
+-libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
++libgtop_sysdeps_2_0_la_SOURCES = nosuid.c
+
+ libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+
+@@ -172,7 +172,7 @@
+ X_EXTRA_LIBS = @X_EXTRA_LIBS@
+ X_PRE_LIBS = @X_PRE_LIBS@
+ libgtop_sysdeps_2_0_la_LIBADD =
+-libgtop_sysdeps_2_0_la_OBJECTS = nosuid.lo siglist.lo
++libgtop_sysdeps_2_0_la_OBJECTS = nosuid.lo
+ libgtop_sysdeps_suid_2_0_la_LIBADD =
+ libgtop_sysdeps_suid_2_0_la_OBJECTS = open.lo close.lo siglist.lo \
+ cpu.lo mem.lo swap.lo uptime.lo loadavg.lo shm_limits.lo msg_limits.lo \
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c b/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c
deleted file mode 100644
index 2aa4b753479f..000000000000
--- a/devel/libgtop2/files/patch-sysdeps_freebsd_mem.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/freebsd/mem.c.orig Tue Jan 14 17:22:18 2003
-+++ sysdeps/freebsd/mem.c Tue Jan 14 17:22:28 2003
-@@ -75,7 +75,7 @@
-
- /* MIB array for sysctl */
- static int mib_length=2;
--#ifdef __bsdi__
-+#ifndef VM_METER
- static int mib [] = { CTL_VM, VM_TOTAL };
- #else
- static int mib [] = { CTL_VM, VM_METER };
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c b/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
deleted file mode 100644
index 0e72ddb7853c..000000000000
--- a/devel/libgtop2/files/patch-sysdeps_freebsd_netload.c
+++ /dev/null
@@ -1,81 +0,0 @@
---- sysdeps/freebsd/netload.c.orig Mon Oct 20 01:55:32 2003
-+++ sysdeps/freebsd/netload.c Fri Nov 14 23:09:15 2003
-@@ -83,6 +83,7 @@
- u_long ifnetaddr, ifnetfound, ifaddraddr;
- struct sockaddr *sa;
- char tname [16];
-+ char temp [16];
-
- union {
- struct ifaddr ifa;
-@@ -109,10 +110,13 @@
- sizeof (ifnet)) != sizeof (ifnet))
- glibtop_error_io_r (server, "kvm_read (ifnetaddr)");
-
--#if defined(__FreeBSD__) || defined(__bsdi__)
-+#if (defined(__FreeBSD__) && (__FreeBSD_version < 501113)) || defined(__bsdi__)
- if (kvm_read (server->machine.kd, (u_long) ifnet.if_name,
- tname, 16) != 16)
- glibtop_error_io_r (server, "kvm_read (if_name)");
-+ snprintf(temp, (15 - strlen(tname)), "%d", ifnet.if_unit);
-+ strcat(tname, temp);
-+ tname [15] = 0;
- #else
- strncpy (tname, ifnet.if_xname, 16);
- tname [15] = 0;
-@@ -140,39 +144,39 @@
- sin = (struct sockaddr_in *)sa;
-
- if (ifnet.if_flags & IFF_UP)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_UP;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP);
- if (ifnet.if_flags & IFF_BROADCAST)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_BROADCAST;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST);
- if (ifnet.if_flags & IFF_DEBUG)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_DEBUG;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG);
- if (ifnet.if_flags & IFF_LOOPBACK)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LOOPBACK;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK);
- if (ifnet.if_flags & IFF_POINTOPOINT)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_POINTOPOINT;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT);
- if (ifnet.if_flags & IFF_RUNNING)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_RUNNING;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING);
- if (ifnet.if_flags & IFF_NOARP)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_NOARP;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP);
- if (ifnet.if_flags & IFF_PROMISC)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_PROMISC;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC);
- if (ifnet.if_flags & IFF_ALLMULTI)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_ALLMULTI;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI);
- if (ifnet.if_flags & IFF_OACTIVE)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_OACTIVE;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE);
- if (ifnet.if_flags & IFF_SIMPLEX)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_SIMPLEX;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX);
- if (ifnet.if_flags & IFF_LINK0)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK0;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0);
- if (ifnet.if_flags & IFF_LINK1)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK1;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1);
- if (ifnet.if_flags & IFF_LINK2)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK2;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2);
- #ifdef __FreeBSD__
- if (ifnet.if_flags & IFF_ALTPHYS)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_ALTPHYS;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS);
- #endif
- if (ifnet.if_flags & IFF_MULTICAST)
-- buf->if_flags |= GLIBTOP_IF_FLAGS_MULTICAST;
-+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST);
-
- #if !defined(__bsdi__)
- /* Commenting out to "fix" #13345. */
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c b/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c
new file mode 100644
index 000000000000..7dbba8c37ab1
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_uptime.c
@@ -0,0 +1,13 @@
+--- sysdeps/freebsd/uptime.c.orig Thu Mar 11 15:59:16 2004
++++ sysdeps/freebsd/uptime.c Thu Mar 11 15:59:38 2004
+@@ -68,9 +68,8 @@
+ buf->flags = _glibtop_sysdeps_uptime;
+ }
+ #else
+- buf->flags = _glibtop_sysdeps_uptime;
+-
+ glibtop_cpu cpu;
++ buf->flags = _glibtop_sysdeps_uptime;
+
+ glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0);
+
diff --git a/devel/libgtop2/pkg-descr b/devel/libgtop2/pkg-descr
index be81b3b48135..f263f1127244 100644
--- a/devel/libgtop2/pkg-descr
+++ b/devel/libgtop2/pkg-descr
@@ -1,3 +1,3 @@
-This is library for the gtop2, the GNOME 2.0 version of top command.
-The top command is a tool to display and update information about the
-top cpu processes.
+This library provides the backend for gtop2, a GNOME 2.0 version
+of top(1) that allows display and manipulation of running
+processes.
diff --git a/devel/libgtop2/pkg-plist b/devel/libgtop2/pkg-plist
index bb6b1079e8c4..e7d4a4b74b93 100644
--- a/devel/libgtop2/pkg-plist
+++ b/devel/libgtop2/pkg-plist
@@ -40,28 +40,12 @@ include/libgtop-2.0/glibtop/union.h
include/libgtop-2.0/glibtop/uptime.h
include/libgtop-2.0/glibtop/version.h
include/libgtop-2.0/glibtop/write.h
-include/libgtop-2.0/glibtop/xmalloc.h
include/libgtop-2.0/glibtop_machine.h
include/libgtop-2.0/glibtop_server.h
include/libgtop-2.0/glibtop_suid.h
lib/libgtop-2.0.a
lib/libgtop-2.0.so
lib/libgtop-2.0.so.2
-lib/libgtop_common-2.0.a
-lib/libgtop_common-2.0.so
-lib/libgtop_common-2.0.so.2
-lib/libgtop_names-2.0.a
-lib/libgtop_names-2.0.so
-lib/libgtop_names-2.0.so.2
-lib/libgtop_suid_common-2.0.a
-lib/libgtop_suid_common-2.0.so
-lib/libgtop_suid_common-2.0.so.2
-lib/libgtop_sysdeps-2.0.a
-lib/libgtop_sysdeps-2.0.so
-lib/libgtop_sysdeps-2.0.so.2
-lib/libgtop_sysdeps_suid-2.0.a
-lib/libgtop_sysdeps_suid-2.0.so
-lib/libgtop_sysdeps_suid-2.0.so.2
libdata/pkgconfig/libgtop-2.0.pc
share/locale/am/LC_MESSAGES/libgtop-2.0.mo
share/locale/ar/LC_MESSAGES/libgtop-2.0.mo
@@ -84,6 +68,7 @@ share/locale/ga/LC_MESSAGES/libgtop-2.0.mo
share/locale/gl/LC_MESSAGES/libgtop-2.0.mo
share/locale/he/LC_MESSAGES/libgtop-2.0.mo
share/locale/hi/LC_MESSAGES/libgtop-2.0.mo
+share/locale/hr/LC_MESSAGES/libgtop-2.0.mo
share/locale/hu/LC_MESSAGES/libgtop-2.0.mo
share/locale/id/LC_MESSAGES/libgtop-2.0.mo
share/locale/it/LC_MESSAGES/libgtop-2.0.mo