summaryrefslogtreecommitdiff
path: root/devel/libstatgrab
diff options
context:
space:
mode:
authorsno <sno@pkgsrc.org>2013-09-13 10:13:20 +0000
committersno <sno@pkgsrc.org>2013-09-13 10:13:20 +0000
commit5a1580702c0a65429b750e2e1618d598d2b45d67 (patch)
tree7fb7f2fd27d1871031429accd35fe7c9be9e056a /devel/libstatgrab
parentb38422d4fe077af6b792bf9d3fa8998b4861b6e4 (diff)
downloadpkgsrc-5a1580702c0a65429b750e2e1618d598d2b45d67.tar.gz
Updating libstatgrab from 0.17nb2 to 0.90
pkgsrc changes: * libstatgrab has gnu-lgpl-2, only statgrab and saidard are gpl * add dependency to log4cplus for have tracing ability Upstream changes (0.90 follows 0.17 immediately): libstatgrab 0.90 * Please note the API in 0.90 has changed, so applications using libstatgrab will need to be updated to support the changes. * Thread safety and reentrant functions. * API unification (every stats call is now able to return multiple entries). * Complete rewrite of internal memory management (eases future extensions). * Add experimental support for tracing using log4cplus. * Complete the ports for AIX, HP-UX and most of the widely used BSD-based operating systems. * Complete the port for Darwin/MacOS X including basic Mach. * Clean up the FreeBSD and Solaris implementations. * Remove explicit support for Linux 2.4.
Diffstat (limited to 'devel/libstatgrab')
-rw-r--r--devel/libstatgrab/Makefile16
-rw-r--r--devel/libstatgrab/PLIST87
-rw-r--r--devel/libstatgrab/distinfo20
-rw-r--r--devel/libstatgrab/patches/patch-aa22
-rw-r--r--devel/libstatgrab/patches/patch-ab61
-rw-r--r--devel/libstatgrab/patches/patch-ac87
-rw-r--r--devel/libstatgrab/patches/patch-ad13
-rw-r--r--devel/libstatgrab/patches/patch-ae14
-rw-r--r--devel/libstatgrab/patches/patch-af17
-rw-r--r--devel/libstatgrab/patches/patch-ag16
-rw-r--r--devel/libstatgrab/patches/patch-ah32
-rw-r--r--devel/libstatgrab/patches/patch-ai25
-rw-r--r--devel/libstatgrab/patches/patch-aj17
-rw-r--r--devel/libstatgrab/patches/patch-ak17
-rw-r--r--devel/libstatgrab/patches/patch-al20
15 files changed, 100 insertions, 364 deletions
diff --git a/devel/libstatgrab/Makefile b/devel/libstatgrab/Makefile
index c7076ce42f9..9a89aed3ddf 100644
--- a/devel/libstatgrab/Makefile
+++ b/devel/libstatgrab/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.23 2013/05/31 12:40:01 wiz Exp $
+# $NetBSD: Makefile,v 1.24 2013/09/13 10:13:20 sno Exp $
-DISTNAME= libstatgrab-0.17
-PKGREVISION= 2
+DISTNAME= libstatgrab-0.90
CATEGORIES= devel
MASTER_SITES= ftp://ftp.uk.i-scream.org/pub/i-scream/libstatgrab/ \
ftp://ftp.i-scream.org/pub/i-scream/libstatgrab/ \
@@ -12,11 +11,12 @@ MASTER_SITES= ftp://ftp.uk.i-scream.org/pub/i-scream/libstatgrab/ \
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.i-scream.org/libstatgrab/
COMMENT= Provides a useful interface to system statistics
-LICENSE= gnu-gpl-v2
+LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2
.include "options.mk"
USE_TOOLS+= pkg-config perl:run
+USE_LANGUAGES= c c++
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
@@ -27,6 +27,12 @@ REPLACE_PERL+= src/statgrab/statgrab-make-mrtg-index.in
CONFIGURE_ARGS+= --disable-examples
-CPPFLAGS.NetBSD+= -D_KMEMUSER
+# Default test target for Perl modules
+TEST_TARGET?= test
+CHECK_BUILTIN.pthread:= yes
+.include "../../mk/pthread.builtin.mk"
+CHECK_BUILTIN.pthread:= no
+
+.include "../../devel/log4cplus/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/libstatgrab/PLIST b/devel/libstatgrab/PLIST
index 6505136cec1..c9369c35c0f 100644
--- a/devel/libstatgrab/PLIST
+++ b/devel/libstatgrab/PLIST
@@ -1,32 +1,115 @@
-@comment $NetBSD: PLIST,v 1.6 2009/05/16 11:46:09 obache Exp $
+@comment $NetBSD: PLIST,v 1.7 2013/09/13 10:13:20 sno Exp $
${PLIST.saidar}bin/saidar
${PLIST.statgrab}bin/statgrab
${PLIST.statgrab}bin/statgrab-make-mrtg-config
${PLIST.statgrab}bin/statgrab-make-mrtg-index
include/statgrab.h
-include/statgrab_deprecated.h
lib/libstatgrab.la
lib/pkgconfig/libstatgrab.pc
${PLIST.saidar}man/man1/saidar.1
${PLIST.statgrab}man/man1/statgrab-make-mrtg-config.1
${PLIST.statgrab}man/man1/statgrab-make-mrtg-index.1
${PLIST.statgrab}man/man1/statgrab.1
+man/man3/libstatgrab.3
+man/man3/sg_clear_error.3
+man/man3/sg_comp_destroy.3
+man/man3/sg_comp_get_tls.3
+man/man3/sg_comp_init.3
+man/man3/sg_disk_io_compare_name.3
+man/man3/sg_disk_io_compare_traffic.3
+man/man3/sg_drop_privileges.3
+man/man3/sg_free_cpu_stats.3
+man/man3/sg_free_disk_io_stats.3
+man/man3/sg_free_fs_stats.3
+man/man3/sg_free_host_info.3
+man/man3/sg_free_load_stats.3
+man/man3/sg_free_mem_stats.3
+man/man3/sg_free_network_iface_stats.3
+man/man3/sg_free_network_io_stats.3
+man/man3/sg_free_page_stats.3
+man/man3/sg_free_process_count.3
+man/man3/sg_free_stats_buf.3
+man/man3/sg_free_swap_stats.3
+man/man3/sg_free_user_stats.3
+man/man3/sg_fs_compare_device_name.3
+man/man3/sg_fs_compare_mnt_point.3
man/man3/sg_get_cpu_percents.3
+man/man3/sg_get_cpu_percents_of.3
+man/man3/sg_get_cpu_percents_r.3
man/man3/sg_get_cpu_stats.3
man/man3/sg_get_cpu_stats_diff.3
+man/man3/sg_get_cpu_stats_diff_between.3
+man/man3/sg_get_cpu_stats_r.3
man/man3/sg_get_disk_io_stats.3
man/man3/sg_get_disk_io_stats_diff.3
+man/man3/sg_get_disk_io_stats_diff_between.3
+man/man3/sg_get_disk_io_stats_r.3
+man/man3/sg_get_error.3
+man/man3/sg_get_error_arg.3
+man/man3/sg_get_error_details.3
+man/man3/sg_get_error_errno.3
man/man3/sg_get_fs_stats.3
+man/man3/sg_get_fs_stats_diff.3
+man/man3/sg_get_fs_stats_diff_between.3
+man/man3/sg_get_fs_stats_r.3
man/man3/sg_get_host_info.3
+man/man3/sg_get_host_info_r.3
man/man3/sg_get_load_stats.3
+man/man3/sg_get_load_stats_r.3
man/man3/sg_get_mem_stats.3
+man/man3/sg_get_mem_stats_r.3
+man/man3/sg_get_nelements.3
man/man3/sg_get_network_iface_stats.3
+man/man3/sg_get_network_iface_stats_r.3
man/man3/sg_get_network_io_stats.3
man/man3/sg_get_network_io_stats_diff.3
+man/man3/sg_get_network_io_stats_diff_between.3
+man/man3/sg_get_network_io_stats_r.3
man/man3/sg_get_page_stats.3
man/man3/sg_get_page_stats_diff.3
+man/man3/sg_get_page_stats_diff_between.3
+man/man3/sg_get_page_stats_r.3
man/man3/sg_get_process_count.3
+man/man3/sg_get_process_count_of.3
+man/man3/sg_get_process_count_r.3
man/man3/sg_get_process_stats.3
+man/man3/sg_get_process_stats_r.3
man/man3/sg_get_swap_stats.3
+man/man3/sg_get_swap_stats_r.3
man/man3/sg_get_user_stats.3
+man/man3/sg_get_user_stats_r.3
+man/man3/sg_get_valid_filesystems.3
+man/man3/sg_global_lock.3
+man/man3/sg_global_unlock.3
+man/man3/sg_init.3
+man/man3/sg_internal-intro.3
+man/man3/sg_intro.3
+man/man3/sg_lock_mutex.3
+man/man3/sg_network_iface_compare_name.3
+man/man3/sg_network_io_compare_name.3
+man/man3/sg_process_compare_cpu.3
+man/man3/sg_process_compare_gid.3
+man/man3/sg_process_compare_name.3
+man/man3/sg_process_compare_pid.3
+man/man3/sg_process_compare_res.3
+man/man3/sg_process_compare_size.3
+man/man3/sg_process_compare_time.3
+man/man3/sg_process_compare_uid.3
+man/man3/sg_prove_vector.3
+man/man3/sg_set_error.3
+man/man3/sg_set_error_with_errno.3
+man/man3/sg_set_error_with_errno_code.3
+man/man3/sg_set_valid_filesystems.3
+man/man3/sg_shutdown.3
+man/man3/sg_snapshot.3
+man/man3/sg_str_error.3
+man/man3/sg_strperror.3
+man/man3/sg_unlock_mutex.3
+man/man3/sg_vector_clear.3
+man/man3/sg_vector_clone.3
+man/man3/sg_vector_clone_into.3
+man/man3/sg_vector_compute_diff.3
+man/man3/sg_vector_create.3
+man/man3/sg_vector_free.3
+man/man3/sg_vector_resize.3
man/man3/statgrab.3
diff --git a/devel/libstatgrab/distinfo b/devel/libstatgrab/distinfo
index 447adcd863f..060b5c5d8f7 100644
--- a/devel/libstatgrab/distinfo
+++ b/devel/libstatgrab/distinfo
@@ -1,17 +1,5 @@
-$NetBSD: distinfo,v 1.10 2010/08/24 06:33:10 sno Exp $
+$NetBSD: distinfo,v 1.11 2013/09/13 10:13:20 sno Exp $
-SHA1 (libstatgrab-0.17.tar.gz) = c3f146ac5baa69ca0f8521c5a6daa6e6c8603ee5
-RMD160 (libstatgrab-0.17.tar.gz) = 586592626abb2ab4ff8947059d5e29d3a79512f3
-Size (libstatgrab-0.17.tar.gz) = 463224 bytes
-SHA1 (patch-aa) = 0c903a64ca119b3a317e850631d41aae3e9726ca
-SHA1 (patch-ab) = 97c9c8ffc034af1c61e36f1a7d0417b376019496
-SHA1 (patch-ac) = ef9124f8066a31012708e7db8bc880ee9714fc95
-SHA1 (patch-ad) = 150543e9a0573cc52e4862c11b5836d47551b0cc
-SHA1 (patch-ae) = dda8152c3bc2e5d75c1ce4ab56cef9ecdd44695c
-SHA1 (patch-af) = 1b1bdf5f6772b8d981b2b42d2806ae1cd1fc617c
-SHA1 (patch-ag) = 2810b88869e2bd6b770e7b8aa4e7f09e1d98eff4
-SHA1 (patch-ah) = 3095e161c78a92a4c029dd2751bf168bdcfae780
-SHA1 (patch-ai) = bbdd9e6a9fd646d09140cb2fe1eb280c16ca10a3
-SHA1 (patch-aj) = 70852991608ecb5818922fb0b7e7ab61bc043527
-SHA1 (patch-ak) = e2b94da5dbb997ef3276fd7b5e384f2a8c73b11a
-SHA1 (patch-al) = cdab623bd895ae1dd0b81afe82d1a937ee8e5799
+SHA1 (libstatgrab-0.90.tar.gz) = ecc53aafe259c778cafa7df0ef95cf8443d988f1
+RMD160 (libstatgrab-0.90.tar.gz) = e05463287493ef4e4d1dd8c571856ff41b3576bf
+Size (libstatgrab-0.90.tar.gz) = 755785 bytes
diff --git a/devel/libstatgrab/patches/patch-aa b/devel/libstatgrab/patches/patch-aa
deleted file mode 100644
index 86b62d83a30..00000000000
--- a/devel/libstatgrab/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.4 2009/05/16 11:46:09 obache Exp $
-
---- configure.orig 2008-03-13 13:59:03.000000000 +0000
-+++ configure
-@@ -21107,7 +21107,7 @@ fi
- # Set things up for different OS's
- # We define the name of the OS so the code can act accordingly
- # We also need to add the right LDFLAGS
--case $host_os in
-+case $build_os in
- solaris2.[6-7])
-
- for ac_header in kstat.h
-@@ -21692,7 +21692,7 @@ cat >>confdefs.h <<\_ACEOF
- _ACEOF
-
- ;;
--netbsdelf[2-3]*)
-+netbsd*)
-
- cat >>confdefs.h <<\_ACEOF
- #define ALLBSD
diff --git a/devel/libstatgrab/patches/patch-ab b/devel/libstatgrab/patches/patch-ab
deleted file mode 100644
index 4f61c02f9a4..00000000000
--- a/devel/libstatgrab/patches/patch-ab
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-ab,v 1.4 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/cpu_stats.c.orig 2006-10-09 13:52:06.000000000 +0000
-+++ src/libstatgrab/cpu_stats.c
-@@ -35,7 +35,10 @@
- #if defined(LINUX) || defined(CYGWIN)
- #include <stdio.h>
- #endif
--#if defined(FREEBSD) || defined(DFBSD)
-+#if defined(DFBSD)
-+#include <sys/param.h>
-+#include <kinfo.h>
-+#elif defined(FREEBSD)
- #include <sys/sysctl.h>
- #include <sys/dkstat.h>
- #endif
-@@ -83,6 +86,8 @@ sg_cpu_stats *sg_get_cpu_stats(){
- #endif
- #ifdef NETBSD
- u_int64_t cp_time[CPUSTATES];
-+#elif defined(DFBSD)
-+ struct kinfo_cputime cp_time;
- #else
- long cp_time[CPUSTATES];
- #endif
-@@ -156,7 +161,12 @@ sg_cpu_stats *sg_get_cpu_stats(){
- cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle;
- #endif
- #ifdef ALLBSD
--#if defined(FREEBSD) || defined(DFBSD)
-+#if defined(DFBSD)
-+ if (kinfo_get_sched_cputime(&cp_time)) {
-+ sg_set_error_with_errno(SG_ERROR_SYSCTLBYNAME, "kern.cp_time");
-+ return NULL;
-+ }
-+#elif defined(FREEBSD)
- size = sizeof cp_time;
- if (sysctlbyname("kern.cp_time", &cp_time, &size, NULL, 0) < 0){
- sg_set_error_with_errno(SG_ERROR_SYSCTLBYNAME, "kern.cp_time");
-@@ -182,12 +192,21 @@ sg_cpu_stats *sg_get_cpu_stats(){
- }
- #endif
-
-+#ifdef DFBSD
-+ cpu_now.user=cp_time.cp_user;
-+ cpu_now.nice=cp_time.cp_nice;
-+ cpu_now.kernel=cp_time.cp_sys + cp_time.cp_intr;
-+ cpu_now.idle=cp_time.cp_idle;
-+
-+ cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle;
-+#else
- cpu_now.user=cp_time[CP_USER];
- cpu_now.nice=cp_time[CP_NICE];
- cpu_now.kernel=cp_time[CP_SYS];
- cpu_now.idle=cp_time[CP_IDLE];
-
- cpu_now.total=cpu_now.user+cpu_now.nice+cpu_now.kernel+cpu_now.idle;
-+#endif
-
- #endif
- #ifdef WIN32
diff --git a/devel/libstatgrab/patches/patch-ac b/devel/libstatgrab/patches/patch-ac
deleted file mode 100644
index 20c57c271f7..00000000000
--- a/devel/libstatgrab/patches/patch-ac
+++ /dev/null
@@ -1,87 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2010/08/24 06:33:11 sno Exp $
-
---- src/libstatgrab/disk_stats.c.orig 2009-12-04 22:09:30.000000000 +0000
-+++ src/libstatgrab/disk_stats.c
-@@ -64,7 +64,9 @@
- #include <sys/mount.h>
- #endif
- #if defined(FREEBSD) || defined(DFBSD)
-+#if !defined(DFBSD)
- #include <sys/dkstat.h>
-+#endif
- #include <devstat.h>
- #include <sys/param.h>
- #include <sys/mount.h>
-@@ -457,7 +459,11 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
- struct devstat *dev_ptr;
- #endif
- #ifdef NETBSD
-+#ifdef HW_DISKSTATS
- struct disk_sysctl *stats;
-+#else
-+ struct io_sysctl *stats;
-+#endif
- #endif
- #ifdef OPENBSD
- int diskcount;
-@@ -604,9 +610,15 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
-
- #if defined(NETBSD) || defined(OPENBSD)
- mib[0] = CTL_HW;
-+#ifdef HW_DISKSTATS
- mib[1] = HW_DISKSTATS;
-+#endif
- #ifdef NETBSD
-+#ifdef HW_DISKSTATS
- mib[2] = sizeof(struct disk_sysctl);
-+#else
-+ mib[2] = sizeof(struct io_sysctl);
-+#endif
- #endif
-
- if (sysctl(mib, MIBSIZE, NULL, &size, NULL, 0) < 0) {
-@@ -615,8 +627,12 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
- }
-
- #ifdef NETBSD
-+#ifdef HW_DISKSTATS
- num_disks = size / sizeof(struct disk_sysctl);
- #else
-+ num_disks = size / sizeof(struct io_sysctl);
-+#endif
-+#else
- num_disks = size / sizeof(struct diskstats);
- #endif
-
-@@ -635,6 +651,7 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
- u_int64_t rbytes, wbytes;
-
- #ifdef NETBSD
-+#ifdef HW_DISKSTATS
- #ifdef HAVE_DK_RBYTES
- rbytes = stats[i].dk_rbytes;
- wbytes = stats[i].dk_wbytes;
-@@ -643,6 +660,10 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
- rbytes = wbytes = stats[i].dk_bytes;
- #endif
- #else
-+ rbytes = stats[i].rbytes;
-+ wbytes = stats[i].wbytes;
-+#endif
-+#else
- #ifdef HAVE_DS_RBYTES
- rbytes = stats[i].ds_rbytes;
- wbytes = stats[i].ds_wbytes;
-@@ -665,8 +686,12 @@ sg_disk_io_stats *sg_get_disk_io_stats(i
- diskio_stats_ptr->read_bytes = rbytes;
- diskio_stats_ptr->write_bytes = wbytes;
- #ifdef NETBSD
-+#ifdef HAVE_DISKSTATS
- name = stats[i].dk_name;
- #else
-+ name = stats[i].name;
-+#endif
-+#else
- name = dk_name[i];
- #endif
- if (sg_update_string(&diskio_stats_ptr->disk_name, name) < 0) {
diff --git a/devel/libstatgrab/patches/patch-ad b/devel/libstatgrab/patches/patch-ad
deleted file mode 100644
index 23c28b41a06..00000000000
--- a/devel/libstatgrab/patches/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2006/06/12 16:30:33 joerg Exp $
-
---- src/saidar/saidar.c.orig 2006-06-12 16:23:53.000000000 +0000
-+++ src/saidar/saidar.c
-@@ -441,8 +441,6 @@ int main(int argc, char **argv){
-
- WINDOW *window;
-
-- extern int errno;
--
- int delay=2;
-
- sg_init();
diff --git a/devel/libstatgrab/patches/patch-ae b/devel/libstatgrab/patches/patch-ae
deleted file mode 100644
index 9ac0aa87cf8..00000000000
--- a/devel/libstatgrab/patches/patch-ae
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/Makefile.in.orig 2008-03-13 13:59:07.000000000 +0000
-+++ src/libstatgrab/Makefile.in
-@@ -58,6 +58,9 @@ am__installdirs = "$(DESTDIR)$(libdir)"
- libLTLIBRARIES_INSTALL = $(INSTALL)
- LTLIBRARIES = $(lib_LTLIBRARIES)
- libstatgrab_la_LIBADD =
-+.if ${OPSYS} == "DragonFly"
-+libstatgrab_la_LIBADD += -lkinfo
-+.endif
- am__libstatgrab_la_SOURCES_DIST = cpu_stats.c disk_stats.c \
- load_stats.c memory_stats.c network_stats.c os_info.c \
- page_stats.c process_stats.c swap_stats.c user_stats.c tools.c \
diff --git a/devel/libstatgrab/patches/patch-af b/devel/libstatgrab/patches/patch-af
deleted file mode 100644
index ee8e03e981b..00000000000
--- a/devel/libstatgrab/patches/patch-af
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-af,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/memory_stats.c.orig 2007-06-18 20:56:22.000000000 +0000
-+++ src/libstatgrab/memory_stats.c
-@@ -92,8 +92,12 @@ sg_mem_stats *sg_get_mem_stats(){
- int pagesize;
- #endif
- #if defined(NETBSD)
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+ struct uvmexp_sysctl *uvm;
-+#else
- struct uvmexp *uvm;
- #endif
-+#endif
- #if defined(OPENBSD)
- int mib[2];
- struct vmtotal vmtotal;
diff --git a/devel/libstatgrab/patches/patch-ag b/devel/libstatgrab/patches/patch-ag
deleted file mode 100644
index 94689be3b3a..00000000000
--- a/devel/libstatgrab/patches/patch-ag
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/process_stats.c.orig 2006-10-09 14:47:58.000000000 +0000
-+++ src/libstatgrab/process_stats.c
-@@ -564,7 +564,11 @@ sg_process_stats *sg_get_process_stats(i
- kp_stats[i].kp_eproc.e_vm.vm_rssize * getpagesize();
- #if defined(NETBSD) || defined(OPENBSD)
- proc_state_ptr->time_spent =
-+#if defined(__NetBSD_Version__) && (499004400 <= __NetBSD_Version__)
-+ kp_stats[i].kp_proc.p_rtime.sec;
-+#else
- kp_stats[i].kp_proc.p_rtime.tv_sec;
-+#endif
- #elif defined(DFBSD)
- proc_state_ptr->time_spent =
- ( kp_stats[i].kp_thread.td_uticks +
diff --git a/devel/libstatgrab/patches/patch-ah b/devel/libstatgrab/patches/patch-ah
deleted file mode 100644
index feb4ddde26d..00000000000
--- a/devel/libstatgrab/patches/patch-ah
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-ah,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/tools.c.orig 2007-06-18 20:58:12.000000000 +0000
-+++ src/libstatgrab/tools.c
-@@ -498,14 +498,27 @@ kvm_t *sg_get_kvm2() {
- #endif
-
- #if defined(NETBSD) || defined(OPENBSD)
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+struct uvmexp_sysctl *sg_get_uvmexp() {
-+#else
- struct uvmexp *sg_get_uvmexp() {
-+#endif
- int mib[2];
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+ size_t size = sizeof(struct uvmexp_sysctl);
-+ static struct uvmexp_sysctl uvm;
-+ struct uvmexp_sysctl *new;
-+
-+ mib[0] = CTL_VM;
-+ mib[1] = VM_UVMEXP2;
-+#else
- size_t size = sizeof(struct uvmexp);
- static struct uvmexp uvm;
- struct uvmexp *new;
-
- mib[0] = CTL_VM;
- mib[1] = VM_UVMEXP;
-+#endif
-
- if (sysctl(mib, 2, &uvm, &size, NULL, 0) < 0) {
- sg_set_error_with_errno(SG_ERROR_SYSCTL, "CTL_VM.VM_UVMEXP");
diff --git a/devel/libstatgrab/patches/patch-ai b/devel/libstatgrab/patches/patch-ai
deleted file mode 100644
index 5856c366b3a..00000000000
--- a/devel/libstatgrab/patches/patch-ai
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-ai,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/tools.h.orig 2005-09-24 13:29:23.000000000 +0000
-+++ src/libstatgrab/tools.h
-@@ -30,6 +30,7 @@
- #endif
- #ifdef NETBSD
- #include <uvm/uvm_extern.h>
-+#include <sys/param.h>
- #endif
- #ifdef HPUX
- #include <sys/param.h>
-@@ -59,8 +60,12 @@ kvm_t *sg_get_kvm2(void);
- #endif
-
- #if defined(NETBSD) || defined(OPENBSD)
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+struct uvmexp_sysctl *sg_get_uvmexp(void);
-+#else
- struct uvmexp *sg_get_uvmexp(void);
- #endif
-+#endif
-
- #ifdef HPUX
- struct pst_static *sg_get_pstat_static(void);
diff --git a/devel/libstatgrab/patches/patch-aj b/devel/libstatgrab/patches/patch-aj
deleted file mode 100644
index 8945233f6c2..00000000000
--- a/devel/libstatgrab/patches/patch-aj
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-aj,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/page_stats.c.orig 2005-09-24 13:29:22.000000000 +0000
-+++ src/libstatgrab/page_stats.c
-@@ -68,8 +68,12 @@ sg_page_stats *sg_get_page_stats(){
- size_t size;
- #endif
- #if defined(NETBSD) || defined(OPENBSD)
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+ struct uvmexp_sysctl *uvm;
-+#else
- struct uvmexp *uvm;
- #endif
-+#endif
-
- page_stats.systime = time(NULL);
- page_stats.pages_pagein=0;
diff --git a/devel/libstatgrab/patches/patch-ak b/devel/libstatgrab/patches/patch-ak
deleted file mode 100644
index 7aa40102a05..00000000000
--- a/devel/libstatgrab/patches/patch-ak
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/swap_stats.c.orig 2007-07-05 16:46:06.000000000 +0000
-+++ src/libstatgrab/swap_stats.c
-@@ -93,8 +93,12 @@ sg_swap_stats *sg_get_swap_stats(){
- #endif
- #endif
- #if defined(NETBSD) || defined(OPENBSD)
-+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ > 106000000)
-+ struct uvmexp_sysctl *uvm;
-+#else
- struct uvmexp *uvm;
- #endif
-+#endif
- #ifdef WIN32
- MEMORYSTATUSEX memstats;
- #endif
diff --git a/devel/libstatgrab/patches/patch-al b/devel/libstatgrab/patches/patch-al
deleted file mode 100644
index 67b8ff683e3..00000000000
--- a/devel/libstatgrab/patches/patch-al
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-al,v 1.1 2009/05/16 11:46:09 obache Exp $
-
---- src/libstatgrab/network_stats.c.orig 2006-10-09 17:25:06.000000000 +0000
-+++ src/libstatgrab/network_stats.c
-@@ -177,6 +177,7 @@ sg_network_io_stats *sg_get_network_io_s
- net_ptr->ifa_name) < 0) {
- return NULL;
- }
-+ if (net_ptr->ifa_data != NULL) {
- net_data=(struct if_data *)net_ptr->ifa_data;
- network_stat_ptr->rx=net_data->ifi_ibytes;
- network_stat_ptr->tx=net_data->ifi_obytes;
-@@ -187,6 +188,7 @@ sg_network_io_stats *sg_get_network_io_s
- network_stat_ptr->collisions=net_data->ifi_collisions;
- network_stat_ptr->systime=time(NULL);
- interfaces++;
-+ }
- }
- freeifaddrs(net);
- #endif