summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2005-12-15 08:13:23 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2005-12-15 08:13:23 +0800
commitb1301a8538cddb271a21b270872ec5c66498f328 (patch)
tree669e16ca94f6237a18a5ffa655be00291279a813 /devel
parent966348c0a1b95e2673e09dd24e13948627af2995 (diff)
downloadmarcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar.gz
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar.bz2
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar.lz
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar.xz
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.tar.zst
marcuscom-ports-b1301a8538cddb271a21b270872ec5c66498f328.zip
Update to 2.13.0.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5293 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r--devel/libgtop2/Makefile54
-rw-r--r--devel/libgtop2/distinfo3
-rw-r--r--devel/libgtop2/files/patch-configure11
-rw-r--r--devel/libgtop2/files/patch-lib::read.c30
-rw-r--r--devel/libgtop2/files/patch-lib::write.c29
-rw-r--r--devel/libgtop2/files/patch-src::daemon::io.c57
-rw-r--r--devel/libgtop2/files/patch-src_daemon_server.c17
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in28
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_fsusage.c123
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_glibtop_server.h21
-rw-r--r--devel/libgtop2/files/patch-sysdeps_freebsd_sysinfo.c95
-rw-r--r--devel/libgtop2/files/patch-systeps::freebsd::prockernel.c15
-rw-r--r--devel/libgtop2/files/patch-systeps::freebsd::procmap.c11
-rw-r--r--devel/libgtop2/files/patch-systeps::freebsd::proctime.c31
-rw-r--r--devel/libgtop2/files/pkg-message13
-rw-r--r--devel/libgtop2/pkg-descr3
-rw-r--r--devel/libgtop2/pkg-plist127
17 files changed, 668 insertions, 0 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile
new file mode 100644
index 000000000..f0abd0635
--- /dev/null
+++ b/devel/libgtop2/Makefile
@@ -0,0 +1,54 @@
+# New ports collection makefile for: libgtop2
+# Date Created: 29 April 2002
+# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
+#
+# $FreeBSD: ports/devel/libgtop2/Makefile,v 1.96 2005/11/29 23:49:42 marcus Exp $
+# $MCom: ports/devel/libgtop2/Makefile,v 1.49 2005/09/05 19:23:42 ahze Exp $
+#
+
+PORTNAME= libgtop2
+PORTVERSION= 2.13.0
+CATEGORIES= devel gnome
+MASTER_SITES= ${MASTER_SITE_GNOME}
+MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.13
+DISTNAME= libgtop-${PORTVERSION}
+DIST_SUBDIR= gnome2
+
+MAINTAINER= gnome@FreeBSD.org
+COMMENT= GNOME 2 top library
+
+LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
+
+USE_BZIP2= yes
+USE_PERL5= yes
+USE_X_PREFIX= yes
+USE_GMAKE= yes
+USE_GNOME= gnomehack glib20 ltverhack
+USE_REINPLACE= yes
+INSTALLS_SHLIB= yes
+USE_AUTOTOOLS= libtool:15
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
+
+INFO= libgtop2
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 600000
+PKGMESSAGE= ${FILESDIR}/pkg-message
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|int64_t|gint64|g' \
+ ${WRKSRC}/include/glibtop/command.h \
+ ${WRKSRC}/include/glibtop/proclist.h \
+ ${WRKSRC}/lib/lib.pl
+
+post-install:
+ @${CHGRP} kmem ${PREFIX}/bin/libgtop_server2
+ @${CHMOD} 2555 ${PREFIX}/bin/libgtop_server2
+.if ${OSVERSION} >= 600000
+ @${CAT} ${PKGMESSAGE}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo
new file mode 100644
index 000000000..c12d2b4b6
--- /dev/null
+++ b/devel/libgtop2/distinfo
@@ -0,0 +1,3 @@
+MD5 (gnome2/libgtop-2.13.0.tar.bz2) = 6ac2f5fad264b5ce3b74ba984168c413
+SHA256 (gnome2/libgtop-2.13.0.tar.bz2) = dfa8e23e54afae5485092a1bec5ca3798cba33aa3c551bd5580c8ec755e8ede2
+SIZE (gnome2/libgtop-2.13.0.tar.bz2) = 653113
diff --git a/devel/libgtop2/files/patch-configure b/devel/libgtop2/files/patch-configure
new file mode 100644
index 000000000..9f34c540f
--- /dev/null
+++ b/devel/libgtop2/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Wed Dec 14 19:02:10 2005
++++ configure Wed Dec 14 19:04:36 2005
+@@ -24474,7 +24474,7 @@
+
+
+ case "$host_os" in
+- solaris*)
++ solaris*|freebsd*)
+
+ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
+ echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6
diff --git a/devel/libgtop2/files/patch-lib::read.c b/devel/libgtop2/files/patch-lib::read.c
new file mode 100644
index 000000000..b4ca49534
--- /dev/null
+++ b/devel/libgtop2/files/patch-lib::read.c
@@ -0,0 +1,30 @@
+--- lib/read.c.orig Mon Apr 11 03:25:32 2005
++++ lib/read.c Mon Apr 11 03:27:06 2005
+@@ -22,6 +22,7 @@
+ */
+
+ #include <config.h>
++#include <errno.h>
+ #include <glibtop/read.h>
+ #include <glibtop/error.h>
+ #include "libgtop-i18n.h"
+@@ -56,14 +57,18 @@
+ fprintf (stderr, "LIBRARY: really reading %d bytes.\n", size);
+ #endif
+
++retry:
+ if (server->socket) {
+ do_read (server->socket, buf, size);
+ } else {
+- if(read (server->input [0], buf, size) < 0)
++ if(read (server->input [0], buf, size) < 0) {
++ if (errno == EINTR)
++ goto retry;
+ glibtop_error_io_r (
+ server,
+ ngettext ("read %d byte",
+ "read %d bytes", size),
+ size);
++ }
+ }
+ }
diff --git a/devel/libgtop2/files/patch-lib::write.c b/devel/libgtop2/files/patch-lib::write.c
new file mode 100644
index 000000000..0d00f7a5f
--- /dev/null
+++ b/devel/libgtop2/files/patch-lib::write.c
@@ -0,0 +1,29 @@
+--- lib/write.c.orig Mon Apr 11 03:28:12 2005
++++ lib/write.c Mon Apr 11 03:29:00 2005
+@@ -22,7 +22,7 @@
+ */
+
+ #include <config.h>
+-
++#include <errno.h>
+ #include <glibtop/write.h>
+ #include <glibtop/error.h>
+ #include "libgtop-i18n.h"
+@@ -42,12 +42,16 @@
+ fprintf (stderr, "LIBRARY: really writing %d bytes.\n", size);
+ #endif
+
++retry:
+ if (server->socket) {
+ ret = send (server->socket, buf, size, 0);
+ } else {
+ ret = write (server->output [1], buf, size);
+ }
+
+- if (ret < 0)
++ if (ret < 0) {
++ if (errno == EINTR)
++ goto retry;
+ glibtop_error_io_r (server, ngettext ("wrote %d byte", "wrote %d bytes", size), size);
++ }
+ }
diff --git a/devel/libgtop2/files/patch-src::daemon::io.c b/devel/libgtop2/files/patch-src::daemon::io.c
new file mode 100644
index 000000000..f8fb71b03
--- /dev/null
+++ b/devel/libgtop2/files/patch-src::daemon::io.c
@@ -0,0 +1,57 @@
+--- src/daemon/io.c.orig Mon Dec 12 05:09:38 2005
++++ src/daemon/io.c Wed Dec 14 18:58:01 2005
+@@ -21,6 +21,7 @@
+ Boston, MA 02111-1307, USA.
+ */
+
++#include <errno.h>
+ #include <config.h>
+ #include "daemon.h"
+ #include <glibtop/error.h>
+@@ -37,9 +38,13 @@ do_output (int s, glibtop_response *resp
+ resp->offset = offset;
+ resp->data_size = data_size;
+
++retry1:
+ if (s == 0) {
+- if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0)
++ if (write (1, (const void *) resp, sizeof (glibtop_response)) < 0) {
++ if (errno == EINTR)
++ goto retry1;
+ glibtop_warn_io ("write");
++ }
+ } else {
+ if (send (s, (const void *) resp, sizeof (glibtop_response), 0) < 0)
+ glibtop_warn_io ("send");
+@@ -50,9 +55,13 @@ do_output (int s, glibtop_response *resp
+ fprintf (stderr, "Writing %d bytes of data.\n", resp->data_size);
+ #endif
+
++retry2:
+ if (s == 0) {
+- if (write (1, data, resp->data_size) < 0)
++ if (write (1, data, resp->data_size) < 0) {
++ if (errno == EINTR)
++ goto retry2;
+ glibtop_warn_io ("write");
++ }
+ } else {
+ if (send (s, data, resp->data_size, 0) , 0)
+ glibtop_warn_io ("send");
+@@ -68,6 +77,7 @@ do_read (int s, void *ptr, size_t total_
+ size_t already_read = 0, remaining = total_size;
+
+ while (already_read < total_size) {
++retry:
+ if (s)
+ nread = recv (s, ptr, remaining, 0);
+ else
+@@ -79,6 +89,8 @@ do_read (int s, void *ptr, size_t total_
+ }
+
+ if (nread <= 0) {
++ if (errno == EINTR)
++ goto retry;
+ glibtop_warn_io ("recv");
+ return 0;
+ }
diff --git a/devel/libgtop2/files/patch-src_daemon_server.c b/devel/libgtop2/files/patch-src_daemon_server.c
new file mode 100644
index 000000000..bf0bba5c7
--- /dev/null
+++ b/devel/libgtop2/files/patch-src_daemon_server.c
@@ -0,0 +1,17 @@
+--- src/daemon/server.c.orig Mon Feb 17 15:22:19 2003
++++ src/daemon/server.c Mon Feb 17 15:23:31 2003
+@@ -88,11 +88,12 @@
+ if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
+ strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
+ strcmp (uts.machine, LIBGTOP_COMPILE_MACHINE)) {
+- fprintf (stderr, "Can only run on %s %s %s\n",
++ fprintf (stderr, "This libgtop was compiled on %s %s %s\n",
+ LIBGTOP_COMPILE_SYSTEM,
+ LIBGTOP_COMPILE_RELEASE,
+ LIBGTOP_COMPILE_MACHINE);
+- _exit (1);
++ fprintf (stderr, "If you see strange problems caused by it,\n");
++ fprintf (stderr, "you should recompile libgtop and dependent applications\n");
+ }
+ #endif
+
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 000000000..08dfe60ff
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_Makefile.in
@@ -0,0 +1,28 @@
+--- sysdeps/freebsd/Makefile.in.orig Wed Dec 14 19:06:42 2005
++++ sysdeps/freebsd/Makefile.in Wed Dec 14 19:07:32 2005
+@@ -58,7 +58,7 @@
+ mem.lo swap.lo uptime.lo loadavg.lo shm_limits.lo \
+ msg_limits.lo sem_limits.lo proclist.lo procstate.lo \
+ procuid.lo proctime.lo procmem.lo procsignal.lo prockernel.lo \
+- procsegment.lo procargs.lo procmap.lo netlist.lo netload.lo \
++ procsegment.lo procargs.lo procmap.lo sysinfo.lo netlist.lo netload.lo \
+ ppp.lo procopenfiles.lo fsusage.lo
+ libgtop_sysdeps_suid_2_0_la_OBJECTS = \
+ $(am_libgtop_sysdeps_suid_2_0_la_OBJECTS)
+@@ -263,7 +263,7 @@
+ sem_limits.c proclist.c procstate.c procuid.c \
+ proctime.c procmem.c procsignal.c prockernel.c \
+ procsegment.c procargs.c procmap.c netlist.c \
+- netload.c ppp.c procopenfiles.c fsusage.c
++ netload.c ppp.c procopenfiles.c sysinfo.c fsusage.c
+
+ libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
+ libgtopinclude_HEADERS = glibtop_server.h glibtop_machine.h \
+@@ -330,6 +330,7 @@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mem.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_limits.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlist.Plo@am__quote@
++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sysinfo.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netload.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nosuid.Plo@am__quote@
+ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_fsusage.c b/devel/libgtop2/files/patch-sysdeps_freebsd_fsusage.c
new file mode 100644
index 000000000..128eda35b
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_fsusage.c
@@ -0,0 +1,123 @@
+--- sysdeps/freebsd/fsusage.c.orig Mon Feb 28 03:54:41 2005
++++ sysdeps/freebsd/fsusage.c Tue May 24 01:49:42 2005
+@@ -9,6 +9,12 @@
+ #include <unistd.h>
+ #include <sys/param.h>
+ #include <sys/mount.h>
++#if __FreeBSD_version >= 600000
++#include <libgeom.h>
++#include <sys/resource.h>
++#include <devstat.h>
++#include <sys/devicestat.h>
++#endif
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -27,15 +33,107 @@ _glibtop_freebsd_get_fsusage_read_write(
+ {
+ int result;
+ struct statfs sfs;
++#if __FreeBSD_version >= 600000
++ struct devstat *ds;
++ void *sc;
++ struct timespec ts;
++ struct gprovider *gp;
++ struct gident *gid;
++ struct gmesh gmp;
++ double etime;
++ uint64_t ld[2];
++#endif
+
+ result = statfs (path, &sfs);
+
+ if (result == -1) {
++ glibtop_warn_io_r (server, "statfs");
+ return;
+ }
++#if __FreeBSD_version >= 600000
++ ld[0] = 0;
++ ld[1] = 0;
++ result = geom_gettree (&gmp);
++ if (result != 0) {
++ glibtop_warn_io_r (server, "geom_gettree = %d", result);
++ return;
++ }
++
++ result = geom_stats_open ();
++ if (result) {
++ glibtop_warn_io_r (server, "geom_stats_open()");
++ geom_deletetree (&gmp);
++ return;
++ }
++
++ sc = geom_stats_snapshot_get ();
++ if (sc == NULL) {
++ glibtop_warn_io_r (server, "geom_stats_snapshot_get()");
++ geom_stats_close ();
++ geom_deletetree (&gmp);
++ return;
++ }
++
++ geom_stats_snapshot_timestamp (sc, &ts);
++ etime = ts.tv_sec + (ts.tv_nsec * 1e-9);
++ geom_stats_snapshot_reset (sc);
++
++ for (;;) {
++ ds = geom_stats_snapshot_next (sc);
++ if (ds == NULL) {
++ break;
++ }
++ if (ds->id == NULL) {
++ continue;
++ }
++
++ gid = geom_lookupid (&gmp, ds->id);
++ if (gid == NULL) {
++ geom_deletetree (&gmp);
++ result = geom_gettree (&gmp);
++ gid = geom_lookupid (&gmp, ds->id);
++ }
++
++ if (gid == NULL) {
++ continue;
++ }
++ if (gid->lg_what == ISCONSUMER) {
++ continue;
++ }
++
++ gp = gid->lg_ptr;
++
++ if (!g_str_has_suffix (sfs.f_mntfromname, gp->lg_name)) {
++ continue;
++ }
++ else {
++ result = devstat_compute_statistics (ds, NULL, etime,
++ DSM_TOTAL_TRANSFERS_READ,
++ &ld[0],
++ DSM_TOTAL_TRANSFERS_WRITE,
++ &ld[1], DSM_NONE);
++ if (result != 0) {
++ glibtop_warn_io_r (server,
++ "devstat_compute_statistics()");
++ geom_stats_snapshot_free (sc);
++ geom_stats_close ();
++ geom_deletetree (&gmp);
++ return;
++ }
++ break;
++ }
++ }
+
++ geom_stats_snapshot_free (sc);
++ geom_stats_close ();
++ geom_deletetree (&gmp);
++
++ buf->read = ld[0];
++ buf->write = ld[1];
++#else
+ buf->read = sfs.f_syncreads + sfs.f_asyncreads;
+ buf->write = sfs.f_syncwrites + sfs.f_asyncwrites;
++#endif
+
+ buf->flags |= (1 << GLIBTOP_FSUSAGE_READ) | (1 << GLIBTOP_FSUSAGE_WRITE);
+ }
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_glibtop_server.h b/devel/libgtop2/files/patch-sysdeps_freebsd_glibtop_server.h
new file mode 100644
index 000000000..5ded2dc3c
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_glibtop_server.h
@@ -0,0 +1,21 @@
+--- sysdeps/freebsd/glibtop_server.h.orig Mon Oct 20 11:19:49 2003
++++ sysdeps/freebsd/glibtop_server.h Mon Aug 8 15:10:14 2005
+@@ -21,8 +21,8 @@
+ Boston, MA 02111-1307, USA.
+ */
+
+-#ifndef __GLIBTOP_SERVER_H__
+-#define __GLIBTOP_SERVER_H__
++#ifndef __FREEBSD__GLIBTOP_SERVER_H__
++#define __FREEBSD__GLIBTOP_SERVER_H__
+
+ G_BEGIN_DECLS
+
+@@ -45,6 +45,7 @@ G_BEGIN_DECLS
+ #define GLIBTOP_SUID_PROC_ARGS (1 << GLIBTOP_SYSDEPS_PROC_ARGS)
+ #define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
+ #define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
++#define GLIBTOP_SUID_NETLIST 0
+ #define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
+
+ G_END_DECLS
diff --git a/devel/libgtop2/files/patch-sysdeps_freebsd_sysinfo.c b/devel/libgtop2/files/patch-sysdeps_freebsd_sysinfo.c
new file mode 100644
index 000000000..bb09b138f
--- /dev/null
+++ b/devel/libgtop2/files/patch-sysdeps_freebsd_sysinfo.c
@@ -0,0 +1,95 @@
+--- sysdeps/freebsd/sysinfo.c.orig Thu Jun 9 22:56:29 2005
++++ sysdeps/freebsd/sysinfo.c Thu Jun 9 22:58:36 2005
+@@ -0,0 +1,92 @@
++/* $Id: patch-sysdeps_freebsd_sysinfo.c,v 1.3 2005-12-15 00:13:23 marcus Exp $ */
++
++/* Copyright (C) 1998-99 Martin Baulig
++ This file is part of LibGTop 1.0.
++
++ Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
++
++ LibGTop is free software; you can redistribute it and/or modify it
++ under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License,
++ or (at your option) any later version.
++
++ LibGTop is distributed in the hope that it will be useful, but WITHOUT
++ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with LibGTop; see the file COPYING. If not, write to the
++ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
++ Boston, MA 02111-1307, USA.
++*/
++
++#include <config.h>
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <glibtop/error.h>
++#include <glibtop/cpu.h>
++#include <glibtop/sysinfo.h>
++
++static const unsigned long _glibtop_sysdeps_sysinfo =
++(1L << GLIBTOP_SYSINFO_CPUINFO);
++
++static glibtop_sysinfo sysinfo = { .flags = 0 };
++
++static void
++init_sysinfo (glibtop *server)
++{
++ char *model;
++ int ncpus = 1;
++ int mhz = 0;
++ size_t len;
++
++ if(G_LIKELY(sysinfo.flags)) return;
++
++ glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
++
++ len = sizeof (ncpus);
++ sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
++ len = 0;
++ sysctlbyname ("hw.model", NULL, &len, NULL, 0);
++ model = malloc (len);
++ sysctlbyname ("hw.model", model, &len, NULL, 0);
++ len = sizeof (mhz);
++ sysctlbyname ("hw.clockrate", &mhz, &len, NULL, 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,
++ g_free, g_free);
++
++ cpuinfo->descriptions = g_hash_table_new_full(g_str_hash, g_str_equal,
++ g_free, g_free);
++
++ g_ptr_array_add (cpuinfo->labels, "processor");
++ g_hash_table_insert (cpuinfo->values, "processor", &sysinfo.ncpu);
++
++ g_ptr_array_add (cpuinfo->labels, "vendor_id");
++ g_hash_table_insert (cpuinfo->values, "vendor_id", model);
++
++ g_ptr_array_add (cpuinfo->labels, "cpu MHz");
++ g_hash_table_insert (cpuinfo->values, "cpu MHz", &mhz);
++
++ }
++
++ free (model);
++
++ sysinfo.flags = _glibtop_sysdeps_sysinfo;
++}
++
++const glibtop_sysinfo *
++glibtop_get_sysinfo_s (glibtop *server)
++{
++ init_sysinfo (server);
++ return &sysinfo;
++}
diff --git a/devel/libgtop2/files/patch-systeps::freebsd::prockernel.c b/devel/libgtop2/files/patch-systeps::freebsd::prockernel.c
new file mode 100644
index 000000000..f23b1cdae
--- /dev/null
+++ b/devel/libgtop2/files/patch-systeps::freebsd::prockernel.c
@@ -0,0 +1,15 @@
+--- sysdeps/freebsd/prockernel.c Mon Jul 19 05:33:56 2004
++++ sysdeps/freebsd/prockernel.c.orig Sat Mar 19 02:39:47 2005
+@@ -115,8 +115,10 @@
+
+ /* 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 >= 500013)
+
diff --git a/devel/libgtop2/files/patch-systeps::freebsd::procmap.c b/devel/libgtop2/files/patch-systeps::freebsd::procmap.c
new file mode 100644
index 000000000..c8c701e46
--- /dev/null
+++ b/devel/libgtop2/files/patch-systeps::freebsd::procmap.c
@@ -0,0 +1,11 @@
+--- 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;
+ }
+
diff --git a/devel/libgtop2/files/patch-systeps::freebsd::proctime.c b/devel/libgtop2/files/patch-systeps::freebsd::proctime.c
new file mode 100644
index 000000000..9857d6cb8
--- /dev/null
+++ b/devel/libgtop2/files/patch-systeps::freebsd::proctime.c
@@ -0,0 +1,31 @@
+--- sysdeps/freebsd/proctime.c.orig Wed Feb 23 03:20:45 2005
++++ sysdeps/freebsd/proctime.c Tue Aug 2 12:49:38 2005
+@@ -146,8 +146,10 @@ glibtop_get_proc_time_p (glibtop *server
+
+ /* 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 >= 500013)
+ buf->rtime = pinfo [0].ki_runtime;
+@@ -193,9 +195,13 @@ glibtop_get_proc_time_p (glibtop *server
+ if ((pinfo [0].ki_flag & P_INMEM)) {
+ #endif
+ buf->utime = pinfo [0].ki_runtime;
+- buf->stime = 0; /* XXX */
++ buf->stime = tv2sec (pinfo [0].ki_rusage.ru_stime);
+ buf->cutime = tv2sec (pinfo [0].ki_childtime);
+- buf->cstime = 0; /* XXX */
++#if __FreeBSD_version >= 600000
++ buf->cstime = tv2sec (pinfo [0].ki_rusage_ch.ru_stime);
++#else
++ buf->cstime = 0;
++#endif
+ buf->start_time = tv2sec (pinfo [0].ki_start);
+ buf->flags = _glibtop_sysdeps_proc_time_user;
+ }
diff --git a/devel/libgtop2/files/pkg-message b/devel/libgtop2/files/pkg-message
new file mode 100644
index 000000000..dacaf62a9
--- /dev/null
+++ b/devel/libgtop2/files/pkg-message
@@ -0,0 +1,13 @@
+===============================================================================
+
+In order to use the File System read/write monitor, you must chmod
+/dev/devstat so that all users can open it read-only. For example:
+
+# chmod 0444 /dev/devstat
+
+In order for this to persist across reboots, add the following to
+/etc/devfs.conf:
+
+perm devstat 0444
+
+===============================================================================
diff --git a/devel/libgtop2/pkg-descr b/devel/libgtop2/pkg-descr
new file mode 100644
index 000000000..f263f1127
--- /dev/null
+++ b/devel/libgtop2/pkg-descr
@@ -0,0 +1,3 @@
+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
new file mode 100644
index 000000000..a20be8fdc
--- /dev/null
+++ b/devel/libgtop2/pkg-plist
@@ -0,0 +1,127 @@
+bin/libgtop_daemon2
+bin/libgtop_server2
+include/libgtop-2.0/glibtop.h
+include/libgtop-2.0/glibtop/close.h
+include/libgtop-2.0/glibtop/command.h
+include/libgtop-2.0/glibtop/cpu.h
+include/libgtop-2.0/glibtop/fsusage.h
+include/libgtop-2.0/glibtop/global.h
+include/libgtop-2.0/glibtop/gnuserv.h
+include/libgtop-2.0/glibtop/inodedb.h
+include/libgtop-2.0/glibtop/loadavg.h
+include/libgtop-2.0/glibtop/mem.h
+include/libgtop-2.0/glibtop/mountlist.h
+include/libgtop-2.0/glibtop/msg_limits.h
+include/libgtop-2.0/glibtop/netlist.h
+include/libgtop-2.0/glibtop/netload.h
+include/libgtop-2.0/glibtop/open.h
+include/libgtop-2.0/glibtop/parameter.h
+include/libgtop-2.0/glibtop/ppp.h
+include/libgtop-2.0/glibtop/procargs.h
+include/libgtop-2.0/glibtop/prockernel.h
+include/libgtop-2.0/glibtop/proclist.h
+include/libgtop-2.0/glibtop/procmap.h
+include/libgtop-2.0/glibtop/procmem.h
+include/libgtop-2.0/glibtop/procopenfiles.h
+include/libgtop-2.0/glibtop/procsegment.h
+include/libgtop-2.0/glibtop/procsignal.h
+include/libgtop-2.0/glibtop/procstate.h
+include/libgtop-2.0/glibtop/proctime.h
+include/libgtop-2.0/glibtop/procuid.h
+include/libgtop-2.0/glibtop/sem_limits.h
+include/libgtop-2.0/glibtop/shm_limits.h
+include/libgtop-2.0/glibtop/signal.h
+include/libgtop-2.0/glibtop/swap.h
+include/libgtop-2.0/glibtop/sysdeps.h
+include/libgtop-2.0/glibtop/sysinfo.h
+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_machine.h
+include/libgtop-2.0/glibtop_server.h
+include/libgtop-2.0/glibtop_suid.h
+include/libgtop-2.0/libgtopconfig.h
+lib/libgtop-2.0.a
+lib/libgtop-2.0.so
+lib/libgtop-2.0.so.0
+libdata/pkgconfig/libgtop-2.0.pc
+share/locale/am/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ar/LC_MESSAGES/libgtop-2.0.mo
+share/locale/az/LC_MESSAGES/libgtop-2.0.mo
+share/locale/be/LC_MESSAGES/libgtop-2.0.mo
+share/locale/bg/LC_MESSAGES/libgtop-2.0.mo
+share/locale/bn/LC_MESSAGES/libgtop-2.0.mo
+share/locale/bs/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ca/LC_MESSAGES/libgtop-2.0.mo
+share/locale/cs/LC_MESSAGES/libgtop-2.0.mo
+share/locale/cy/LC_MESSAGES/libgtop-2.0.mo
+share/locale/da/LC_MESSAGES/libgtop-2.0.mo
+share/locale/de/LC_MESSAGES/libgtop-2.0.mo
+share/locale/el/LC_MESSAGES/libgtop-2.0.mo
+share/locale/en_CA/LC_MESSAGES/libgtop-2.0.mo
+share/locale/en_GB/LC_MESSAGES/libgtop-2.0.mo
+share/locale/es/LC_MESSAGES/libgtop-2.0.mo
+share/locale/et/LC_MESSAGES/libgtop-2.0.mo
+share/locale/eu/LC_MESSAGES/libgtop-2.0.mo
+share/locale/fa/LC_MESSAGES/libgtop-2.0.mo
+share/locale/fi/LC_MESSAGES/libgtop-2.0.mo
+share/locale/fr/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ga/LC_MESSAGES/libgtop-2.0.mo
+share/locale/gl/LC_MESSAGES/libgtop-2.0.mo
+share/locale/gu/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
+share/locale/ja/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ko/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ku/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ky/LC_MESSAGES/libgtop-2.0.mo
+share/locale/lt/LC_MESSAGES/libgtop-2.0.mo
+share/locale/lv/LC_MESSAGES/libgtop-2.0.mo
+share/locale/mi/LC_MESSAGES/libgtop-2.0.mo
+share/locale/mk/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ml/LC_MESSAGES/libgtop-2.0.mo
+share/locale/mn/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ms/LC_MESSAGES/libgtop-2.0.mo
+share/locale/nb/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ne/LC_MESSAGES/libgtop-2.0.mo
+share/locale/nl/LC_MESSAGES/libgtop-2.0.mo
+share/locale/nn/LC_MESSAGES/libgtop-2.0.mo
+share/locale/no/LC_MESSAGES/libgtop-2.0.mo
+share/locale/or/LC_MESSAGES/libgtop-2.0.mo
+share/locale/pa/LC_MESSAGES/libgtop-2.0.mo
+share/locale/pl/LC_MESSAGES/libgtop-2.0.mo
+share/locale/pt/LC_MESSAGES/libgtop-2.0.mo
+share/locale/pt_BR/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ro/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ru/LC_MESSAGES/libgtop-2.0.mo
+share/locale/rw/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sk/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sl/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sq/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sr/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sr@Latn/LC_MESSAGES/libgtop-2.0.mo
+share/locale/sv/LC_MESSAGES/libgtop-2.0.mo
+share/locale/ta/LC_MESSAGES/libgtop-2.0.mo
+share/locale/th/LC_MESSAGES/libgtop-2.0.mo
+share/locale/tr/LC_MESSAGES/libgtop-2.0.mo
+share/locale/uk/LC_MESSAGES/libgtop-2.0.mo
+share/locale/vi/LC_MESSAGES/libgtop-2.0.mo
+share/locale/xh/LC_MESSAGES/libgtop-2.0.mo
+share/locale/zh_CN/LC_MESSAGES/libgtop-2.0.mo
+share/locale/zh_TW/LC_MESSAGES/libgtop-2.0.mo
+@dirrm include/libgtop-2.0/glibtop
+@dirrm include/libgtop-2.0
+@unexec rmdir %D/share/locale/xh/LC_MESSAGES 2> /dev/null || true
+@unexec rmdir %D/share/locale/xh 2> /dev/null || true
+@unexec rmdir %D/share/locale/rw/LC_MESSAGES 2> /dev/null || true
+@unexec rmdir %D/share/locale/rw 2> /dev/null || true
+@unexec rmdir %D/share/locale/mi/LC_MESSAGES 2> /dev/null || true
+@unexec rmdir %D/share/locale/mi 2> /dev/null || true
+@unexec rmdir %D/share/locale/ky/LC_MESSAGES 2> /dev/null || true
+@unexec rmdir %D/share/locale/ky 2> /dev/null || true
+@unexec rmdir %D/share/locale/ku/LC_MESSAGES 2> /dev/null || true
+@unexec rmdir %D/share/locale/ku 2> /dev/null || true