summaryrefslogtreecommitdiff
path: root/mail/bogofilter
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2014-04-30 13:26:18 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2014-04-30 13:26:18 +0000
commit0c42add5223ca9b65f7d7e514eec600d55963504 (patch)
treecd27543cc84f2025a3c7e56b37b576265af3ce41 /mail/bogofilter
parentcecd3824ae4e7cabf5a90acf025510f9646fe7d4 (diff)
downloadfreebsd-ports-0c42add5223ca9b65f7d7e514eec600d55963504.zip
Make it possible to fully disable DOCS by considering
everything in DOCSDIR to be part of PORTDOCS. Really, the "contrib" stuff belong in EXAMPLESDIR. While here, use OPTIONS helpers, add DOCS to the OPTIONS_DEFINE list, and bump PORTREVISION. Maintainer should consider moving the contrib pieces to EXAMPLESDIR, and moving the pkg-install to a pkg-message so that it can be viewed later.
Diffstat (limited to 'mail/bogofilter')
-rw-r--r--mail/bogofilter/Makefile28
-rw-r--r--mail/bogofilter/pkg-plist19
2 files changed, 7 insertions, 40 deletions
diff --git a/mail/bogofilter/Makefile b/mail/bogofilter/Makefile
index 10476811eb6e..0c571d1e92e5 100644
--- a/mail/bogofilter/Makefile
+++ b/mail/bogofilter/Makefile
@@ -3,7 +3,7 @@
PORTNAME= bogofilter
PORTVERSION= 1.2.4
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= mail
MASTER_SITES= SF/bogofilter/bogofilter-current/bogofilter-${PORTVERSION}
@@ -15,7 +15,7 @@ COMMENT= Fast, teachable, learning spam detector
USE_BDB= 41+
.endif
-OPTIONS_DEFINE= GSL UNICODE
+OPTIONS_DEFINE= GSL UNICODE DOCS
OPTIONS_DEFAULT= GSL UNICODE
GSL_DESC= Link with system-wide GSL dynamically (recommended)
UNICODE_DESC= Normalize tokens to Unicode (UTF-8) (recommended)
@@ -27,11 +27,12 @@ USE_PERL5= run
USE_BZIP2= yes
GNU_CONFIGURE= yes
-.include <bsd.port.options.mk>
+UNICODE_USES= iconv
+UNICODE_CONFIGURE_ENABLE= unicode
+GSL_LIB_DEPENDS= libgsl.so:${PORTSDIR}/math/gsl
+GSL_CONFIGURE_ARGS_OFF= --with-included-gsl
-.if ${PORT_OPTIONS:MUNICODE}
-USES+= iconv
-.endif
+PORTDOCS= *
.include <bsd.port.pre.mk>
@@ -43,14 +44,8 @@ BF_LIBS?= -l${BDB_LIB_NAME}
BF_CPPFLAGS?= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc
.if ${PORT_OPTIONS:MUNICODE}
-CONFIGURE_ARGS+= --enable-unicode
BF_LIBS+= ${ICONV_LIB}
.endif
-.if ${PORT_OPTIONS:MGSL}
-LIB_DEPENDS+= libgsl.so:${PORTSDIR}/math/gsl
-.else
-CONFIGURE_ARGS+= --with-included-gsl
-.endif
CPPFLAGS+= ${BF_CPPFLAGS}
CONFIGURE_ENV+= LIBS="${BF_LIBS}" \
PERL="${PERL}"
@@ -65,20 +60,12 @@ post-patch:
-e 's/ENVIRON_TESTS = t.abort/ENVIRON_TESTS =/' \
${WRKSRC}/src/tests/Makefile.am
-.if ${PORT_OPTIONS:MDOCS}
-PORTDOCS= *
-PLIST_SUB= CONTRIB="@comment "
-.else
-PLIST_SUB= CONTRIB=""
-.endif
-
# XXX: disable self-tests until issue with automake-1.13 is sorted out
# post-build::
# cd ${WRKSRC}/src && make check SHELL=${SH}
post-install::
@${MKDIR} ${STAGEDIR}${DOCSDIR}/contrib
-.if ${PORT_OPTIONS:MDOCS}
.for i in html programmer xml
@${MKDIR} ${STAGEDIR}${DOCSDIR}/${i}
.endfor
@@ -97,7 +84,6 @@ post-install::
${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}/html
${INSTALL_DATA} ${WRKSRC}/doc/*.xml ${STAGEDIR}${DOCSDIR}/xml
${INSTALL_DATA} ${WRKSRC}/doc/programmer/README.freebsd ${STAGEDIR}${DOCSDIR}/programmer
-.endif
${INSTALL_PROGRAM} ${WRKSRC}/bogogrep ${STAGEDIR}${PREFIX}/bin/
.for i in bfproxy.pl bogofilter-milter.pl bogo.R bogofilter-qfe.sh \
mime.get.rfc822.pl parmtest.sh printmaildir.pl \
diff --git a/mail/bogofilter/pkg-plist b/mail/bogofilter/pkg-plist
index a4dc10f85de1..85061fe7228b 100644
--- a/mail/bogofilter/pkg-plist
+++ b/mail/bogofilter/pkg-plist
@@ -16,22 +16,3 @@ man/man1/bogolexer.1.gz
man/man1/bogotune.1.gz
man/man1/bogoupgrade.1.gz
man/man1/bogoutil.1.gz
-%%CONTRIB%%%%DOCSDIR%%/contrib/bfproxy.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogo.R
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-milter.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogofilter-qfe.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/bogominitrain.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/dot-qmail-bogofilter-default
-%%CONTRIB%%%%DOCSDIR%%/contrib/mailfilter.example
-%%CONTRIB%%%%DOCSDIR%%/contrib/mime.get.rfc822.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/parmtest.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/printmaildir.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/procmailrc.example
-%%CONTRIB%%%%DOCSDIR%%/contrib/randomtrain.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/scramble.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/spamitarium.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/stripsearch.pl
-%%CONTRIB%%%%DOCSDIR%%/contrib/trainbogo.sh
-%%CONTRIB%%%%DOCSDIR%%/contrib/vm-bogofilter.el
-%%CONTRIB%%@dirrm %%DOCSDIR%%/contrib
-%%CONTRIB%%@dirrm %%DOCSDIR%%