diff --git a/net-mgmt/cacti/Makefile b/net-mgmt/cacti/Makefile index 372e6ee2d369..56b90aaee2a4 100644 --- a/net-mgmt/cacti/Makefile +++ b/net-mgmt/cacti/Makefile @@ -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/ @@ -47,6 +47,11 @@ SUB_LIST+= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ 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; \ ${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample diff --git a/net-mgmt/cacti/files/extra-patch-lib_snmp.php b/net-mgmt/cacti/files/extra-patch-lib_snmp.php new file mode 100644 index 000000000000..c8d05f91dcb5 --- /dev/null +++ b/net-mgmt/cacti/files/extra-patch-lib_snmp.php @@ -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 != '') {