ports/51087: spamass-milter can not be built with sendmail from ports
Oleg Sharoiko
os at rsu.ru
Thu Apr 17 10:50:19 UTC 2003
>Number: 51087
>Category: ports
>Synopsis: spamass-milter can not be built with sendmail from ports
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 17 03:50:14 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Oleg Sharoiko
>Release: FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD brain.cc.rsu.ru 4.7-STABLE FreeBSD 4.7-STABLE #1: Mon Mar 17 16:02:48 MSK 2003 os at brain.cc.rsu.ru:/usr/src/sys/compile/brain.k7.RELENG_4.2002-11-06 i386
>Description:
The current port mail/spamass-milter can not be built with
sendmail from ports, mail/spamass-milter works only with sendmail
from base system. The proposed patch fixes this porblem.
>How-To-Repeat:
>Fix:
Apply the following patch to mail/spamass-milter/Makefile
--- Makefile 21 Feb 2003 12:42:24 -0000 1.6
+++ Makefile 17 Apr 2003 10:43:15 -0000
@@ -17,9 +17,49 @@
autoconf:${PORTSDIR}/devel/autoconf
RUN_DEPENDS= spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
-.if !exists(/usr/lib/libmilter.a)
-IGNORE= requires Sendmail 8.12; upgrade the base system
+#
+# You can choose the sendmail to be used by specifying
+#
+# WITH_SENDMAIL_BASE=yes
+# or
+# WITH_SENDMAIL_PORT=yes
+#
+
+# if no preference was set, check for an up to date base version
+# but give an installed port preference over it.
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITH_SENDMAIL_BASE) && \
+ !defined(WITH_SENDMAIL_PORT) && \
+ !exists(${LOCALBASE}/lib/libmilter.a)
+WITH_SENDMAIL_BASE=yes
+.endif
+
+.if defined(WITH_SENDMAIL_BASE)
+.if exists(/usr/lib/libmilter.a)
+MILTERBASE= /usr
+.else
+.BEGIN:
+ @${ECHO_CMD} "This port requires Sendmail 8.12"
+ @${ECHO_CMD} "You requested to build with sendmail from the base system"
+ @${ECHO_CMD} "sendmail in base system is too old or was not installed"
+ @${ECHO_CMD} "Upgrade/reinstall base system or build with"
+ @${ECHO_CMD} "sendmail from ports"
+ @${FALSE}
.endif
+.else
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
+MILTERBASE?= ${LOCALBASE}
+.endif
+
+MILTERINC= ${MILTERBASE}/include
+MILTERLIB= ${MILTERBASE}/lib
+
+CPPFLAGS+= -I${MILTERINC}
+LDFLAGS+= -L${MILTERLIB}
+
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
USE_AUTOMAKE_VER= 15
AUTOCONF= autoconf
@@ -42,4 +82,4 @@
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list