aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2008-04-28 22:33:53 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2008-04-28 22:33:53 +0000
commitc1830a37f80e2d583f1819554b74e7e14f29e200 (patch)
tree33041b3d764d3e4d31906535f8633ba6502bd935
parentc7f302cd989cf9df7da090f1eee9c9ae0e4adb53 (diff)
downloadports-c1830a37f80e2d583f1819554b74e7e14f29e200.tar.gz
ports-c1830a37f80e2d583f1819554b74e7e14f29e200.zip
Notes
-rw-r--r--net-mgmt/net-snmp-devel/Makefile2
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-ucd_snmp.h16
-rw-r--r--net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c22
-rw-r--r--net-mgmt/net-snmp/Makefile2
-rw-r--r--net-mgmt/net-snmp/files/patch-ucd_snmp.h16
-rw-r--r--net-mgmt/net-snmp/files/patch-vmstat_freebsd2.c22
6 files changed, 78 insertions, 2 deletions
diff --git a/net-mgmt/net-snmp-devel/Makefile b/net-mgmt/net-snmp-devel/Makefile
index b6756a0c8e41..1d784c20d766 100644
--- a/net-mgmt/net-snmp-devel/Makefile
+++ b/net-mgmt/net-snmp-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp-devel/files/patch-ucd_snmp.h b/net-mgmt/net-snmp-devel/files/patch-ucd_snmp.h
new file mode 100644
index 000000000000..476951ce818c
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-ucd_snmp.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- agent/mibgroup/ucd_snmp.h.orig
++++ agent/mibgroup/ucd_snmp.h
+@@ -13,5 +13,10 @@
+ config_require(ucd-snmp/logmatch)
+ config_require(ucd-snmp/memory)
+ config_require(ucd-snmp/vmstat)
++config_arch_require(freebsd4, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd6, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd7, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd8, ucd-snmp/vmstat_freebsd2)
+ config_add_mib(UCD-SNMP-MIB)
+ config_add_mib(UCD-DEMO-MIB)
diff --git a/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c b/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
new file mode 100644
index 000000000000..310c0bbf5320
--- /dev/null
+++ b/net-mgmt/net-snmp-devel/files/patch-vmstat_freebsd2.c
@@ -0,0 +1,22 @@
+--- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2008-04-25 16:28:53.000000000 +0300
++++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c 2008-04-25 16:29:01.000000000 +0300
+@@ -174,6 +174,7 @@
+ static long cpu_total;
+ long cpu_sum;
+ double cpu_prc;
++ int mib[2], mib_len, cpu_new_len;
+
+ static struct vmmeter mem_old, mem_new;
+
+@@ -195,7 +196,10 @@
+ /*
+ * CPU usage
+ */
+- auto_nlist(CPTIME_SYMBOL, (char *) cpu_new, sizeof(cpu_new));
++ mib_len = 2;
++ sysctlnametomib("kern.cp_time", mib, &mib_len);
++ cpu_new_len = sizeof(cpu_new);
++ sysctl(mib, mib_len, cpu_new, &cpu_new_len, NULL, 0);
+
+ cpu_total = 0;
+
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index b6756a0c8e41..1d784c20d766 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= snmp
PORTVERSION= 5.4.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-mgmt ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= net-snmp
diff --git a/net-mgmt/net-snmp/files/patch-ucd_snmp.h b/net-mgmt/net-snmp/files/patch-ucd_snmp.h
new file mode 100644
index 000000000000..476951ce818c
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-ucd_snmp.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- agent/mibgroup/ucd_snmp.h.orig
++++ agent/mibgroup/ucd_snmp.h
+@@ -13,5 +13,10 @@
+ config_require(ucd-snmp/logmatch)
+ config_require(ucd-snmp/memory)
+ config_require(ucd-snmp/vmstat)
++config_arch_require(freebsd4, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd5, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd6, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd7, ucd-snmp/vmstat_freebsd2)
++config_arch_require(freebsd8, ucd-snmp/vmstat_freebsd2)
+ config_add_mib(UCD-SNMP-MIB)
+ config_add_mib(UCD-DEMO-MIB)
diff --git a/net-mgmt/net-snmp/files/patch-vmstat_freebsd2.c b/net-mgmt/net-snmp/files/patch-vmstat_freebsd2.c
new file mode 100644
index 000000000000..310c0bbf5320
--- /dev/null
+++ b/net-mgmt/net-snmp/files/patch-vmstat_freebsd2.c
@@ -0,0 +1,22 @@
+--- agent/mibgroup/ucd-snmp/vmstat_freebsd2.c.orig 2008-04-25 16:28:53.000000000 +0300
++++ agent/mibgroup/ucd-snmp/vmstat_freebsd2.c 2008-04-25 16:29:01.000000000 +0300
+@@ -174,6 +174,7 @@
+ static long cpu_total;
+ long cpu_sum;
+ double cpu_prc;
++ int mib[2], mib_len, cpu_new_len;
+
+ static struct vmmeter mem_old, mem_new;
+
+@@ -195,7 +196,10 @@
+ /*
+ * CPU usage
+ */
+- auto_nlist(CPTIME_SYMBOL, (char *) cpu_new, sizeof(cpu_new));
++ mib_len = 2;
++ sysctlnametomib("kern.cp_time", mib, &mib_len);
++ cpu_new_len = sizeof(cpu_new);
++ sysctl(mib, mib_len, cpu_new, &cpu_new_len, NULL, 0);
+
+ cpu_total = 0;
+