freebsd-ports/net-mgmt/p5-SNMP_Session/Makefile
Eugene Grosbein 8745403e86 net-mgmt/p5-SNMP_Session: permit fractional timeout backoff values
This perl module allows to change default timeout backoff and
validates new value with its set_backoff() function.
This function contains obvious copy-paste error from previous functions
set_timeout()/set_retries() that deal with integer values.
So, set_backoff() erroneously check the value to be integer
but it should accept fractional numbers, too.

This change corrects the check eliminating int($backoff) call.
Corrected code compares new value with 1.0 just like old one
but catches possible warning on argument being non-numeric
(non-floating point) and rejects non-numeric allowing fractional numbers.

The change makes it possible to use the following within
mrtg configuration file:

SnmpOptions: backoff => 1.1

PR:		249015
Approved by:	demon (maintainer)
2020-08-30 19:44:10 +00:00

30 lines
758 B
Makefile

# Created by: Stephen J. Roznowski <sjr@home.net>
# $FreeBSD$
PORTNAME= SNMP_Session
PORTVERSION= 1.13
PORTREVISION= 4
CATEGORIES= net-mgmt perl5
MASTER_SITES= http://pkgs.fedoraproject.org/repo/pkgs/perl-SNMP_Session/SNMP_Session-1.13.tar.gz/055e1065babf55f1f8606329c6bdb947/
PKGNAMEPREFIX= p5-
MAINTAINER= demon@FreeBSD.org
COMMENT= Perl5 module providing rudimentary access to SNMPv1 and v2 agents
USES= perl5
USE_PERL5= configure
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
OPTIONS_DEFINE= DOCS
post-patch:
${RM} ${WRKSRC}/lib/SNMP_Session.pm.orig
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in README README.SNMP_util index.html
${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor
.include <bsd.port.mk>