diff -ruN net-mgmt/cacti.orig/Makefile net-mgmt/cacti/Makefile --- net-mgmt/cacti.orig/Makefile 2019-01-08 18:13:55.000000000 +0000 +++ net-mgmt/cacti/Makefile 2019-01-14 19:32:57.206746000 +0000 @@ -2,7 +2,7 @@ PORTNAME= cacti PORTVERSION= 1.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt www MASTER_SITES= http://www.cacti.net/downloads/ \ ftp://ftpmirror.uk/freebsd-ports/cacti/ @@ -46,6 +46,11 @@ CACTIGROUP=${CACTIGROUP} CONFLICTS_INSTALL= cacti88 + +OPTIONS_DEFINE= SNMPBIN +OPTIONS_DEFAULT= SNMPBIN +SNMPBIN_DESC= Force use of SNMP binary instead of phpXX-snmp functions +SNMPBIN_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-lib_snmp.php post-patch: @${FIND} ${WRKSRC} -name \*.orig -delete; \ diff -ruN net-mgmt/cacti.orig/files/extra-patch-lib_snmp.php net-mgmt/cacti/files/extra-patch-lib_snmp.php --- net-mgmt/cacti.orig/files/extra-patch-lib_snmp.php 1970-01-01 01:00:00.000000000 +0100 +++ net-mgmt/cacti/files/extra-patch-lib_snmp.php 2019-01-14 19:29:45.153765000 +0000 @@ -0,0 +1,12 @@ +--- lib/snmp.php.orig 2019-01-14 19:28:50 UTC ++++ lib/snmp.php +@@ -870,6 +870,9 @@ function snmp_escape_string($string) { + function snmp_get_method($type = 'walk', $version = 1, $context = '', $engineid = '', + $value_output_format = SNMP_STRING_OUTPUT_GUESS) { + ++ /* override PHP SNMP calls and use the binary instead, fixes some broken graph issues */ ++ return SNMP_METHOD_BINARY; ++ + if ($value_output_format == SNMP_STRING_OUTPUT_HEX) { + return SNMP_METHOD_BINARY; + } elseif ($version == 3 && $context != '') {