aboutsummaryrefslogtreecommitdiff
path: root/mail/spamass-milter
diff options
context:
space:
mode:
authorMark Linimon <linimon@FreeBSD.org>2004-03-14 01:04:21 +0000
committerMark Linimon <linimon@FreeBSD.org>2004-03-14 01:04:21 +0000
commit417e26319ab62281334caf9d24274e11a958d2ce (patch)
tree6013668de1d03a2211ae68794451ca5d0648dca9 /mail/spamass-milter
parent319158f003e359585e719509408f023f892909f8 (diff)
downloadports-417e26319ab62281334caf9d24274e11a958d2ce.tar.gz
ports-417e26319ab62281334caf9d24274e11a958d2ce.zip
Notes
Diffstat (limited to 'mail/spamass-milter')
-rw-r--r--mail/spamass-milter/Makefile46
1 files changed, 43 insertions, 3 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile
index f3f2376ed5f4..af39671f6b40 100644
--- a/mail/spamass-milter/Makefile
+++ b/mail/spamass-milter/Makefile
@@ -18,10 +18,50 @@ COMMENT= Sendmail Milter (mail filter) for SpamAssassin
BUILD_DEPENDS= spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
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_AUTOCONF_VER= 253
USE_AUTOMAKE_VER= 15
@@ -42,4 +82,4 @@ post-install:
.endif
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>