git: 6acfc9703151 - main - ftp/proftpd: add support for pcre2 and make it default

From: Martin Matuska <mm_at_FreeBSD.org>
Date: Sun, 22 Jan 2023 22:04:24 UTC
The branch main has been updated by mm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6acfc9703151eecbc51c936c6fd8a3b37fea0ac9

commit 6acfc9703151eecbc51c936c6fd8a3b37fea0ac9
Author:     Martin Matuska <mm@FreeBSD.org>
AuthorDate: 2023-01-22 21:54:45 +0000
Commit:     Martin Matuska <mm@FreeBSD.org>
CommitDate: 2023-01-22 22:03:31 +0000

    ftp/proftpd: add support for pcre2 and make it default
---
 ftp/proftpd/Makefile | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/ftp/proftpd/Makefile b/ftp/proftpd/Makefile
index 8137d6de797a..31e8020950af 100644
--- a/ftp/proftpd/Makefile
+++ b/ftp/proftpd/Makefile
@@ -2,7 +2,7 @@ PORTNAME?=	proftpd
 .if !defined(DISTVERSION)
 PORTVERSION?=	${PROFTPD_VERSION}
 .endif
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES?=	ftp
 MASTER_SITES=	ftp://ftp.proftpd.org/distrib/source/ \
 		https://github.com/downloads/proftpd/proftpd.github.com/ \
@@ -87,11 +87,17 @@ PLIST_FILES+=	libexec/proftpd/${m}.a \
 		libexec/proftpd/${m}.so
 .endfor
 .else
-OPTIONS_DEFINE=	DOCS HTMLDOCS IPV6 NLS MEMCACHE PCRE REDIS
-OPTIONS_DEFAULT=	PCRE
+OPTIONS_DEFINE=	DOCS HTMLDOCS IPV6 NLS MEMCACHE REDIS
+OPTIONS_DEFAULT=	PCRE2
+
+OPTIONS_RADIO+=	PCREVER
+OPTIONS_RADIO_PCREVER=	PCRE1 PCRE2
 
 HTMLDOCS_DESC=		Include HTML documentation
 MEMCACHE_DESC=		Memcache support using libmemcached
+PCREVER_DESC=		PCRE library to use
+PCRE1_DESC=		${PCRE_DESC}
+PCRE2_DESC=		${PCRE_DESC} version 2
 REDIS_DESC=		Redis support using hiredis
 
 PLIST_SUB+=	LOCALSTATEDIR="${LOCALSTATEDIR}"
@@ -148,8 +154,13 @@ IPV6_CONFIGURE_ENABLE=ipv6
 NLS_CONFIGURE_ON=	--enable-nls
 NLS_USES=		gettext iconv
 
-PCRE_CONFIGURE_ENABLE=	pcre
-PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
+PCRE1_CONFIGURE_ENABLE=	pcre
+PCRE1_CONFIGURE_ON=	--disable-pcre2
+PCRE1_LIB_DEPENDS=	libpcre.so:devel/pcre
+
+PCRE2_CONFIGURE_ENABLE=	pcre2
+PCRE2_CONFIGURE_ON=	--disable-pcre
+PCRE2_LIB_DEPENDS=	libpcre2-8.so:devel/pcre2
 
 MEMCACHE_LIB_DEPENDS=	libmemcached.so:databases/libmemcached
 MEMCACHE_CONFIGURE_ENABLE=	memcache