pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/libgtop Finish move of libgtop from devel to ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/d8c9141b362d
branches: trunk
changeset: 472014:d8c9141b362d
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Fri Apr 02 12:13:57 2004 +0000
description:
Finish move of libgtop from devel to sysutils, incomplete due to conflicts...
So I now see the package was previously here; the reason for the move is to
lighten a bit the devel category, which has lots of packages.
diffstat:
sysutils/libgtop/Makefile | 55 +++++++++++++++++
sysutils/libgtop/patches/patch-aa | 19 ++++++
sysutils/libgtop/patches/patch-ab | 48 +++++++++++++++
sysutils/libgtop/patches/patch-ac | 18 +++++
sysutils/libgtop/patches/patch-ad | 17 +++++
sysutils/libgtop/patches/patch-ae | 81 +++++++++++++++++++++++++
sysutils/libgtop/patches/patch-af | 28 ++++++++
sysutils/libgtop/patches/patch-ag | 16 +++++
sysutils/libgtop/patches/patch-al | 120 ++++++++++++++++++++++++++++++++++++++
9 files changed, 402 insertions(+), 0 deletions(-)
diffs (truncated from 438 to 300 lines):
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/Makefile Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,55 @@
+# $NetBSD: Makefile,v 1.5 2004/04/02 12:13:57 jmmv Exp $
+
+DISTNAME= libgtop-1.0.13
+PKGREVISION= 4
+CATEGORIES= sysutils gnome
+MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/1.0/}
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= tron%NetBSD.org@localhost
+HOMEPAGE= http://www.gnome.org/
+COMMENT= Library to retrieve system information, used in GNOME
+
+BUILD_USES_MSGFMT= yes
+
+NOT_FOR_PLATFORM= SunOS-*-*
+OSVERSION_SPECIFIC= yes
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == NetBSD
+. if (${MACHINE_ARCH} != alpha) && (${MACHINE_ARCH} != x86_64) && \
+ (${MACHINE_ARCH} != arm) && (${MACHINE_ARCH} != arm32) && \
+ (${MACHINE_ARCH} != i386) && (${MACHINE_ARCH} != m68k) && \
+ (${MACHINE_ARCH} != mipsel) && (${MACHINE_ARCH} != powerpc) && \
+ (${MACHINE_ARCH} != sparc) && (${MACHINE_ARCH} != sparc64)
+PKG_FAIL_REASON= "${PKGNAME} has not yet been ported to ${MACHINE_ARCH}."
+PKG_FAIL_REASON+= "Please look at /usr/include/${MACHINE_ARCH}/pcb.h"
+PKG_FAIL_REASON+= "and update patches/patch-al appropriately."
+PKG_FAIL_REASON+= "(More information can be found in libgtop.info.)"
+. endif
+.endif
+
+USE_PERL5= build
+USE_BUILDLINK2= yes
+USE_PKGLOCALEDIR= yes
+USE_X11BASE= YES
+USE_GNU_TOOLS+= make
+USE_LIBTOOL= YES
+USE_MAKEINFO= YES
+INFO_FILES= libgtop.info
+
+# The following flags are for debugging purposes. They don't need to
+# be used unless you are actively developing/debugging libgtop.
+#CPPFLAGS+= -DLIBGTOP_ENABLE_DEBUG -DLIBGTOP_FATAL_WARNINGS
+#CFLAGS+= -g
+#LDFLAGS+= -g
+
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --with-glib-prefix=${BUILDLINK_PREFIX.glib} \
+ --with-catgets --with-libgtop-guile=no
+CONFIGURE_ENV+= AWK="${AWK}" LN_S="${LN} -s" PERL="${PERL5}"
+
+.include "../../devel/gettext-lib/buildlink2.mk"
+.include "../../x11/gnome-libs/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-aa Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-aa,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
+--- sysdeps/freebsd/glibtop_machine.h.orig Mon Nov 26 23:37:59 2001
++++ sysdeps/freebsd/glibtop_machine.h Sun Jan 19 23:18:04 2003
+@@ -39,6 +39,14 @@
+ #include <osreldate.h>
+ #endif
+
++#ifdef __NetBSD__
++#include <sys/proc.h>
++
++#ifndef SRUN
++#define SRUN SACTIVE
++#endif
++#endif
++
+ BEGIN_LIBGTOP_DECLS
+
+ typedef struct _glibtop_machine glibtop_machine;
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-ab Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,48 @@
+$NetBSD: patch-ab,v 1.4 2004/04/02 12:13:57 jmmv Exp $
+
+--- sysdeps/freebsd/procsignal.c.orig Sun Feb 13 22:31:39 2000
++++ sysdeps/freebsd/procsignal.c Wed Jan 3 00:42:45 2001
+@@ -70,7 +70,9 @@
+ /* signal: mask of pending signals.
+ * pinfo [0].kp_proc.p_siglist
+ */
+-#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
++#if defined(__NetBSD__) && (__NetBSD_Version__ > 105150000)
++ buf->signal [0] = pinfo [0].kp_proc.p_sigctx.ps_siglist.__bits[0];
++#elif (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
+ buf->signal [0] = pinfo [0].kp_proc.p_siglist.__bits[0];
+ #else
+ buf->signal [0] = pinfo [0].kp_proc.p_siglist;
+@@ -79,7 +81,9 @@
+ /* blocked: mask of blocked signals.
+ * pinfo [0].kp_proc.p_sigmask
+ */
+-#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
++#if defined(__NetBSD__) && (__NetBSD_Version__ > 105150000)
++ buf->blocked [0] = pinfo [0].kp_proc.p_sigctx.ps_sigmask.__bits[0];
++#elif (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
+ buf->blocked [0] = pinfo [0].kp_proc.p_sigmask.__bits[0];
+ #else
+ buf->blocked [0] = pinfo [0].kp_proc.p_sigmask;
+@@ -88,7 +92,9 @@
+ /* sigignore: mask of ignored signals.
+ * pinfo [0].kp_proc.p_sigignore
+ */
+-#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
++#if defined(__NetBSD__) && (__NetBSD_Version__ > 105150000)
++ buf->sigignore [0] = pinfo [0].kp_proc.p_sigctx.ps_sigignore.__bits[0];
++#elif (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
+ buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore.__bits[0];
+ #else
+ buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore;
+@@ -97,7 +103,9 @@
+ /* sigcatch: mask of caught signals.
+ * pinfo [0].kp_proc.p_sigcatch
+ */
+-#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
++#if defined(__NetBSD__) && (__NetBSD_Version__ > 105150000)
++ buf->sigcatch [0] = pinfo [0].kp_proc.p_sigctx.ps_sigcatch.__bits[0];
++#elif (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011)
+ buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch.__bits[0];
+ #else
+ buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch;
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-ac Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-ac,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
+--- include/glibtop/procstate.h.orig Tue Feb 23 06:43:11 1999
++++ include/glibtop/procstate.h Sun Aug 29 19:50:34 1999
+@@ -36,6 +36,13 @@
+
+ #define GLIBTOP_MAX_PROC_STATE 4
+
++#define GLIBTOP_PROCESS_RUNNING 1
++#define GLIBTOP_PROCESS_INTERRUPTIBLE 2
++#define GLIBTOP_PROCESS_UNINTERRUPTIBLE 4
++#define GLIBTOP_PROCESS_ZOMBIE 8
++#define GLIBTOP_PROCESS_STOPPED 16
++#define GLIBTOP_PROCESS_SWAPPING 32
++
+ typedef struct _glibtop_proc_state glibtop_proc_state;
+
+ /* Name and status */
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-ad Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-ad,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
+--- sysdeps/freebsd/procargs.c.orig Thu May 27 16:04:01 1999
++++ sysdeps/freebsd/procargs.c Sat Jun 3 23:18:52 2000
+@@ -83,9 +83,9 @@
+
+ args = kvm_getargv (server->machine.kd, pinfo, max_len);
+ if (args == NULL) {
+- glibtop_suid_leave (server);
+- glibtop_warn_io_r (server, "kvm_getargv (%d)", pid);
+- return NULL;
++ static char *dummy = NULL;
++
++ args = &dummy;
+ }
+
+ glibtop_suid_leave (server);
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-ae Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,81 @@
+$NetBSD: patch-ae,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
+--- sysdeps/freebsd/cpu.c.orig Sun Feb 13 16:47:58 2000
++++ sysdeps/freebsd/cpu.c
+@@ -27,11 +27,16 @@
+
+ #include <glibtop_suid.h>
+
++#ifdef __NetBSD__
++#include <sys/sched.h>
++#endif
++
+ static const unsigned long _glibtop_sysdeps_cpu =
+ (1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) +
+ (1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) +
+ (1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY);
+
++#ifndef KERN_CP_TIME
+ /* nlist structure for kernel access */
+ static struct nlist nlst [] = {
+ #ifdef __bsdi__
+@@ -41,21 +46,27 @@
+ #endif
+ { 0 }
+ };
++#endif
+
+ /* MIB array for sysctl */
+ static int mib_length=2;
+ static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
++#ifdef KERN_CP_TIME
++static int mib2 [] = { CTL_KERN, KERN_CP_TIME };
++#endif
+
+ /* Init function. */
+
+ void
+ glibtop_init_cpu_p (glibtop *server)
+ {
++#ifndef KERN_CP_TIME
+ if (kvm_nlist (server->machine.kd, nlst) < 0) {
+ glibtop_warn_io_r (server, "kvm_nlist (cpu)");
+ return;
+ }
+
++#endif
+ /* Set this only if kvm_nlist () succeeded. */
+ server->sysdeps.cpu = _glibtop_sysdeps_cpu;
+ }
+@@ -65,7 +76,11 @@
+ void
+ glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
+ {
++#ifdef KERN_CP_TIME
++ u_int64_t cpts [CPUSTATES];
++#else
+ long cpts [CPUSTATES];
++#endif
+ /* sysctl vars*/
+ struct clockinfo ci;
+ size_t length;
+@@ -78,11 +93,19 @@
+ if (server->sysdeps.cpu == 0)
+ return;
+
++#ifdef KERN_CP_TIME
++ length = sizeof (cpts);
++ if (sysctl (mib2, mib_length, cpts, &length, NULL, 0)) {
++ glibtop_warn_io_r (server, "sysctl");
++ return;
++ }
++#else
+ if (kvm_read (server->machine.kd, nlst [0].n_value,
+ &cpts, sizeof (cpts)) != sizeof (cpts)) {
+ glibtop_warn_io_r (server, "kvm_read (cp_time)");
+ return;
+ }
++#endif
+
+ /* Get the clockrate data */
+ length = sizeof (struct clockinfo);
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-af Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-af,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
+--- sysdeps/freebsd/procstate.c.orig Mon Nov 26 23:37:59 2001
++++ sysdeps/freebsd/procstate.c Sun Jan 19 23:21:15 2003
+@@ -99,9 +99,11 @@
+ case SRUN:
+ buf->state = GLIBTOP_PROCESS_RUNNING;
+ break;
++#ifdef SSLEEP
+ case SSLEEP:
+ buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE;
+ break;
++#endif
+ case SSTOP:
+ buf->state = GLIBTOP_PROCESS_STOPPED;
+ break;
+@@ -119,9 +121,11 @@
+ case SRUN:
+ buf->state = 'R';
+ break;
++#ifdef SSLEEP
+ case SSLEEP:
+ buf->state = 'S';
+ break;
++#endif
+ case SSTOP:
+ buf->state = 'T';
+ break;
diff -r a8affcf690ca -r d8c9141b362d sysutils/libgtop/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop/patches/patch-ag Fri Apr 02 12:13:57 2004 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ag,v 1.3 2004/04/02 12:13:57 jmmv Exp $
+
Home |
Main Index |
Thread Index |
Old Index