git: 696289b3e6c8 - main - mail/postfix: Fix lmdb dependency

From: Juraj Lutter <otis_at_FreeBSD.org>
Date: Sat, 10 Oct 2026 16:28:55 UTC
The branch main has been updated by otis:

URL: https://cgit.FreeBSD.org/ports/commit/?id=696289b3e6c8daba06c45441af2cd9aa2dbcb6c6

commit 696289b3e6c8daba06c45441af2cd9aa2dbcb6c6
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2026-10-10 15:31:29 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2026-10-10 16:28:32 +0000

    mail/postfix: Fix lmdb dependency
    
    - Do not depend on lmdb even when LMDB is turned off [1]
    
    PR:             299276
---
 mail/postfix/Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 6b99c7e13016..17e5ca8968de 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	postfix
 DISTVERSION=	3.11.7
-PORTREVISION?=	2
+PORTREVISION?=	3
 PORTEPOCH=	1
 CATEGORIES=	mail
 MASTER_SITES=	https://postfix-mirror.horus-it.com/postfix-release/ \
@@ -141,8 +141,6 @@ BDB_USES=			bdb
 CDB_LIB_DEPENDS=		libcdb.so:databases/tinycdb
 EAI_LIB_DEPENDS=		libicuuc.so:devel/icu
 LDAP_USES=			ldap
-LMDB0_LIB_DEPENDS=		liblmdb.so:databases/lmdb0
-LMDB1_LIB_DEPENDS=		liblmdb.so:databases/lmdb
 MONGO_LIB_DEPENDS=		libbson2.so:devel/libbson \
 				libmongoc2.so:devel/mongo-c-driver
 MYSQL_USES?=			mysql
@@ -369,6 +367,11 @@ MANTEST=	qmqp-sink.1 qmqp-source.1 smtp-sink.1 smtp-source.1
 .endif
 
 .if ${PORT_OPTIONS:MLMDB}
+.  if ${PORT_OPTIONS:MLMDB1}
+LIB_DEPENDS+=	liblmdb.so:databases/lmdb
+.  else
+LIB_DEPENDS+=	liblmdb.so:databases/lmdb0
+.  endif
 DYN_EXT+=		lmdb
 POSTFIX_CCARGS+=	-DHAS_LMDB `pkg-config --cflags lmdb`
 POSTFIX_DYN_AUXLIBS+=	"AUXLIBS_LMDB=`pkg-config --libs lmdb`"