git: 2afa5ca04af3 - main - mail/postfix: Add FLAVORS (MySQL, PostgreSQL, SQLite)

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Sat, 12 Nov 2022 21:55:55 UTC
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2afa5ca04af31b7727ba4a9f55a39a538ac199ee

commit 2afa5ca04af31b7727ba4a9f55a39a538ac199ee
Author:     Tomáš Čiernik <tomas@ciernik.sk>
AuthorDate: 2022-11-12 21:52:13 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2022-11-12 21:55:42 +0000

    mail/postfix: Add FLAVORS (MySQL, PostgreSQL, SQLite)
    
    Add databse flavors, based on [1]
    
    PR:             267295
---
 mail/postfix/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 46 insertions(+), 4 deletions(-)

diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index e6746177cd67..30c43f1dee03 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -22,18 +22,48 @@ LICENSE_NAME_IPL10=	IBM PUBLIC LICENSE VERSION 1.0
 LICENSE_FILE=	${WRKSRC}/LICENSE
 LICENSE_PERMS_IPL10=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
-FLAVORS=			default ldap sasl
+FLAVORS=			default ldap mysql pgsql sasl sqlite
 default_CONFLICTS_INSTALL=	postfix-base-ldap postfix-base-sasl \
-				postfix-ldap postfix-sasl
+				postfix-ldap postfix-sasl \
+				postfix-mysql postfix-base-mysql \
+				postfix-pgsql postfix-base-pgsql \
+				postfix-sqlite postfix-base-sqlite
 ldap_PKGNAMESUFFIX=		-ldap
 ldap_CONFLICTS_INSTALL=		postfix postfix-base \
-				postfix-base-sasl postfix-sasl
+				postfix-base-sasl postfix-sasl \
+				postfix-mysql postfix-base-mysql \
+				postfix-pgsql postfix-base-pgsql \
+				postfix-sqlite postfix-base-sqlite
+mysql_PKGNAMESUFFIX=		-mysql
+mysql_CONFLICTS_INSTALL=	postfix postfix-base \
+				postfix-ldap postfix-base-ldap \
+				postfix-pgsql postfix-base-pgsql \
+				postfix-sasl postfix-base-sasl \
+				postfix-sqlite postfix-base-sqlite
+pgsql_PKGNAMESUFFIX=		-pgsql
+pgsql_CONFLICTS_INSTALL=	postfix postfix-base \
+				postfix-ldap postfix-base-ldap \
+				postfix-mysql postfix-base-mysql \
+				postfix-sasl postfix-base-sasl \
+				postfix-sqlite postfix-base-sqlite
 sasl_PKGNAMESUFFIX=		-sasl
 sasl_CONFLICTS_INSTALL=		postfix postfix-base \
-				postfix-base-ldap postfix-ldap
+				postfix-base-ldap postfix-ldap \
+				postfix-mysql postfix-base-mysql \
+				postfix-pgsql postfix-base-pgsql \
+				postfix-sqlite postfix-base-sqlite
+sqlite_PKGNAMESUFFIX=		-sqlite
+sqlite_CONFLICTS_INSTALL=	postfix postfix-base \
+				postfix-ldap postfix-base-ldap \
+				postfix-mysql postfix-base-mysql \
+				postfix-pgsql postfix-base-pgsql \
+				postfix-sasl postfix-base-sasl
 
 COMMENT_ldap=	(with OpenLDAP and Cyrus SASL support)
+COMMENT_mysql=	(with MySQL support)
+COMMENT_pgsql=	(with PostgreSQL support)
 COMMENT_sasl=	(with Cyrus SASL support)
+COMMENT_sqlite=	(with SQLite support)
 
 USES=		cpe shebangfix ssl
 USE_RC_SUBR=	postfix
@@ -58,8 +88,14 @@ OPTIONS_RADIO=		RG1
 OPTIONS_RADIO_RG1=	SASLKMIT SASLKRB5
 .if ${FLAVOR:U} == ldap
 OPTIONS_SLAVE=		LDAP
+.elif ${FLAVOR:U} == mysql
+OPTIONS_SLAVE=		MYSQL
+.elif ${FLAVOR:U} == pgsql
+OPTIONS_SLAVE=		PGSQL
 .elif ${FLAVOR:U} == sasl
 OPTIONS_SLAVE=		SASL
+.elif ${FLAVOR:U} == sqlite
+OPTIONS_SLAVE=		SQLITE
 .endif
 .if !empty(FLAVOR) && ${FLAVOR:U} != default
 OPTIONS_FILE=	${PORT_DBDIR}/${OPTIONS_NAME}/${FLAVOR}-options
@@ -115,8 +151,14 @@ BROKEN=		error: OpenSSL-1.1.1 is the minimum supported version. LibreSSL is not
 .if ${PORT_OPTIONS:MINST_BASE}
 .if ${FLAVOR:U} == ldap
 PKGNAMESUFFIX=	-base-ldap
+.elif ${FLAVOR:U} == mysql
+PKGNAMESUFFIX=	-base-mysql
+.elif ${FLAVOR:U} == pgsql
+PKGNAMESUFFIX=	-base-pgsql
 .elif ${FLAVOR:U} == sasl
 PKGNAMESUFFIX=	-base-sasl
+.elif ${FLAVOR:U} == sqlite
+PKGNAMESUFFIX=	-base-sqlite
 .else
 PKGNAMESUFFIX=	-base
 .endif