diff options
author | rh <rh@pkgsrc.org> | 2002-11-04 02:56:16 +0000 |
---|---|---|
committer | rh <rh@pkgsrc.org> | 2002-11-04 02:56:16 +0000 |
commit | c1d19086f268c390b9b61a1dbf3f6a3ade22db25 (patch) | |
tree | 105d15d78c31b38ade1c70a2b03dd89e49712952 /devel/libgtop2 | |
parent | 0130253c653c95be0916d96efb601bff5852e192 (diff) | |
download | pkgsrc-c1d19086f268c390b9b61a1dbf3f6a3ade22db25.tar.gz |
Initial import of libgtop2-2.0.0, a library to retrieve system information,
used in GNOME2
Diffstat (limited to 'devel/libgtop2')
-rw-r--r-- | devel/libgtop2/DESCR | 4 | ||||
-rw-r--r-- | devel/libgtop2/Makefile | 54 | ||||
-rw-r--r-- | devel/libgtop2/PLIST | 121 | ||||
-rw-r--r-- | devel/libgtop2/buildlink2.mk | 36 | ||||
-rw-r--r-- | devel/libgtop2/distinfo | 18 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-aa | 50 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ab | 48 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ac | 18 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ad | 17 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ae | 81 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-af | 38 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ag | 69 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ah | 46 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ai | 22 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-aj | 22 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ak | 15 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-al | 97 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-am | 28 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-an | 29 |
19 files changed, 813 insertions, 0 deletions
diff --git a/devel/libgtop2/DESCR b/devel/libgtop2/DESCR new file mode 100644 index 00000000000..55f3012d616 --- /dev/null +++ b/devel/libgtop2/DESCR @@ -0,0 +1,4 @@ +libgtop is a library that fetches system information about the running +system such as cpu and memory usage, active processes etc. It +provides a setgid server that fetches the information and a +client-side library that talks to this server. diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile new file mode 100644 index 00000000000..49d31b0aad8 --- /dev/null +++ b/devel/libgtop2/Makefile @@ -0,0 +1,54 @@ +# $NetBSD: Makefile,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +DISTNAME= libgtop-2.0.0 +PKGNAME= ${DISTNAME:S/-/2-/} +CATEGORIES= devel gnome +MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.0/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://www.gnome.org/ +COMMENT= library to retrieve system information, used in GNOME2 + +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} != arm32) && \ + (${MACHINE_ARCH} != i386) && (${MACHINE_ARCH} != m68k) && \ + (${MACHINE_ARCH} != mipsel) && (${MACHINE_ARCH} != powerpc) && \ + (${MACHINE_ARCH} != sparc) && (${MACHINE_ARCH} != sparc64) +IGNORE= "${PKGNAME} has not yet been ported to ${MACHINE_ARCH}." +IGNORE+= "Please look at /usr/include/${MACHINE_ARCH}/pcb.h" +IGNORE+= "and update patches/patch-al appropriately." +IGNORE+= "(More information can be found in libgtop.info.)" +.endif +.endif + +USE_PERL5= build +USE_BUILDLINK2= YES +USE_X11BASE= YES +USE_GMAKE= YES +USE_LIBTOOL= YES +LIBTOOL_OVERRIDE= ${WRKSRC}/libtool +PKGCONFIG_OVERRIDE= ${WRKSRC}/libgtop-2.0.pc.in + +# 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.glib2} +CONFIGURE_ARGS+= --with-catgets --with-libgtop-guile=no +CONFIGURE_ENV+= AWK="${AWK}" LN_S="${LN} -s" PERL="${PERL5}" +CONFIGURE_ENV+= PKGLOCALEDIR="${PKGLOCALEDIR}" + +.include "../../devel/gettext-lib/buildlink2.mk" +.include "../../devel/glib2/buildlink2.mk" +.include "../../mk/texinfo.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/devel/libgtop2/PLIST b/devel/libgtop2/PLIST new file mode 100644 index 00000000000..f91ffe40929 --- /dev/null +++ b/devel/libgtop2/PLIST @@ -0,0 +1,121 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +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/error.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/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/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/read.h +include/libgtop-2.0/glibtop/read_data.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/types.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/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 +@unexec ${INSTALL_INFO} --delete --info-dir=%D/info %D/info/libgtop2.info +info/libgtop2.info +@exec ${INSTALL_INFO} --info-dir=%D/info %D/info/libgtop2.info +lib/libgnomesupport-2.0.a +lib/libgnomesupport-2.0.la +lib/libgnomesupport-2.0.so +lib/libgnomesupport-2.0.so.0 +lib/libgnomesupport-2.0.so.0.0 +lib/libgtop-2.0.a +lib/libgtop-2.0.la +lib/libgtop-2.0.so +lib/libgtop-2.0.so.0 +lib/libgtop-2.0.so.0.0 +lib/libgtop/include/gnomesupport.h +lib/libgtop_common-2.0.a +lib/libgtop_common-2.0.la +lib/libgtop_common-2.0.so +lib/libgtop_common-2.0.so.0 +lib/libgtop_common-2.0.so.0.0 +lib/libgtop_names-2.0.a +lib/libgtop_names-2.0.la +lib/libgtop_names-2.0.so +lib/libgtop_names-2.0.so.0 +lib/libgtop_names-2.0.so.0.0 +lib/libgtop_suid_common-2.0.a +lib/libgtop_suid_common-2.0.la +lib/libgtop_suid_common-2.0.so +lib/libgtop_suid_common-2.0.so.0 +lib/libgtop_suid_common-2.0.so.0.0 +lib/libgtop_sysdeps-2.0.a +lib/libgtop_sysdeps-2.0.la +lib/libgtop_sysdeps-2.0.so +lib/libgtop_sysdeps-2.0.so.0 +lib/libgtop_sysdeps-2.0.so.0.0 +lib/libgtop_sysdeps_suid-2.0.a +lib/libgtop_sysdeps_suid-2.0.la +lib/libgtop_sysdeps_suid-2.0.so +lib/libgtop_sysdeps_suid-2.0.so.0 +lib/libgtop_sysdeps_suid-2.0.so.0.0 +lib/pkgconfig/libgtop-2.0.pc +${PKGLOCALEDIR}/locale/az/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ca/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/da/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/de/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/el/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/es/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/es_ES/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/fi/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/fr/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ga/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/gl/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/hu/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ja/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ko/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ms/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/nl/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/nn/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/no/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/pl/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/pt/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/pt_BR/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/ru/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/sk/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/sl/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/sv/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/tr/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/uk/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/vi/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/zh_CN/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/zh_TW/LC_MESSAGES/libgtop-2.0.mo +@dirrm lib/libgtop/include +@dirrm lib/libgtop +@dirrm include/libgtop-2.0/glibtop +@dirrm include/libgtop-2.0 diff --git a/devel/libgtop2/buildlink2.mk b/devel/libgtop2/buildlink2.mk new file mode 100644 index 00000000000..ef6dbead52f --- /dev/null +++ b/devel/libgtop2/buildlink2.mk @@ -0,0 +1,36 @@ +# $NetBSD: buildlink2.mk,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +# +# This Makefile fragment is included by packages that use libgtop2. +# +# This file was created automatically using createbuildlink 2.2. +# + +.if !defined(LIBGTOP2_BUILDLINK2_MK) +LIBGTOP2_BUILDLINK2_MK= # defined + +BUILDLINK_PACKAGES+= libgtop2 +BUILDLINK_DEPENDS.libgtop2?= libgtop2>=2.0.0 +BUILDLINK_PKGSRCDIR.libgtop2?= ../../devel/libgtop2 + +EVAL_PREFIX+= BUILDLINK_PREFIX.libgtop2=libgtop2 +BUILDLINK_PREFIX.libgtop2_DEFAULT= ${X11PREFIX} +BUILDLINK_FILES.libgtop2+= include/libgtop-2.0/*.h +BUILDLINK_FILES.libgtop2+= include/libgtop-2.0/glibtop/*.h +BUILDLINK_FILES.libgtop2+= lib/libgnomesupport-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop/include/gnomesupport.h +BUILDLINK_FILES.libgtop2+= lib/libgtop_common-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop_names-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop_suid_common-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop_sysdeps-2.0.* +BUILDLINK_FILES.libgtop2+= lib/libgtop_sysdeps_suid-2.0.* +BUILDLINK_FILES.libgtop2+= lib/pkgconfig/libgtop-2.0.pc + +.include "../../devel/gettext-lib/buildlink2.mk" +.include "../../devel/glib2/buildlink2.mk" + +BUILDLINK_TARGETS+= libgtop2-buildlink + +libgtop2-buildlink: _BUILDLINK_USE + +.endif # LIBGTOP2_BUILDLINK2_MK diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo new file mode 100644 index 00000000000..8ff452209c4 --- /dev/null +++ b/devel/libgtop2/distinfo @@ -0,0 +1,18 @@ +$NetBSD: distinfo,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +SHA1 (libgtop-2.0.0.tar.bz2) = 9178e5cede22ae5a8928677b195fe585b84b3b86 +Size (libgtop-2.0.0.tar.bz2) = 690581 bytes +SHA1 (patch-aa) = 13df9537fff754a0442988e110ab379f92a654e8 +SHA1 (patch-ab) = 3ce99bf4d72cf4e4203364d78361c8a2df081d8d +SHA1 (patch-ac) = 644bfe717bdcc993a668a3d075acda8ef39571d8 +SHA1 (patch-ad) = 9522d20b1467b73678003d5c0f98dcac7d312893 +SHA1 (patch-ae) = cf277165382c17d938593934b59d8035175fd8d0 +SHA1 (patch-af) = 0374fc36c418871e929fbb3c53ab4979e780e8d5 +SHA1 (patch-ag) = 470e29d999b079a5f75993978b3cdcdec2fd7d9c +SHA1 (patch-ah) = 93ebb47710f1c4cc70406a92503bdc4a5bfa50d2 +SHA1 (patch-ai) = 07a83340eb9d6a36a3f5b2db33eb50c74fbc4777 +SHA1 (patch-aj) = ca1fd2efe97a7bada35bdb99bc0ac3ed72981a11 +SHA1 (patch-ak) = cf39190646a4fd618b8ef94647a4cf3c48a9e98b +SHA1 (patch-al) = e771b022a5c2176138c5f49561ac64a15ce11809 +SHA1 (patch-am) = f5971bf6a72a830b95923ce163c75ab5ef548221 +SHA1 (patch-an) = ab91ae30daa7b7bd5f4f31d610ea0f5991d92ad6 diff --git a/devel/libgtop2/patches/patch-aa b/devel/libgtop2/patches/patch-aa new file mode 100644 index 00000000000..fa1dfddb288 --- /dev/null +++ b/devel/libgtop2/patches/patch-aa @@ -0,0 +1,50 @@ +$NetBSD: patch-aa,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- configure.orig Tue Jun 11 07:46:22 2002 ++++ configure +@@ -7738,13 +7738,13 @@ echo $ECHO_N "checking for libgtop sysde + libgtop_sysdeps_dir=freebsd + libgtop_use_machine_h=yes + libgtop_need_server=yes +- libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' ++ libgtop_postinstall='chgrp kmem $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2' + ;; + solaris*) + libgtop_sysdeps_dir=solaris + libgtop_use_machine_h=yes + libgtop_need_server=yes +- libgtop_postinstall='chgrp sys $(bindir)/libgtop_server && chmod 2755 $(bindir)/libgtop_server' ++ libgtop_postinstall='chgrp sys $(bindir)/libgtop_server2 && chmod 2755 $(bindir)/libgtop_server2' + ;; + *) + if test x$hacker_mode = xyes ; then +@@ -12834,6 +12834,11 @@ fi + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + ++# ++# override DATADIRNAME with PKGLOCALEDIR if set ++# ++[ -z "$PKGLOCALEDIR" ] || DATADIRNAME=$PKGLOCALEDIR ++ + echo "$as_me:12837: checking for X" >&5 + echo $ECHO_N "checking for X... $ECHO_C" >&6 + +@@ -15698,7 +15703,7 @@ LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS + LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS" + LIBGTOP_GUILE_INCS="$LIBGTOP_INCS" + LIBGTOP_BINDIR='$(bindir)' +-LIBGTOP_SERVER='$(bindir)/libgtop_server' ++LIBGTOP_SERVER='$(bindir)/libgtop_server2' + + sysdeps_dir="$libgtop_sysdeps_dir" + +@@ -15747,7 +15752,7 @@ INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -D + + if test x$libgtop_need_server = xyes ; then + sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la" +- server_programs='libgtop_server' ++ server_programs='libgtop_server2' + else + sysdeps_suid_lib= + server_programs= diff --git a/devel/libgtop2/patches/patch-ab b/devel/libgtop2/patches/patch-ab new file mode 100644 index 00000000000..31efd06a0ae --- /dev/null +++ b/devel/libgtop2/patches/patch-ab @@ -0,0 +1,48 @@ +$NetBSD: patch-ab,v 1.1.1.1 2002/11/04 02:56:17 rh 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 --git a/devel/libgtop2/patches/patch-ac b/devel/libgtop2/patches/patch-ac new file mode 100644 index 00000000000..f737be05293 --- /dev/null +++ b/devel/libgtop2/patches/patch-ac @@ -0,0 +1,18 @@ +$NetBSD: patch-ac,v 1.1.1.1 2002/11/04 02:56:17 rh 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 --git a/devel/libgtop2/patches/patch-ad b/devel/libgtop2/patches/patch-ad new file mode 100644 index 00000000000..28c5fe5caa8 --- /dev/null +++ b/devel/libgtop2/patches/patch-ad @@ -0,0 +1,17 @@ +$NetBSD: patch-ad,v 1.1.1.1 2002/11/04 02:56:17 rh 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 --git a/devel/libgtop2/patches/patch-ae b/devel/libgtop2/patches/patch-ae new file mode 100644 index 00000000000..ebb8c19fd85 --- /dev/null +++ b/devel/libgtop2/patches/patch-ae @@ -0,0 +1,81 @@ +$NetBSD: patch-ae,v 1.1.1.1 2002/11/04 02:56:17 rh 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 --git a/devel/libgtop2/patches/patch-af b/devel/libgtop2/patches/patch-af new file mode 100644 index 00000000000..4a4e1b3ba6e --- /dev/null +++ b/devel/libgtop2/patches/patch-af @@ -0,0 +1,38 @@ +$NetBSD: patch-af,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/uptime.c.orig Thu May 27 16:04:16 1999 ++++ sysdeps/freebsd/uptime.c +@@ -49,6 +49,27 @@ + void + glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) + { ++#ifdef __NetBSD__ ++ time_t now; ++ time_t uptime; ++ int mib[2]; ++ struct timeval boottime; ++ size_t size; ++ ++ mib[0] = CTL_KERN; ++ mib[1] = KERN_BOOTTIME; ++ size = sizeof(boottime); ++ if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && ++ boottime.tv_sec != 0) { ++ time(&now); ++ buf->uptime = now - boottime.tv_sec; ++ /* XXX: don't know a useful value to put here. */ ++ buf->idletime = 0; ++ buf->flags = _glibtop_sysdeps_uptime; ++ } ++#else ++ buf->flags = _glibtop_sysdeps_uptime; ++ + glibtop_cpu cpu; + + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0); +@@ -70,4 +91,5 @@ + buf->idletime = (double) cpu.idle / (double) cpu.frequency; + + buf->flags = _glibtop_sysdeps_uptime; ++#endif + } diff --git a/devel/libgtop2/patches/patch-ag b/devel/libgtop2/patches/patch-ag new file mode 100644 index 00000000000..13fcd7a5692 --- /dev/null +++ b/devel/libgtop2/patches/patch-ag @@ -0,0 +1,69 @@ +$NetBSD: patch-ag,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/procmem.c.orig Thu May 27 20:56:49 1999 ++++ sysdeps/freebsd/procmem.c +@@ -31,8 +31,12 @@ + #include <sys/param.h> + #include <sys/proc.h> + #include <sys/resource.h> ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) + #include <vm/vm_object.h> + #include <vm/vm_map.h> ++#else ++#include <uvm/uvm_extern.h> ++#endif + + #include <sys/vnode.h> + #include <ufs/ufs/quota.h> +@@ -43,9 +47,14 @@ + #include <sys/user.h> + #endif + #include <sys/sysctl.h> ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) + #include <vm/vm.h> ++#else ++#include <uvm/uvm.h> ++#endif + +-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) ++#if defined(__NetBSD__) && \ ++ (__NetBSD_Version__ >= 104000000) && (__NetBSD_Version__ < 105020000) + /* Fixme ... */ + #undef _KERNEL + #define _UVM_UVM_AMAP_I_H_ 1 +@@ -113,7 +122,6 @@ + struct vmspace *vms, vmspace; + #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) + struct vnode vnode; +- struct inode inode; + #else + struct vm_object object; + #endif +@@ -233,17 +241,27 @@ + /* If the object is of type vnode, add its size */ + + #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) ++#if defined(UVM_VNODE_VALID) + if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID) + continue; ++#endif + + if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || + !vnode.v_data) continue; + ++#if (__NetBSD_Version__ >= 105250000) ++ /* Reference count must be at least two. */ ++ if (vnode.v_usecount <= 1) ++ continue; ++ ++ buf->share += pagetok (vnode.v_uobj.uo_npages) << LOG1024; ++#else + /* Reference count must be at least two. */ + if (vnode.v_uvm.u_obj.uo_refs <= 1) + continue; + + buf->share += pagetok (vnode.v_uvm.u_obj.uo_npages) << LOG1024; ++#endif /* __NetBSD_Version__ >= 105250000 */ + #endif + + #ifdef __FreeBSD__ diff --git a/devel/libgtop2/patches/patch-ah b/devel/libgtop2/patches/patch-ah new file mode 100644 index 00000000000..13d4b6b8eb1 --- /dev/null +++ b/devel/libgtop2/patches/patch-ah @@ -0,0 +1,46 @@ +$NetBSD: patch-ah,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/procmap.c.orig Thu May 27 20:56:48 1999 ++++ sysdeps/freebsd/procmap.c Wed Nov 29 21:57:15 2000 +@@ -32,9 +32,13 @@ + #include <sys/param.h> + #include <sys/proc.h> + #include <sys/resource.h> ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) + #include <vm/vm_object.h> + #include <vm/vm_prot.h> + #include <vm/vm_map.h> ++#else ++#include <uvm/uvm_extern.h> ++#endif + + #include <sys/vnode.h> + #include <sys/mount.h> +@@ -46,9 +50,12 @@ + #include <sys/user.h> + #endif + #include <sys/sysctl.h> ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) + #include <vm/vm.h> ++#endif + +-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) ++#if defined(__NetBSD__) && \ ++ (__NetBSD_Version__ >= 104000000) && (__NetBSD_Version < 105020000) + /* Fixme ... */ + #undef _KERNEL + #define _UVM_UVM_AMAP_I_H_ 1 +@@ -214,11 +221,13 @@ + #endif + + #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) ++#if defined(UVM_VNODE_VALID) + if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID) + continue; + + if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || + !vnode.v_data) continue; ++#endif + + if (kvm_read (server->machine.kd, + (unsigned long) vnode.v_data, diff --git a/devel/libgtop2/patches/patch-ai b/devel/libgtop2/patches/patch-ai new file mode 100644 index 00000000000..52aa28ceccb --- /dev/null +++ b/devel/libgtop2/patches/patch-ai @@ -0,0 +1,22 @@ +$NetBSD: patch-ai,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/mem.c.orig Sun Feb 13 10:47:58 2000 ++++ sysdeps/freebsd/mem.c Sat Jul 29 22:32:44 2000 +@@ -29,7 +29,9 @@ + + #include <sys/sysctl.h> + #include <sys/vmmeter.h> ++#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) + #include <vm/vm_param.h> ++#endif + + #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) + #include <uvm/uvm_extern.h> +@@ -74,7 +76,6 @@ + }; + + /* MIB array for sysctl */ +-static int mib_length=2; + #ifdef __bsdi__ + static int mib [] = { CTL_VM, VM_TOTAL }; + #else diff --git a/devel/libgtop2/patches/patch-aj b/devel/libgtop2/patches/patch-aj new file mode 100644 index 00000000000..d70a545d54a --- /dev/null +++ b/devel/libgtop2/patches/patch-aj @@ -0,0 +1,22 @@ +$NetBSD: patch-aj,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- src/daemon/Makefile.in.orig Tue Jun 11 07:49:23 2002 ++++ src/daemon/Makefile.in +@@ -167,7 +167,7 @@ libgtop_daemon2_LDADD = $(top_builddir)/ + @ENABLE_STATIC_TRUE@libgtop_daemon2_LDFLAGS = -static + + libgtop_server2_SOURCES = server.c slave.c io.c version.c daemon.h +-libgtop_server2_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la ++libgtop_server2_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la -lintl + + + @ENABLE_STATIC_TRUE@libgtop_server2_LDFLAGS = -static +@@ -298,6 +298,8 @@ clean-libtool: + distclean-libtool: + + maintainer-clean-libtool: ++ ++libgtop_server: libgtop_server2 + + libgtop_server2$(EXEEXT): $(libgtop_server2_OBJECTS) $(libgtop_server2_DEPENDENCIES) + @rm -f libgtop_server2$(EXEEXT) diff --git a/devel/libgtop2/patches/patch-ak b/devel/libgtop2/patches/patch-ak new file mode 100644 index 00000000000..b983c84f0d0 --- /dev/null +++ b/devel/libgtop2/patches/patch-ak @@ -0,0 +1,15 @@ +$NetBSD: patch-ak,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- doc/libgtop2.texi.orig Tue Jun 11 07:34:39 2002 ++++ doc/libgtop2.texi +@@ -2,6 +2,10 @@ + @c %**start of header + @setfilename libgtop2.info + @settitle LibGTop Reference Manual ++@dircategory Gnome ++@direntry ++* LibGTop2: (libgtop2). A library to retrieve system information. ++@end direntry + @setchapternewpage odd + @c %**end of header + diff --git a/devel/libgtop2/patches/patch-al b/devel/libgtop2/patches/patch-al new file mode 100644 index 00000000000..bd9ec2b1ca6 --- /dev/null +++ b/devel/libgtop2/patches/patch-al @@ -0,0 +1,97 @@ +$NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/prockernel.c.orig Sat Oct 16 20:31:43 1999 ++++ sysdeps/freebsd/prockernel.c Fri Aug 10 12:38:19 2001 +@@ -34,7 +34,7 @@ + #if (!defined __OpenBSD__) && (!defined __bsdi__) + #include <sys/user.h> + #endif +-#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) ++#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && !defined(__NetBSD__) + #include <machine/pcb.h> + #endif + #if defined(__FreeBSD__) && !defined(__alpha__) +@@ -48,6 +48,14 @@ + #include <osreldate.h> + #endif + ++#ifdef __NetBSD__ ++#include <machine/vmparam.h> ++#include <machine/pmap.h> ++#ifdef __arm32__ ++#define KERNBASE KERNEL_BASE ++#endif ++#endif ++ + static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = + (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + + (1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + +@@ -129,8 +137,15 @@ + + glibtop_suid_enter (server); + ++#ifdef __NetBSD__ ++ /* On NetBSD, there is no kvm_uread(), and kvm_read() always reads ++ * from kernel memory. */ ++ ++ if (kvm_read (server->machine.kd, ++#else + if ((pinfo [0].kp_proc.p_flag & P_INMEM) && + kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, ++#endif + (unsigned long) &u_addr->u_stats, + (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) + { +@@ -149,8 +164,12 @@ + buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; + } + ++#ifdef __NetBSD__ ++ if (kvm_read (server->machine.kd, ++#else + if ((pinfo [0].kp_proc.p_flag & P_INMEM) && + kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, ++#endif + (unsigned long) &u_addr->u_pcb, + (char *) &pcb, sizeof (pcb)) == sizeof (pcb)) + { +@@ -167,14 +186,39 @@ + /*xxx FreeBSD/Alpha? */ + #endif + #else ++#ifdef __i386__ + 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 ++#else ++#if defined(__NetBSD__) ++#if defined(__m68k__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_usp; ++ buf->kstk_eip = (u_int64_t) 0; ++#elif (defined(__arm32__) || defined(__powerpc__)) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_sp; ++ buf->kstk_eip = (u_int64_t) 0; ++#elif defined(__mipsel__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_context[8]; ++ buf->kstk_eip = (u_int64_t) 0; ++#elif defined(__sparc__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_sp; ++ buf->kstk_eip = (u_int64_t) pcb.pcb_pc; ++#elif defined(__alpha__) ++ buf->kstk_esp = (u_int64_t) pcb.pcb_context[9]; ++ buf->kstk_eip = (u_int64_t) pcb.pcb_context[8]; ++#else ++ /* provide some defaults for other platforms */ ++ buf->kstk_esp = (u_int64_t) 0; ++ buf->kstk_eip = (u_int64_t) 0; ++#endif /* ${MACHINE_ARCH} */ ++#endif /* __NetBSD__ */ + + buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; ++#endif + #endif + } + diff --git a/devel/libgtop2/patches/patch-am b/devel/libgtop2/patches/patch-am new file mode 100644 index 00000000000..d77548b7f37 --- /dev/null +++ b/devel/libgtop2/patches/patch-am @@ -0,0 +1,28 @@ +$NetBSD: patch-am,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/procstate.c.orig Tue Jun 11 07:34:42 2002 ++++ sysdeps/freebsd/procstate.c +@@ -37,11 +37,7 @@ static const unsigned long _glibtop_sysd + (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. */ + +@@ -81,11 +77,6 @@ glibtop_get_proc_state_p (glibtop *serve + + buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid; + buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid; +- +-#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 + + /* Set the flags for the data we're about to return*/ + buf->flags = _glibtop_sysdeps_proc_state | diff --git a/devel/libgtop2/patches/patch-an b/devel/libgtop2/patches/patch-an new file mode 100644 index 00000000000..bcf6b1af459 --- /dev/null +++ b/devel/libgtop2/patches/patch-an @@ -0,0 +1,29 @@ +$NetBSD: patch-an,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ + +--- sysdeps/freebsd/procuid.c.orig Tue Jun 11 07:34:42 2002 ++++ sysdeps/freebsd/procuid.c +@@ -35,15 +35,7 @@ static const unsigned long _glibtop_sysd + (1L << GLIBTOP_PROC_UID_NICE); + + static const unsigned long _glibtop_sysdeps_proc_uid_groups = +-#if LIBGTOP_VERSION_CODE >= 1001000 +-#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) +-(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS); +-#else +-0L; +-#endif +-#else /* LIBGTOP_VERSION_CODE < 1001000 */ + 0L; +-#endif + + /* Init function. */ + +@@ -101,7 +93,7 @@ glibtop_get_proc_uid_p (glibtop *server, + + /* Use LibGTop conditionals here so we can more easily merge this + * code into the LIBGTOP_STABLE_1_0 branch. */ +-#if LIBGTOP_VERSION_CODE >= 1001000 ++#if 0 + /* This probably also works with other versions, but not yet + * tested. Please remove the conditional if this is true. */ + #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) |