Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Aug 2012 16:38:04 -0400
From:      Curtis Villamizar <curtis@occnc.com>
To:        Chris Rees <crees@freebsd.org>
Cc:        freebsd-ports@freebsd.org, curtis@occnc.com
Subject:   Re: patch to build spamass-milter with sendmail-sasl
Message-ID:  <201208252038.q7PKc4Md010350@gateway2.orleans.occnc.com>
In-Reply-To: Your message of "Thu, 23 Aug 2012 22:12:34 BST." <CADLo839FeQroEt6r12%2BKgWgoUuj1gcNkanm-hqHVQSC2g8k-Ug@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

In message <CADLo839FeQroEt6r12+KgWgoUuj1gcNkanm-hqHVQSC2g8k-Ug@mail.gmail.com>
Chris Rees writes:
 
> On 23 August 2012 21:37, Lawrence K. Chen, P.Eng. <lkchen@ksu.edu> wrote:
> > Just the patch I was looking for.
> >
> > ----- Original Message -----
> >>
> >> FYI-
> >>
> >> The mail/spamass-milter port won't build if the sendmail-sasl port
> >> has
> >> been built.  The patch below fixes this.
> >>
> >> The port maintainer is on the Cc.  No bug has been reported.
>  
> Thanks for your patch Curtis; I've used it as a base for some further
> tweaks, and sent a PR [1].
>  
> Unfortunately you hadn't CC'd the correct maintainer, but this is not
> a problem since the PR will email him for us.
>  
> Chris
>  
> [1] http://www.freebsd.org/cgi/query-pr.cgi?pr=170943


There may be a better way to fix this - eliminate the need for the
sendmail-sasl and sendmail-ldap ports by using the options framework
in the sendmail port.  I used this diff to do that in a later build.
(the first was amd64, the second i386).

Curtis


The following patch is to the Makefile in {/usr/ports/}mail/sendmail
and only makes use of the port options framework to set options rather
than having users either type them on the command line, or edit the
makefile, or use pseudo ports like sendmail-sasl and sendmail-ldap to
set a specific option.  The sendmail-sasl and sendmail-ldap should be
marked as depricated in their makefiles.


--- Makefile.orig	2012-08-14 12:59:13.000000000 -0400
+++ Makefile	2012-08-14 13:05:18.000000000 -0400
@@ -41,26 +41,113 @@
 PKGMESSAGE=	${WRKSRC}/pkg-message
 MILTER_SOVER?=	4
 
-# Options to define Features:
-# SENDMAIL_WITHOUT_IPV6=yes
-# SENDMAIL_WITHOUT_MILTER=yes
-# SENDMAIL_WITHOUT_NIS=yes
-# SENDMAIL_WITHOUT_SHMEM=yes
-# SENDMAIL_WITHOUT_SEM=yes
-# SENDMAIL_WITHOUT_LA=yes
-# SENDMAIL_WITHOUT_MILTER_POOL
-# SENDMAIL_WITH_TLS=yes
-# SENDMAIL_WITH_SMTPS=yes
-# SENDMAIL_WITH_SASL=yes
-# SENDMAIL_WITH_SASL2=yes
-# SENDMAIL_WITH_LDAP=yes
-# SENDMAIL_WITH_BERKELEYDB=yes
-#   Set either WITH_BDB_VER or SENDMAIL_WITH_BDB_VER
-#   to the version of Berkeley DB to use.
-# SENDMAIL_WITH_SOCKETMAP=yes
-# SENDMAIL_WITH_CYRUSLOOKUP=yes
-# SENDMAIL_WITH_PICKY_HELO_CHECK=yes
-# SENDMAIL_WITH_SHARED_MILTER=yes
+OPTIONS=	IPV6		"build with IPv6 support" on \
+		MILTER		"milter (mail filter plugin interface)" on \
+		MILTER_POOL	"milter pool (allow worker pools)" on \
+		NIS		"NIS (aka YP services)" off \
+		SHMEM		"SysV shared memory (SHMEM)" on \
+		SEM		"SysV semaphores (SEM)" on \
+		LA		"Load average support" on \
+		TLS		"transport layer security (TLS)" off \
+		SMTPS		"SMTP security" on \
+		SASL		"SASL (version 2)" on \
+		SASLAUTHD	"SASL authorization daemon" off \
+		LDAP		"LDAP" off \
+		BDB		"Berle;ey database (DB4" on \
+		SOCKETMAP	"trivial SOCKETMAP query protocol" off \
+		CYRUSLOOKUP	"SASL database lookup" off \
+		PICKY_HELO_CHECK	"enable picky SMTP HELO check" off \
+		SHARED_MILTER	"shared milter" off
+
+.include <bsd.port.options.mk>
+
+# convert OPTIONS in WITH_* form to SENDMAIL_WITH_*
+.if defined(WITH_IPV6)
+SENDMAIL_WITH_IPV6=yes
+.else
+SENDMAIL_WITHOUT_IPV6=yes
+.endif
+.if defined(WITH_MILTER)
+SENDMAIL_WITH_MILTER=yes
+.else
+SENDMAIL_WITHOUT_MILTER=yes
+.endif
+.if defined(WITH_MILTER_POOL)
+SENDMAIL_WITH_MILTER_POOL=yes
+.else
+SENDMAIL_WITHOUT_MILTER_POOL=yes
+.endif
+.if defined(WITH_NIS)
+SENDMAIL_WITH_NIS=yes
+.else
+SENDMAIL_WITHOUT_NIS=yes
+.endif
+.if defined(WITH_SHMEM)
+SENDMAIL_WITH_SHMEM=yes
+.else
+SENDMAIL_WITHOUT_SHMEM=yes
+.endif
+.if defined(WITH_SEM)
+SENDMAIL_WITH_SEM=yes
+.else
+SENDMAIL_WITHOUT_SEM=yes
+.endif
+.if defined(WITH_LA)
+SENDMAIL_WITH_LA=yes
+.else
+SENDMAIL_WITHOUT_LA=yes
+.endif
+.if defined(WITH_TLS)
+SENDMAIL_WITH_TLS=yes
+.else
+SENDMAIL_WITHOUT_TLS=yes
+.endif
+.if defined(WITH_SMTPS)
+SENDMAIL_WITH_SMTPS=yes
+.else
+SENDMAIL_WITHOUT_SMTPS=yes
+.endif
+.if defined(WITH_SASL)
+SENDMAIL_WITH_SASL=yes
+SENDMAIL_WITH_SASL2=yes
+.else
+SENDMAIL_WITHOUT_SASL=yes
+SENDMAIL_WITHOUT_SASL2=yes
+.endif
+.if defined(WITH_LDAP)
+SENDMAIL_WITH_LDAP=yes
+.else
+SENDMAIL_WITHOUT_LDAP=yes
+.endif
+.if defined(WITH_BDB)
+SENDMAIL_WITH_BDB=yes
+SENDMAIL_WITH_BDB_VER=4
+.endif
+.if defined(WITH_SOCKETMAP)
+SENDMAIL_WITH_SOCKETMAP=yes
+.else
+SENDMAIL_WITHOUT_SOCKETMAP=yes
+.endif
+.if defined(WITH_CYRUSLOOKUP)
+SENDMAIL_WITH_CYRUSLOOKUP=yes
+.else
+SENDMAIL_WITHOUT_CYRUSLOOKUP=yes
+.endif
+.if defined(WITH_PICKY_HELO_CHECK)
+SENDMAIL_WITH_PICKY_HELO_CHECK=yes
+.else
+SENDMAIL_WITHOUT_PICKY_HELO_CHECK=yes
+.endif
+.if defined(WITH_SHARED_MILTER)
+SENDMAIL_WITH_SHARED_MILTER=yes
+.else
+SENDMAIL_WITHOUT_SHARED_MILTER=yes
+.endif
+
+#
+#  Override some related defines.
+#  This should be changed to point out conflicts and stop.
+#
 
 .if defined(SENDMAIL_WITH_SMTPS) && !defined(SENDMAIL_WITH_TLS) && !defined(WITH_TLS)
 SENDMAIL_WITH_TLS=yes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208252038.q7PKc4Md010350>