aboutsummaryrefslogtreecommitdiff
path: root/devel/libgtop
diff options
context:
space:
mode:
authorKoop Mast <kwm@FreeBSD.org>2013-07-31 11:57:45 +0000
committerKoop Mast <kwm@FreeBSD.org>2013-07-31 11:57:45 +0000
commita5f590e51d3b147b9b5085ac6a2920189b42967a (patch)
treecee27e48f57eafc0ae5948472d8e095072bb5222 /devel/libgtop
parenta74217e6d9281b3d195ab0ad6e6b9434f63b6d27 (diff)
downloadports-a5f590e51d3b147b9b5085ac6a2920189b42967a.tar.gz
ports-a5f590e51d3b147b9b5085ac6a2920189b42967a.zip
Notes
Diffstat (limited to 'devel/libgtop')
-rw-r--r--devel/libgtop/Makefile32
-rw-r--r--devel/libgtop/distinfo4
-rw-r--r--devel/libgtop/files/patch-configure12
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_Makefile.am17
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_Makefile.in43
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_cpu.c66
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_glibtop_machine.h10
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_nosuid.c19
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_open.c89
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_procmap.c35
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c61
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_procwd.c89
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_suid_open.c95
-rw-r--r--devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c13
-rw-r--r--devel/libgtop/pkg-plist5
15 files changed, 16 insertions, 574 deletions
diff --git a/devel/libgtop/Makefile b/devel/libgtop/Makefile
index 965e59201811..a713115027e0 100644
--- a/devel/libgtop/Makefile
+++ b/devel/libgtop/Makefile
@@ -1,14 +1,9 @@
-# New ports collection makefile for: libgtop2
-# Date Created: 29 April 2002
-# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
-#
+# Created by: Joe Marcus Clarke <marcus@FreeBSD.org>
# $FreeBSD$
-# $MCom: ports/devel/libgtop/Makefile,v 1.56 2010/05/02 00:04:47 marcus Exp $
-#
+# $MCom: ports/trunk/devel/libgtop/Makefile 18610 2013-06-30 16:33:05Z marcus $
PORTNAME= libgtop
-PORTVERSION= 2.28.3
-PORTREVISION= 2
+PORTVERSION= 2.28.4
CATEGORIES= devel gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
@@ -16,32 +11,21 @@ DIST_SUBDIR= gnome2
MAINTAINER= gnome@FreeBSD.org
COMMENT= GNOME 2 top library
-BUILD_DEPENDS= g-ir-scanner:${PORTSDIR}/devel/gobject-introspection
-
-USE_BZIP2= yes
+USE_XZ= yes
USE_PERL5_BUILD=yes
USE_XORG= xau
-USES= gettext pkgconfig
-USE_GMAKE= yes
-USE_GNOME= gnomehack glib20 ltverhack intlhack
+USES= gettext gmake pathfix pkgconfig
+USE_GNOME= gnomeprefix glib20 ltverhack intlhack
USE_LDCONFIG= yes
USE_AUTOTOOLS= libtool
-CONFIGURE_ARGS= --disable-gtk-doc \
- --with-html-dir=${PREFIX}/share/doc
CPPFLAGS+= -I${LOCALBASE}/include -DHAVE_NET_IF_VAR_H
LDFLAGS+= -L${LOCALBASE}/lib
+CONFIGURE_ARGS= --disable-introspection
INFO= libgtop2
PKGMESSAGE= ${FILESDIR}/pkg-message
-.include <bsd.port.pre.mk>
-
-.if ( ${OSVERSION} >= 800000 && ${OSVERSION} < 800019 ) || \
- ${OSVERSION} < 700104
-RUN_DEPENDS+= lsof:${PORTSDIR}/sysutils/lsof
-.endif
-
post-configure:
@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f
@@ -50,4 +34,4 @@ post-install:
@${CHMOD} 2555 ${PREFIX}/bin/libgtop_server2
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/libgtop/distinfo b/devel/libgtop/distinfo
index 4b597b32645c..96dc6955eeb1 100644
--- a/devel/libgtop/distinfo
+++ b/devel/libgtop/distinfo
@@ -1,2 +1,2 @@
-SHA256 (gnome2/libgtop-2.28.3.tar.bz2) = 2c866bd14b3cd78f78504cfb65baa105d62b8085c90e433ab9db97e050efea42
-SIZE (gnome2/libgtop-2.28.3.tar.bz2) = 793252
+SHA256 (gnome2/libgtop-2.28.4.tar.xz) = b6619cfd1540267ee81d456d1a26c72c793261586f1b00a7b9a7a229d0abe1d8
+SIZE (gnome2/libgtop-2.28.4.tar.xz) = 653940
diff --git a/devel/libgtop/files/patch-configure b/devel/libgtop/files/patch-configure
index ecacbd4ade00..5c7cb8a2a8a6 100644
--- a/devel/libgtop/files/patch-configure
+++ b/devel/libgtop/files/patch-configure
@@ -1,17 +1,5 @@
--- configure.orig 2011-03-30 10:06:27.000000000 +0200
+++ configure 2011-03-30 10:07:52.000000000 +0200
-@@ -3231,9 +3231,9 @@
- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
-- INTROSPECTION_GIRDIR=${INTROSPECTION_GIRDIR/$datadir/\$(datadir)}
-+ INTROSPECTION_GIRDIR=`echo ${INTROSPECTION_GIRDIR} | sed -e "s|${datadir}|\\\$(datadir)|"`
- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
-- INTROSPECTION_TYPELIBDIR=${INTROSPECTION_TYPELIBDIR/$libdir/\$(libdir)}
-+ INTROSPECTION_TYPELIBDIR=`echo ${INTROSPECTION_TYPELIBDIR} | sed -e "e|${libdir}|\\\$(libdir)|g"`
- INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
- INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
@@ -13230,6 +13230,78 @@
if test -n "${osreldate}" && test ${osreldate} -ge 600000 ; then
EXTRA_SYSDEPS_LIBS="-lgeom -ldevstat"
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.am b/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.am
deleted file mode 100644
index 25ec1f7d7949..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
---- sysdeps/freebsd/Makefile.am.orig 2008-09-29 17:21:56.000000000 -0400
-+++ sysdeps/freebsd/Makefile.am 2008-09-29 17:22:07.000000000 -0400
-@@ -7,12 +7,12 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.
- cpu.c msg_limits.c sem_limits.c loadavg.c \
- uptime.c netlist.c fsusage.c mem.c \
- mountlist.c procopenfiles.c procwd.c \
-- procaffinity.c glibtop_private.c
-+ procaffinity.c glibtop_private.c open.c
-
- libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
-
- libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) $(EXTRA_SYSDEPS_LIBS)
--libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c swap.c \
-+libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
- proclist.c procstate.c procuid.c \
- proctime.c procmem.c procsignal.c \
- prockernel.c procsegment.c procargs.c \
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.in b/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.in
deleted file mode 100644
index d60fe782e018..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_Makefile.in
+++ /dev/null
@@ -1,43 +0,0 @@
---- sysdeps/freebsd/Makefile.in.orig 2009-01-13 01:49:02.172092000 -0500
-+++ sysdeps/freebsd/Makefile.in 2009-01-13 01:53:30.000000000 -0500
-@@ -50,7 +50,8 @@ libgtop_sysdeps_2_0_la_LIBADD =
- am_libgtop_sysdeps_2_0_la_OBJECTS = nosuid.lo siglist.lo sysinfo.lo \
- shm_limits.lo cpu.lo msg_limits.lo sem_limits.lo loadavg.lo \
- uptime.lo netlist.lo fsusage.lo mem.lo mountlist.lo \
-- procopenfiles.lo procwd.lo procaffinity.lo glibtop_private.lo
-+ procopenfiles.lo procwd.lo procaffinity.lo glibtop_private.lo \
-+ open.lo
- libgtop_sysdeps_2_0_la_OBJECTS = $(am_libgtop_sysdeps_2_0_la_OBJECTS)
- libgtop_sysdeps_2_0_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-@@ -58,7 +59,7 @@ libgtop_sysdeps_2_0_la_LINK = $(LIBTOOL)
- am__DEPENDENCIES_1 =
- libgtop_sysdeps_suid_2_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
--am_libgtop_sysdeps_suid_2_0_la_OBJECTS = open.lo close.lo swap.lo \
-+am_libgtop_sysdeps_suid_2_0_la_OBJECTS = suid_open.lo close.lo swap.lo \
- proclist.lo procstate.lo procuid.lo proctime.lo procmem.lo \
- procsignal.lo prockernel.lo procsegment.lo procargs.lo \
- procmap.lo netload.lo ppp.lo
-@@ -296,11 +297,11 @@ libgtop_sysdeps_2_0_la_SOURCES = nosuid.
- cpu.c msg_limits.c sem_limits.c loadavg.c \
- uptime.c netlist.c fsusage.c mem.c \
- mountlist.c procopenfiles.c procwd.c \
-- procaffinity.c glibtop_private.c
-+ procaffinity.c glibtop_private.c open.c
-
- libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
- libgtop_sysdeps_suid_2_0_la_LIBADD = $(KVM_LIBS) $(EXTRA_SYSDEPS_LIBS)
--libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c swap.c \
-+libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
- proclist.c procstate.c procuid.c \
- proctime.c procmem.c procsignal.c \
- prockernel.c procsegment.c procargs.c \
-@@ -375,6 +376,7 @@ distclean-compile:
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netlist.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)/suid_open.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppp.Plo@am__quote@
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/procaffinity.Plo@am__quote@
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c b/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c
deleted file mode 100644
index 99a3e8ef8346..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_cpu.c
+++ /dev/null
@@ -1,66 +0,0 @@
---- sysdeps/freebsd/cpu.c.orig 2009-04-12 01:45:28.000000000 -0400
-+++ sysdeps/freebsd/cpu.c 2009-04-12 01:45:29.000000000 -0400
-@@ -54,6 +54,7 @@ void
- glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
- {
- long cpts [CPUSTATES];
-+ long *cp_times = NULL;
- struct clockinfo ci;
- size_t length;
- int ncpu, i;
-@@ -75,6 +76,16 @@ glibtop_get_cpu_s (glibtop *server, glib
- return;
- }
-
-+ length = 0;
-+ if (sysctlbyname ("kern.cp_times", NULL, &length, NULL, 0) == 0) {
-+ cp_times = g_malloc (length);
-+ length = sizeof(long) * CPUSTATES * (length / (sizeof(long) * CPUSTATES));
-+ if (sysctlbyname ("kern.cp_times", cp_times, &length, NULL, 0)) {
-+ g_free (cp_times);
-+ cp_times = NULL;
-+ }
-+ }
-+
- /* set user time */
- buf->user = cpts [CP_USER];
- /* set nice time */
-@@ -89,22 +100,32 @@ glibtop_get_cpu_s (glibtop *server, glib
- /* set frequency */
- buf->frequency = (ci.stathz ? ci.stathz : ci.hz);
- /* set total */
-- buf->total = cpts [CP_USER] + cpts [CP_NICE]
-+ buf->total = cpts [CP_USER] + cpts [CP_NICE] \
- + cpts [CP_SYS] + cpts [CP_IDLE] + cpts [CP_INTR];
-
- ncpu = server->ncpu + 1;
-
- for (i = 0; i < ncpu; i++) {
-- buf->xcpu_user[i] = cpts [CP_USER] / ncpu;
-- buf->xcpu_nice[i] = cpts [CP_NICE] / ncpu;
-- buf->xcpu_sys[i] = cpts [CP_SYS] / ncpu;
-- buf->xcpu_idle[i] = cpts [CP_IDLE] / ncpu;
-- buf->xcpu_irq[i] = cpts [CP_INTR] / ncpu;
-+ if (cp_times) {
-+ buf->xcpu_user[i] = cp_times[i * CPUSTATES + CP_USER];
-+ buf->xcpu_nice[i] = cp_times[i * CPUSTATES + CP_NICE];
-+ buf->xcpu_sys[i] = cp_times[i * CPUSTATES + CP_SYS];
-+ buf->xcpu_idle[i] = cp_times[i * CPUSTATES + CP_IDLE];
-+ buf->xcpu_irq[i] = cp_times[i * CPUSTATES + CP_INTR];
-+ } else {
-+ buf->xcpu_user[i] = cpts [CP_USER] / ncpu;
-+ buf->xcpu_nice[i] = cpts [CP_NICE] / ncpu;
-+ buf->xcpu_sys[i] = cpts [CP_SYS] / ncpu;
-+ buf->xcpu_idle[i] = cpts [CP_IDLE] / ncpu;
-+ buf->xcpu_irq[i] = cpts [CP_INTR] / ncpu;
-+ }
- buf->xcpu_total[i] = buf->xcpu_user[i] + buf->xcpu_nice[i] \
- + buf->xcpu_sys[i] + buf->xcpu_idle[i] \
- + buf->xcpu_irq[i];
- }
-
-+ g_free (cp_times);
-+
- /* Set the flags last. */
- buf->flags = _glibtop_sysdeps_cpu;
-
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_glibtop_machine.h b/devel/libgtop/files/patch-sysdeps_freebsd_glibtop_machine.h
deleted file mode 100644
index e3b899af1d49..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_glibtop_machine.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- sysdeps/freebsd/glibtop_machine.h.orig 2009-12-13 18:34:21.000000000 -0500
-+++ sysdeps/freebsd/glibtop_machine.h 2009-12-13 18:34:32.000000000 -0500
-@@ -24,6 +24,7 @@
-
- #include <sys/param.h>
- #include <nlist.h>
-+#include <limits.h>
- #include <kvm.h>
- #include <sys/dkstat.h>
- #include <time.h>
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_nosuid.c b/devel/libgtop/files/patch-sysdeps_freebsd_nosuid.c
deleted file mode 100644
index acb327f98162..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_nosuid.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- sysdeps/freebsd/nosuid.c.orig 2008-09-29 17:28:31.000000000 -0400
-+++ sysdeps/freebsd/nosuid.c 2008-09-29 17:28:39.000000000 -0400
-@@ -21,16 +21,8 @@
-
- #include <config.h>
- #include <glibtop.h>
--#include <glibtop/open.h>
- #include <glibtop/close.h>
-
- void
--glibtop_open_s (glibtop *server,
-- const char *program_name,
-- const unsigned long features,
-- const unsigned flags)
--{ }
--
--void
- glibtop_close_s (glibtop *server)
- { }
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_open.c b/devel/libgtop/files/patch-sysdeps_freebsd_open.c
index 213d49a23559..985caa1f4a2b 100644
--- a/devel/libgtop/files/patch-sysdeps_freebsd_open.c
+++ b/devel/libgtop/files/patch-sysdeps_freebsd_open.c
@@ -1,91 +1,14 @@
---- sysdeps/freebsd/open.c.orig 2011-12-25 11:29:32.897248000 +0000
-+++ sysdeps/freebsd/open.c 2011-12-25 11:38:05.000000000 +0000
-@@ -20,76 +20,27 @@
- */
-
- #include <config.h>
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
- #include <glibtop.h>
--#include <glibtop/error.h>
- #include <glibtop/open.h>
--#include <glibtop/init_hooks.h>
+--- sysdeps/freebsd/open.c.orig 2011-07-24 15:13:56.000000000 -0400
++++ sysdeps/freebsd/open.c 2011-12-28 16:26:48.000000000 -0500
+@@ -42,11 +42,5 @@ glibtop_open_s (glibtop *server, const c
+ sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
+ server->real_ncpu = ncpus - 1;
+ server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
-
--/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
--
--void
--glibtop_init_p (glibtop *server, const unsigned long features,
-- const unsigned flags)
--{
-- const _glibtop_init_func_t *init_fkt;
--
-- if (server == NULL)
-- glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
--
-- /* Do the initialization, but only if not already initialized. */
-+#include <glibtop/cpu.h>
-+#include <glibtop/error.h>
-
-- if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
-- glibtop_open_p (server, "glibtop", features, flags);
-+#include <glibtop_private.h>
-
-- for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++)
-- (*init_fkt) (server);
--
-- server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
-- }
--}
-
- void
--glibtop_open_p (glibtop *server, const char *program_name,
-+glibtop_open_s (glibtop *server, const char *program_name,
- const unsigned long features,
- const unsigned flags)
- {
--#ifdef DEBUG
-- fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
--#endif
--
-- /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
-+ int ncpus;
-+ size_t len;
-
-- server->machine.uid = getuid ();
-- server->machine.euid = geteuid ();
-- server->machine.gid = getgid ();
-- server->machine.egid = getegid ();
-#if defined(__FreeBSD_kernel__)
- server->os_version_code = __FreeBSD_kernel_version;
-#else
-+ len = sizeof (ncpus);
-+ sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
-+ server->real_ncpu = ncpus - 1;
-+ server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
server->os_version_code = __FreeBSD_version;
-#endif
-- /* Setup machine-specific data */
-- server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "kvm_open");
--
-- if (server->machine.kd == NULL)
-- glibtop_error_io_r (server, "kvm_open");
--
-- /* Drop priviledges. */
--
-- if (setreuid (server->machine.euid, server->machine.uid))
-- _exit (1);
--
-- if (setregid (server->machine.egid, server->machine.gid))
-- _exit (1);
--
-- /* !!! END OF SUID ROOT PART !!! */
--
-- /* Our effective uid is now those of the user invoking the server,
-- * so we do no longer have any priviledges. */
-
-- /* NOTE: On FreeBSD, we do not need to be suid root, we just need to
-- * be sgid kmem.
-- *
-- * The server will only use setegid() to get back it's priviledges,
-- * so it will fail if it is suid root and not sgid kmem. */
}
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procmap.c b/devel/libgtop/files/patch-sysdeps_freebsd_procmap.c
deleted file mode 100644
index 3a5a93bfc028..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_procmap.c
+++ /dev/null
@@ -1,35 +0,0 @@
---- sysdeps/freebsd/procmap.c.orig 2009-12-13 18:53:02.827740000 -0500
-+++ sysdeps/freebsd/procmap.c 2009-12-13 19:00:04.000000000 -0500
-@@ -85,7 +85,9 @@ _glibtop_sysdeps_freebsd_dev_inode (glib
- char tagstr[12];
- struct inode inode;
- struct cdev_priv priv;
-+#if __FreeBSD_version < 800039
- struct cdev si;
-+#endif
-
- *inum = 0;
- *dev = 0;
-@@ -111,18 +113,18 @@ _glibtop_sysdeps_freebsd_dev_inode (glib
- return;
- }
-
-- if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si,
-- sizeof (si)) != sizeof (si) ||
- #if __FreeBSD_version >= 800039
-- kvm_read (server->machine.kd, (gulong) cdev2priv(&si), (char *) &priv,
-+ if (kvm_read (server->machine.kd, (gulong) cdev2priv(inode.i_dev), (char *) &priv,
- sizeof (priv))
- #else
-+ if (kvm_read (server->machine.kd, (gulong) inode.i_dev, (char *) &si,
-+ sizeof (si)) != sizeof (si) ||
- kvm_read (server->machine.kd, (gulong) si.si_priv, (char *) &priv,
- sizeof (priv))
- #endif
- != sizeof (priv))
- {
-- glibtop_warn_io_r (server, "kvm_read (si)");
-+ glibtop_warn_io_r (server, "kvm_read (priv)");
- return;
- }
-
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c b/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c
deleted file mode 100644
index 0efedfc616d6..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_procopenfiles.c
+++ /dev/null
@@ -1,61 +0,0 @@
---- sysdeps/freebsd/procopenfiles.c.orig 2009-12-13 18:53:02.827740000 -0500
-+++ sysdeps/freebsd/procopenfiles.c 2009-12-13 18:54:55.000000000 -0500
-@@ -35,6 +35,9 @@
- #include <sys/user.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
-+#ifdef HAVE_KINFO_GETFILE
-+#include <libutil.h>
-+#endif
- #include <string.h>
- #include <stdlib.h>
-
-@@ -263,9 +266,13 @@ glibtop_get_proc_open_files_s (glibtop *
- {
- #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
- struct kinfo_file *freep, *kif;
-+#ifndef HAVE_KINFO_GETFILE
- int name[4];
- size_t len;
-- size_t i;
-+#else
-+ int cnt;
-+#endif
-+ ssize_t i;
- #else
- char *output;
- #endif
-@@ -274,6 +281,7 @@ glibtop_get_proc_open_files_s (glibtop *
- memset(buf, 0, sizeof (glibtop_proc_open_files));
-
- #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
-+#ifndef HAVE_KINFO_GETFILE
- name[0] = CTL_KERN;
- name[1] = KERN_PROC;
- name[2] = KERN_PROC_FILEDESC;
-@@ -287,12 +295,25 @@ glibtop_get_proc_open_files_s (glibtop *
- g_free(freep);
- return NULL;
- }
-+#else
-+ freep = kinfo_getfile(pid, &cnt);
-+#endif
-
- entries = g_array_new(FALSE, FALSE, sizeof(glibtop_open_files_entry));
-
-+#ifndef HAVE_KINFO_GETFILE
- for (i = 0; i < len / sizeof(*kif); i++, kif++) {
- glibtop_open_files_entry entry = {0};
-
-+ if (kif->kf_structsize != sizeof(*kif))
-+ continue;
-+#else
-+ for (i = 0; i < cnt; i++) {
-+ glibtop_open_files_entry entry = {0};
-+
-+ kif = &freep[i];
-+#endif
-+
- if (kif->kf_fd < 0)
- continue;
-
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c b/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c
deleted file mode 100644
index f29ef64d7c64..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_procwd.c
+++ /dev/null
@@ -1,89 +0,0 @@
---- sysdeps/freebsd/procwd.c.orig 2009-04-19 19:51:00.000000000 +0200
-+++ sysdeps/freebsd/procwd.c 2010-05-07 13:17:54.000000000 +0200
-@@ -27,6 +27,9 @@
- #include <sys/sysctl.h>
- #include <sys/param.h>
- #include <sys/user.h>
-+#ifdef HAVE_KINFO_GETFILE
-+#include <libutil.h>
-+#endif
- #include <string.h>
-
- static const unsigned long _glibtop_sysdeps_proc_wd =
-@@ -40,7 +43,7 @@ _glibtop_init_proc_wd_s(glibtop *server)
- server->sysdeps.proc_wd = _glibtop_sysdeps_proc_wd;
- }
-
--#if (__FreeBSD_version >= 800000 && __FreeBSD_version < 800019) || _FreeBSD_version < 700104
-+#if (__FreeBSD_version >= 800000 && __FreeBSD_version < 800019) || __FreeBSD_version < 700104
- static GPtrArray *
- parse_output(const char *output, glibtop_proc_wd *buf)
- {
-@@ -97,24 +100,39 @@ parse_output(const char *output, glibtop
- char**
- glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid)
- {
-- char path[MAXPATHLEN];
-+ int exe_mib[4];
-+ size_t len;
- #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
- struct kinfo_file *freep, *kif;
- GPtrArray *dirs;
-- size_t len;
-- int i;
-+#ifndef HAVE_KINFO_GETFILE
- int name[4];
- #else
-+ int cnt;
-+#endif
-+ int i;
-+#else
- char *output;
- #endif
-
- memset (buf, 0, sizeof (glibtop_proc_wd));
-+ len = 0;
-
-- g_snprintf(path, sizeof(path), "/proc/%u/file", pid);
-- if (safe_readlink(path, buf->exe, sizeof(buf->exe)))
-- buf->flags |= (1 << GLIBTOP_PROC_WD_EXE);
-+ exe_mib[0] = CTL_KERN;
-+ exe_mib[1] = KERN_PROC;
-+ exe_mib[2] = KERN_PROC_PATHNAME;
-+ exe_mib[3] = pid;
-+
-+ if (sysctl(exe_mib, 4, NULL, &len, NULL, 0) == 0) {
-+ if (len > sizeof(buf->exe))
-+ len = sizeof(buf->exe);
-+ if (sysctl(exe_mib, 4, buf->exe, &len, NULL, 0) == 0)
-+ buf->flags |= (1 << GLIBTOP_PROC_WD_EXE);
-+ }
-
- #if __FreeBSD_version > 800018 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 700104)
-+#ifndef HAVE_KINFO_GETFILE
-+ len = 0;
- name[0] = CTL_KERN;
- name[1] = KERN_PROC;
- name[2] = KERN_PROC_FILEDESC;
-@@ -127,10 +145,21 @@ glibtop_get_proc_wd_s(glibtop *server, g
- g_free(freep);
- return NULL;
- }
-+#else
-+ freep = kinfo_getfile(pid, &cnt);
-+#endif
-
- dirs = g_ptr_array_sized_new(1);
-
-+#ifndef HAVE_KINFO_GETFILE
- for (i = 0; i < len / sizeof(*kif); i++, kif++) {
-+ if (kif->kf_structsize != sizeof(*kif))
-+ continue;
-+#else
-+ for (i = 0; i < cnt; i++) {
-+ kif = &freep[i];
-+#endif
-+
- switch (kif->kf_fd) {
- case KF_FD_TYPE_ROOT:
- g_strlcpy(buf->root, kif->kf_path,
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_suid_open.c b/devel/libgtop/files/patch-sysdeps_freebsd_suid_open.c
deleted file mode 100644
index dec0ffb49b4c..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_suid_open.c
+++ /dev/null
@@ -1,95 +0,0 @@
---- sysdeps/freebsd/suid_open.c.orig 2009-12-13 13:47:12.739004000 -0500
-+++ sysdeps/freebsd/suid_open.c 2009-12-13 18:37:51.000000000 -0500
-@@ -0,0 +1,92 @@
-+/* Copyright (C) 1998 Joshua Sled
-+ This file is part of LibGTop 1.0.
-+
-+ Contributed by Joshua Sled <jsled@xcf.berkeley.edu>, July 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 <glibtop.h>
-+#include <glibtop/error.h>
-+#include <glibtop/cpu.h>
-+#include <glibtop/open.h>
-+#include <glibtop/init_hooks.h>
-+
-+
-+/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
-+
-+void
-+glibtop_init_p (glibtop *server, const unsigned long features,
-+ const unsigned flags)
-+{
-+ const _glibtop_init_func_t *init_fkt;
-+
-+ if (server == NULL)
-+ glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
-+
-+ /* Do the initialization, but only if not already initialized. */
-+
-+ if ((server->flags & _GLIBTOP_INIT_STATE_SYSDEPS) == 0) {
-+ glibtop_open_p (server, "glibtop", features, flags);
-+
-+ for (init_fkt = _glibtop_init_hook_p; *init_fkt; init_fkt++)
-+ (*init_fkt) (server);
-+
-+ server->flags |= _GLIBTOP_INIT_STATE_SYSDEPS;
-+ }
-+}
-+
-+void
-+glibtop_open_p (glibtop *server, const char *program_name,
-+ const unsigned long features,
-+ const unsigned flags)
-+{
-+ char errbuf[_POSIX2_LINE_MAX];
-+#ifdef DEBUG
-+ fprintf (stderr, "DEBUG (%d): glibtop_open_p ()\n", getpid ());
-+#endif
-+
-+ /* !!! WE ARE ROOT HERE - CHANGE WITH CAUTION !!! */
-+ server->machine.uid = getuid ();
-+ server->machine.euid = geteuid ();
-+ server->machine.gid = getgid ();
-+ server->machine.egid = getegid ();
-+ /* Setup machine-specific data */
-+ server->machine.kd = kvm_openfiles (NULL, NULL, NULL, O_RDONLY, errbuf);
-+
-+ if (server->machine.kd == NULL)
-+ glibtop_error_io_r (server, "kvm_open");
-+
-+ /* Drop priviledges. */
-+
-+ if (setreuid (server->machine.euid, server->machine.uid))
-+ _exit (1);
-+
-+ if (setregid (server->machine.egid, server->machine.gid))
-+ _exit (1);
-+
-+ /* !!! END OF SUID ROOT PART !!! */
-+
-+ /* Our effective uid is now those of the user invoking the server,
-+ * so we do no longer have any priviledges. */
-+
-+ /* NOTE: On FreeBSD, we do not need to be suid root, we just need to
-+ * be sgid kmem.
-+ *
-+ * The server will only use setegid() to get back it's priviledges,
-+ * so it will fail if it is suid root and not sgid kmem. */
-+}
diff --git a/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c b/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c
deleted file mode 100644
index ab5fdd66d5ee..000000000000
--- a/devel/libgtop/files/patch-sysdeps_freebsd_sysinfo.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- sysdeps/freebsd/sysinfo.c.orig 2008-05-23 18:13:23.000000000 -0400
-+++ sysdeps/freebsd/sysinfo.c 2008-09-29 14:35:25.000000000 -0400
-@@ -45,8 +45,8 @@ init_sysinfo (glibtop *server)
-
- glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);
-
-- len = sizeof (ncpus);
-- sysctlbyname ("hw.ncpu", &ncpus, &len, NULL, 0);
-+ ncpus = server->ncpu + 1;
-+
- len = 0;
- sysctlbyname ("hw.model", NULL, &len, NULL, 0);
- model = g_malloc (len);
diff --git a/devel/libgtop/pkg-plist b/devel/libgtop/pkg-plist
index 2b9a0fb28bf5..7f31d0731f45 100644
--- a/devel/libgtop/pkg-plist
+++ b/devel/libgtop/pkg-plist
@@ -43,7 +43,6 @@ include/libgtop-2.0/glibtop_private.h
include/libgtop-2.0/glibtop_server.h
include/libgtop-2.0/glibtop_suid.h
include/libgtop-2.0/libgtopconfig.h
-lib/girepository-1.0/GTop-2.0.typelib
lib/libgtop-2.0.a
lib/libgtop-2.0.la
lib/libgtop-2.0.so
@@ -91,12 +90,10 @@ libdata/pkgconfig/libgtop-2.0.pc
%%DOCSDIR%%/libgtop-version.html
%%DOCSDIR%%/libgtop-white-paper-overview.html
%%DOCSDIR%%/libgtop-white-paper.html
-%%DOCSDIR%%/libgtop.devhelp
%%DOCSDIR%%/libgtop.devhelp2
%%DOCSDIR%%/right.png
%%DOCSDIR%%/style.css
%%DOCSDIR%%/up.png
-share/gir-1.0/GTop-2.0.gir
share/locale/am/LC_MESSAGES/libgtop-2.0.mo
share/locale/ar/LC_MESSAGES/libgtop-2.0.mo
share/locale/as/LC_MESSAGES/libgtop-2.0.mo
@@ -224,5 +221,3 @@ share/locale/zh_TW/LC_MESSAGES/libgtop-2.0.mo
@dirrmtry share/locale/ast
@dirrmtry share/locale/as/LC_MESSAGES
@dirrmtry share/locale/as
-@dirrmtry share/gir-1.0
-@dirrmtry lib/girepository-1.0