From owner-freebsd-ports@FreeBSD.ORG Sat Aug 25 20:38:05 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E4A6E106566C; Sat, 25 Aug 2012 20:38:05 +0000 (UTC) (envelope-from curtis@occnc.com) Received: from gateway2.orleans.occnc.com (gateway2.orleans.occnc.com [IPv6:2001:470:1f07:1545::1:145]) by mx1.freebsd.org (Postfix) with ESMTP id 799E58FC08; Sat, 25 Aug 2012 20:38:05 +0000 (UTC) Received: from harbor2.ipv6.occnc.com (harbor2.ipv6.occnc.com [IPv6:2001:470:1f07:1545::1:404]) (authenticated bits=0) by gateway2.orleans.occnc.com (8.14.5/8.14.5) with ESMTP id q7PKc4Md010350; Sat, 25 Aug 2012 16:38:04 -0400 (EDT) (envelope-from curtis@occnc.com) Message-Id: <201208252038.q7PKc4Md010350@gateway2.orleans.occnc.com> To: Chris Rees From: Curtis Villamizar In-reply-to: Your message of "Thu, 23 Aug 2012 22:12:34 BST." Date: Sat, 25 Aug 2012 16:38:04 -0400 Cc: freebsd-ports@freebsd.org, curtis@occnc.com Subject: Re: patch to build spamass-milter with sendmail-sasl X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: curtis@occnc.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Aug 2012 20:38:06 -0000 In message Chris Rees writes: > On 23 August 2012 21:37, Lawrence K. Chen, P.Eng. 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 + +# 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