1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/net-mgmt/pmacct/Makefile
Dimitry Andric f508cdd3cc net-mgmt/pmacct: mark unused but set variables with attributes
With clang 13, building net-mgmt/pmacct results in a number of warnings:

netflow9.c:2236:25: error: variable 'tot_len' set but not used [-Werror,-Wunused-but-set-variable]
                        u_int16_t flows = 0, tot_len = 0;
                                             ^

In this particular instance, the 'tot_len' variable does not seem to
have any purpose, nor does it have any further side-effects. There is
one more instance of a set but unused variable 'label' in src/sflow.c,
but the code there is also increasing a byte ptr, so it can't easily be
eliminated. For now mark these variables as unused, with an attribute.

Approved by:	pi (maintainer)
PR:		258513
MFC:		2021Q3
2021-09-22 20:43:17 +02:00

90 lines
2.3 KiB
Makefile

# Created by: Kirill Ponomarew <ponomarew@oberon.net>
PORTNAME= pmacct
DISTVERSION= 1.7.5
PORTREVISION= 1
CATEGORIES= net-mgmt
MASTER_SITES= http://www.pmacct.net/
MAINTAINER= pi@FreeBSD.org
COMMENT= Accounting and aggregation tool for IPv4 and IPv6 traffic
LICENSE= GPLv2
USES= libtool pkgconfig localbase
USE_RC_SUBR= pmacctd nfacctd sfacctd
SUB_FILES= pkg-message
GNU_CONFIGURE= yes
OPTIONS_DEFINE= MYSQL PGSQL SQLITE3 LAYER2 DEBUG GEOIP2 \
DOCS PLABEL RABBITMQ REDIS KAFKA AVRO EXAMPLES
OPTIONS_DEFAULT=LAYER2
OPTIONS_SUB= yes
AVRO_DESC= Enable avro support
GEOIP2_DESC= Enable GeoIPv2 (libmaxminddb) support
KAFKA_DESC= Enable Kafka support
LAYER2_DESC= Enable Layer-2 support: MAC addresses and VLANs
PLABEL_DESC= Enable IP prefix labels
RABBITMQ_DESC= Enable RabbitMQ/AMQP support
REDIS_DESC= Enable Redis support
SQLITE3_DESC= Enable SQLite3 support
SQLDOC= "@comment "
MYSQL_USES= mysql
MYSQL_CONFIGURE_ENABLE= mysql
MYSQL_VARS+= SQLDOC=""
PGSQL_USES= pgsql
PGSQL_CONFIGURE_ENABLE= pgsql
PGSQL_VARS+= WANT_PGSQL=client
PGSQL_VARS+= SQLDOC=""
SQLITE3_USES= sqlite
SQLITE3_CONFIGURE_ENABLE= sqlite3
SQLITE3_VARS= SQLDOC=""
LAYER2_CONFIGURE_ENABLE= l2
PLABEL_CONFIGURE_ENABLE= plabel
DEBUG_CONFIGURE_ENABLE= debug
RABBITMQ_LIB_DEPENDS= librabbitmq.so:net/rabbitmq-c-devel
RABBITMQ_CONFIGURE_ENABLE= rabbitmq
REDIS_LIB_DEPENDS= libhiredis.so:databases/hiredis
REDIS_CONFIGURE_ENABLE= redis
KAFKA_LIB_DEPENDS= librdkafka.so:net/librdkafka
KAFKA_CONFIGURE_ENABLE= kafka
AVRO_LIB_DEPENDS= libavro.so:devel/avro-c
AVRO_CONFIGURE_ENABLE= avro
GEOIP2_LIB_DEPENDS= libmaxminddb.so:net/libmaxminddb
GEOIP2_CONFIGURE_ENABLE= geoipv2
.include <bsd.port.options.mk>
PLIST_SUB+= SQLDOC=${SQLDOC}
.if ${PORT_OPTIONS:MRABBITMQ} || ${PORT_OPTIONS:MKAFKA}
LIB_DEPENDS+= libjansson.so:devel/jansson
CONFIGURE_ARGS+=--enable-jansson
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-O2||g' ${WRKSRC}/configure
post-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/[A-Z]* ${STAGEDIR}${DOCSDIR}
.for i in AUTHORS CONFIG-KEYS COPYING ChangeLog FAQS INSTALL QUICKSTART UPGRADE
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
.endfor
${MKDIR} ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>