From 9bce8280df4b4b9e107b3d643d87a2f89b3adae4 Mon Sep 17 00:00:00 2001 From: Muhammad Moinur Rahman Date: Sat, 11 Feb 2023 06:28:23 -0600 Subject: mail/spamass-milter: Fix build - While converting USE_LDAP=yes to USES=ldap this port was missed. Fix this. - Utilize OPTIONS framework - Utilize USES=localbase - Refactor conditional PORTDOCS as by function this is conditional PR: 269485 Reported by: dinoex Approved by: portmgr (just-fix-it) Fixes: 6e1233b Mk/**ldap.mk: Convert USE_LDAP to USES=ldap --- mail/spamass-milter/Makefile | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) (limited to 'mail/spamass-milter') diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile index 1148b1b1acc0..99d8db475e19 100644 --- a/mail/spamass-milter/Makefile +++ b/mail/spamass-milter/Makefile @@ -8,14 +8,24 @@ MAINTAINER= bmah@FreeBSD.org COMMENT= Sendmail Milter (mail filter) plugin for SpamAssassin WWW= https://savannah.nongnu.org/projects/spamass-milt/ +LICENSE= GPLv2 + BUILD_DEPENDS= spamc:mail/spamassassin RUN_DEPENDS:= ${BUILD_DEPENDS} -LICENSE= GPLv2 +USE_RC_SUBR= spamass-milter + +GNU_CONFIGURE= yes + +SUB_FILES= pkg-message + +PORTDOCS= AUTHORS ChangeLog NEWS README TODO OPTIONS_DEFINE= LDAP MILTER_PORT DOCS MILTER_PORT_DESC= Build against libmilter port +LDAP_USES= ldap localbase:ldflags + .include .if exists(${LOCALBASE}/lib/libldap.so) @@ -23,36 +33,19 @@ WITH_LDAP=yes .undef WITHOUT_LDAP .endif -.if ${PORT_OPTIONS:MLDAP} -USE+= ldap -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib -.endif - -.if ${PORT_OPTIONS:MDOCS} -PORTDOCS= AUTHORS ChangeLog NEWS README TODO -.endif - -USE_RC_SUBR= spamass-milter -GNU_CONFIGURE= yes - -SUB_FILES= pkg-message - post-patch: @${SED} -e's,%%PREFIX%%,${PREFIX},g' \ ${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt -.if ${PORT_OPTIONS:MLDAP} && ${PORT_OPTIONS:MLDAP} + +post-patch-LDAP-on: @${REINPLACE_CMD} -e 's|-lmilter|-lmilter -lldap|g' ${WRKSRC}/configure -.endif -post-install: -.if ${PORT_OPTIONS:MDOCS} +post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKDIR}/activation.txt ${STAGEDIR}${DOCSDIR}/activation.txt .for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} .endfor -.endif .include "${PORTSDIR}/mail/sendmail/bsd.milter.mk" .include -- cgit v1.2.3