mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
net-mgmt/bsnmp-regex: Fix build time warnings
- Utilize OPTIONSNG - Utilize USES=localbase - Refresh patches
This commit is contained in:
parent
4837ec5a75
commit
fdf1eb985c
@ -1,6 +1,6 @@
|
||||
PORTNAME= bsnmp-regex
|
||||
PORTVERSION= 0.6
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= LOCAL/olivier
|
||||
|
||||
@ -10,33 +10,26 @@ WWW= http://thewalter.net/stef/software/bsnmp-regex/
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
USES= libtool localbase
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
|
||||
CPPFLAGS+= "-I${LOCALBASE}/include"
|
||||
INSTALL_TARGET= install-strip
|
||||
USES= libtool
|
||||
|
||||
OPTIONS_DEFINE= DEBUG PCRE
|
||||
PCRE_DESC= Use PCRE instead of the default regex library
|
||||
INSTALL_TARGET= install-strip
|
||||
|
||||
PLIST_FILES= bin/sockin lib/snmp_regex.so lib/snmp_regex.so.0 \
|
||||
lib/snmp_regex.so.0.0.0 lib/snmp_regex.a share/man/man1/sockin.1.gz \
|
||||
share/man/man5/bsnmp-regex.conf.5.gz \
|
||||
share/man/man8/bsnmp-regex.8.gz
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
# OPTION PCRE is safe to be removed when devel/pcre is removed
|
||||
# CONFIGURE_ARGS+= --disable-pcre
|
||||
OPTIONS_DEFINE= DEBUG PCRE
|
||||
|
||||
.if ${PORT_OPTIONS:MDEBUG}
|
||||
CONFIGURE_ARGS+=--enable-debug
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-debug
|
||||
.endif
|
||||
PCRE_DESC= Use PCRE instead of the default regex library
|
||||
|
||||
.if ${PORT_OPTIONS:MPCRE}
|
||||
LIB_DEPENDS+= libpcre.so:devel/pcre
|
||||
CONFIGURE_ARGS+= --enable-pcre
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-pcre
|
||||
.endif
|
||||
DEBUG_CONFIGURE_ENABLE=debug
|
||||
PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
|
||||
PCRE_CONFIGURE_ENABLE=pcre
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
52
net-mgmt/bsnmp-regex/files/patch-configure.in
Normal file
52
net-mgmt/bsnmp-regex/files/patch-configure.in
Normal file
@ -0,0 +1,52 @@
|
||||
--- configure.in.orig 2024-03-10 15:09:20 UTC
|
||||
+++ configure.in
|
||||
@@ -13,14 +13,14 @@ AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
-AC_CHECK_PROG(GENSNMPTREE, gensnmptree, "gensnmptree")
|
||||
-if test -z "$GENSNMPTREE"; then
|
||||
- echo "ERROR: gensnmptree program not found."
|
||||
- exit 1
|
||||
+AC_CHECK_PROG(GENSNMPTREE, gensnmptree, "gensnmptree")
|
||||
+if test -z "$GENSNMPTREE"; then
|
||||
+ echo "ERROR: gensnmptree program not found."
|
||||
+ exit 1
|
||||
fi
|
||||
|
||||
# Debug mode
|
||||
-AC_ARG_ENABLE(debug,
|
||||
+AC_ARG_ENABLE(debug,
|
||||
AC_HELP_STRING([--enable-debug],
|
||||
[Compile binaries in debug mode]))
|
||||
|
||||
@@ -36,20 +36,21 @@ AC_ARG_ENABLE(pcre,
|
||||
AC_ARG_ENABLE(pcre,
|
||||
AC_HELP_STRING([--with-pcre],
|
||||
[Use PCRE instead of the default regular expression library]))
|
||||
-
|
||||
+
|
||||
if test "$enable_pcre" = "yes"; then
|
||||
- AC_CHECK_LIB(pcre, pcre_compile, ,
|
||||
+ AC_CHECK_LIB(pcre, pcre_compile, ,
|
||||
[echo "Couldn't find the pcre library"; exit 1])
|
||||
- AC_CHECK_HEADERS("pcre.h", ,
|
||||
+ AC_CHECK_HEADERS("pcre.h", ,
|
||||
[echo "Couldn't find pcre headers"; exit 1])
|
||||
AC_DEFINE_UNQUOTED(WITH_PCRE, 1, [Use PCRE regular expression library])
|
||||
fi
|
||||
|
||||
-AC_CHECK_HEADERS([sys/queue.h sys/limits.h sys/stat.h sys/time.h sys/un.h], ,
|
||||
- [echo "ERROR: required header not found."; exit 1])
|
||||
-AC_CHECK_HEADERS([bsnmp/snmpmod.h], ,
|
||||
- [echo "ERROR: required bsnmp header not found." exit 1])
|
||||
-
|
||||
+AC_CHECK_HEADERS([sys/queue.h sys/limits.h sys/stat.h sys/time.h sys/un.h], ,
|
||||
+ [echo "ERROR: required header not found."; exit 1])
|
||||
+AC_CHECK_HEADERS([bsnmp/snmpmod.h], ,
|
||||
+ [echo "ERROR: required bsnmp header not found." exit 1],
|
||||
+ [#include <sys/queue.h>])
|
||||
+
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_TYPE_SIZE_T
|
@ -1,6 +1,6 @@
|
||||
--- module/bsnmp-regex.c.orig 2011-10-21 16:05:37.000000000 +0700
|
||||
+++ module/bsnmp-regex.c 2018-06-05 21:16:44.471250000 +0700
|
||||
@@ -788,7 +788,7 @@ config_var (char *name, char *value, int
|
||||
--- module/bsnmp-regex.c.orig 2011-10-21 09:05:37 UTC
|
||||
+++ module/bsnmp-regex.c
|
||||
@@ -788,7 +788,7 @@ config_var (char *name, char *value, int line)
|
||||
if (strcmp (name, "expire") == 0 || strcmp (name, "expires") == 0) {
|
||||
|
||||
i = strtol (value, &t2, 10);
|
Loading…
Reference in New Issue
Block a user