ports/net/rtg/Makefile
Florian Smeets 92a030dffd databases/p5-DBD-mysql: Fix for MariaDB users
Add a new variable DBD_MYSQL, use that in *_DEPENDS and add mysql to USES
where required. DBD_MYSQL will automatically set the correct DBD dependency.

In cd16748194 databases/p5-DBD-mysql was updated to 5.x, in 5.x the
support for MariaDB was removed and only MySQL >= 8.0 is supported.

In the 4.x releases MariaDB is still supported, according to upstream 4.x
will still be supported for a while [1], so use that for now when we detect
that MYSQL_FLAVOUR is set to mariadb. databases/p5-DBD-mysql4 was added in
d95f49cb3b.

DBD:MariaDB would be another alternative, but migrating to it might need
more analysis than just staying with the 4.x releases of p5-DBD-mysql. This
thread on the amavis-users mailing list has a very good summary [2] from
the author of DBD:MariaDB.

This includes ideas and suggestions from vvd and mat. Thanks!

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=277889#c17
[2] https://lists.amavis.org/pipermail/amavis-users/2024-March/006823.html

PR:		275100, 277889
Reviewed by:	vvd, mat
Fixes:	cd16748194
Differential Revision: https://reviews.freebsd.org/D44662
2024-04-07 11:36:13 +02:00

51 lines
1.3 KiB
Makefile

PORTNAME= rtg
PORTVERSION= 0.7.5
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= ftp://ftpmirror.uk/freebsd-ports/rtg/
MAINTAINER= freebsd-ports@dan.me.uk
COMMENT= Flexible, high-performance SNMP statistics monitoring system
WWW= https://rtg.sourceforge.net
LICENSE= GPLv2
LIB_DEPENDS= libnetsnmp.so:net-mgmt/net-snmp \
libgd.so:graphics/gd
RUN_DEPENDS= p5-DBI>=0:databases/p5-DBI \
${DBD_MYSQL}
USES= mysql:client perl5 shebangfix ssl
USE_RC_SUBR= rtgpoll
SHEBANG_FILES= etc/95.pl etc/report.pl etc/rtgtargmkr.pl.in
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/${PORTNAME} \
--htmldir=${PREFIX}/www/data \
--with-mysql=${LOCALBASE} \
--with-gd=${LOCALBASE} \
--with-snmp=${LOCALBASE}
CFLAGS+= -fstack-protector
LDFLAGS+= -fstack-protector
USERS= rtg
GROUPS= rtg
OPTIONS_DEFINE= WEB MYSQL
MYSQL_DESC= Pull MySQL server in as a dependancy for local setups
WEB_DESC= Include PHP-based web client interface pre-requisites
MYSQL_USES= mysql:server
WEB_USES= php
WEB_USE= PHP=mysqli
WEB_SUB_FILES= pkg-message
post-patch:
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/95.pl
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/report.pl
@${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/etc/common.php.in
.include <bsd.port.mk>