ports/170943: [PATCH] build mail/spamass-milter with sendmail-sasl
Chris Rees
crees at FreeBSD.org
Thu Aug 23 21:10:04 UTC 2012
>Number: 170943
>Category: ports
>Synopsis: [PATCH] build mail/spamass-milter with sendmail-sasl
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 23 21:10:03 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Chris Rees
>Release: FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root at pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64
>Description:
As reported by Curtis Villamizar;
The mail/spamass-milter port won't build if the sendmail-sasl port has
been built. The patch below fixes this.
>How-To-Repeat:
>Fix:
While here, convert to OPTIONSng and remove LDAP autodetection;
while clever, this is not allowed in ports! [1]
[1] http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/book.html#AEN2437
--- patch.txt begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 303035)
+++ Makefile (working copy)
@@ -21,28 +21,40 @@
MAKE_JOBS_SAFE= yes
-OPTIONS= ADDAUTH_PATCH "Bypass checks for SMTP AUTH connections" off \
- REJECTTEXT_PATCH "Customize SMTP reject message" off \
- LDAP "LDAP support" off \
- SENDMAIL_PORT "Build against sendmail port" off \
- IPV6 "Apply IPv6 whitelist patch" off
+OPTIONS_DEFINE= ADDAUTH_PATCH REJECTTEXT_PATCH LDAP SENDMAIL_PORT \
+ SENDMAIL_SASL IPV6 DOCS
-.include <bsd.port.pre.mk>
+OPTIONS_DEFAULT=DOCS
+ADDAUTH_PATCH_DESC= Bypass checks for SMTP AUTH connections
+REJECTTEXT_PATCH_DESC= Customize SMTP reject message
+SENDMAIL_PORT_DESC= Build against sendmail port
+SENDMAIL_SASL_DESC= Use SASL version of sendmail port
+IPV6_DESC= Apply IPv6 whitelist patch
+
+.include <bsd.port.options.mk>
+
ORIG_ARGS= fd:mMp:P:r:u:D:i:b:B:e:x
NEW_ARGS:= ${ORIG_ARGS}
-.if defined(WITH_ADDAUTH_PATCH)
+.if ${PORT_OPTIONS:MSENDMAIL_PORT}
+WITH_SENDMAIL_PORT= yes
+. if ${PORT_OPTIONS:MSENDMAIL_SASL}
+SENDMAIL_MILTER_PORT= sendmail-sasl
+. endif
+.endif
+
+.if ${PORT_OPTIONS:MADDAUTH_PATCH}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-addauth
NEW_ARGS:= ${NEW_ARGS}a
.endif
-.if defined(WITH_REJECTTEXT_PATCH)
+.if ${PORT_OPTIONS:MREJECTTEXT_PATCH}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-rejecttext1
NEW_ARGS:= ${NEW_ARGS}R:
.endif
-.if defined(WITH_IPV6)
+.if ${PORT_OPTIONS:MIPV6}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-ipv6
.endif
@@ -51,20 +63,13 @@
EXTRA_PATCHES+= ${WRKDIR}/extra-patch-options
.endif
-.if exists(${LOCALBASE}/lib/libldap.so)
-WITH_LDAP=yes
-.undef WITHOUT_LDAP
-.endif
-
-.if !defined(WITHOUT_LDAP) && defined(WITH_LDAP)
-USE_OPENLDAP=yes
+.if ${PORT_OPTIONS:MLDAP}
+USE_OPENLDAP= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.endif
-.if !defined(NOPORTDOCS)
PORTDOCS= AUTHORS ChangeLog NEWS README TODO
-.endif
USE_RC_SUBR= spamass-milter
GNU_CONFIGURE= yes
@@ -81,20 +86,20 @@
post-patch:
@${SED} -e's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/activation.txt > ${WRKDIR}/activation.txt
-.if !defined(WITHOUT_LDAP) && defined(WITH_LDAP)
+.if ${PORT_OPTIONS:MLDAP}
@${REINPLACE_CMD} -e 's|-lmilter|-lmilter -lldap|g' ${WRKSRC}/configure
.endif
post-install:
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKDIR}/activation.txt ${DOCSDIR}/activation.txt
-.for f in ${PORTDOCS}
+. for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
-.endfor
+. endfor
.endif
@${CAT} ${PKGMESSAGE}
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- patch.txt ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list