diff --git a/net-mgmt/pmacct/Makefile b/net-mgmt/pmacct/Makefile index ddfe7b8b521e..926075275e45 100644 --- a/net-mgmt/pmacct/Makefile +++ b/net-mgmt/pmacct/Makefile @@ -1,91 +1,95 @@ PORTNAME= pmacct DISTVERSION= 1.7.9 CATEGORIES= net-mgmt MASTER_SITES= http://www.pmacct.net/ MAINTAINER= pi@FreeBSD.org COMMENT= Accounting and aggregation tool for IPv4 and IPv6 traffic WWW= http://www.pmacct.net/ LICENSE= GPLv2 LIB_DEPENDS= libcdada.so:devel/libcdada USES= gmake libtool pkgconfig localbase autoreconf USE_RC_SUBR= pmacctd nfacctd sfacctd SUB_FILES= pkg-message GNU_CONFIGURE= yes OPTIONS_DEFINE= MYSQL PGSQL SQLITE3 LAYER2 DEBUG GEOIP2 \ DOCS 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 PGSQL_DESC= PostgreSQL database support (broken) 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 DEBUG_CONFIGURE_ENABLE= debug RABBITMQ_LIB_DEPENDS= librabbitmq.so:net/rabbitmq-c 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 .include .if ${ARCH} == "i386" EXTRA_PATCHES+= ${FILESDIR}/extra-patch-i386 +# powerpc: force the byte-copy Assign macros; the simple ones truncate 16/32-bit +# values into u_char packet fields (fails -Werror on BE, wrong ethertype). +.elif ${ARCH:Mpowerpc*} +CFLAGS+= -DNEED_ALIGN .endif PLIST_SUB+= SQLDOC=${SQLDOC} .if ${PORT_OPTIONS:MRABBITMQ} || ${PORT_OPTIONS:MKAFKA} LIB_DEPENDS+= libjansson.so:devel/jansson CONFIGURE_ARGS+=--enable-jansson .endif 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 diff --git a/net-mgmt/pmacct/files/patch-src_pmacct.h b/net-mgmt/pmacct/files/patch-src_pmacct.h new file mode 100644 index 000000000000..6592e4d35b87 --- /dev/null +++ b/net-mgmt/pmacct/files/patch-src_pmacct.h @@ -0,0 +1,16 @@ +--- src/pmacct.h.orig 2026-09-16 06:48:00 UTC ++++ src/pmacct.h +@@ -106,9 +106,13 @@ + #endif + + #if defined IM_BIG_ENDIAN ++#undef ntohs + #define ntohs(x) (x) ++#undef ntohl + #define ntohl(x) (x) ++#undef htons + #define htons(x) (x) ++#undef htonl + #define htonl(x) (x) + #endif +