diff options
| author | Rene Ladan <rene@FreeBSD.org> | 2025-06-30 12:56:53 +0000 |
|---|---|---|
| committer | Rene Ladan <rene@FreeBSD.org> | 2025-06-30 12:56:53 +0000 |
| commit | 8ec78804c9e18e2f4e4798abbe5357e000a6db04 (patch) | |
| tree | e0a553dd4eef97859da455e943ba917b170b1b79 | |
| parent | ea97d2f611098e9663fcaf5430f02027ee130871 (diff) | |
Revert: "mail/bogofilter-bdb: Remove expired port"
This is a master port for several related ports.
This reverts commit df1a720dcb82a63e23e01373762e01f0686d2891.
| -rw-r--r-- | MOVED | 1 | ||||
| -rw-r--r-- | mail/Makefile | 1 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/Makefile | 102 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/distinfo | 3 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/files/patch-contrib__trainbogo.sh | 11 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/pkg-descr | 12 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/pkg-install | 15 | ||||
| -rw-r--r-- | mail/bogofilter-bdb/pkg-plist | 18 |
8 files changed, 162 insertions, 1 deletions
@@ -4614,5 +4614,4 @@ devel/kyra||2025-06-30|Has expired: Abandonware, last release in 2006 and depden devel/libmimedir||2025-06-30|Has expired: Last release in 2008, no consumers in tree and unmaintained for years devel/py-openapi-codec|devel/py-openapi-core|2025-06-30|Has expired: Upstream archived the repository. Please use devel/py-openapi-core instead devel/linenoise-ng||2025-06-30|Has expired: Upstream repo archived Oct 28, 2020 -mail/bogofilter-bdb||2025-06-30|Has expired: The Berkeley DB database interface is obsolescent devel/libflatarray||2025-06-30|Has expired: Last activity from upstream 5 years ago and last release in 2016 diff --git a/mail/Makefile b/mail/Makefile index ca02b3d15a74..6f131336d2d5 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -29,6 +29,7 @@ SUBDIR += bincimap SUBDIR += bmf SUBDIR += bogofilter + SUBDIR += bogofilter-bdb SUBDIR += bogofilter-kc SUBDIR += bogofilter-sqlite SUBDIR += bsd-vacation diff --git a/mail/bogofilter-bdb/Makefile b/mail/bogofilter-bdb/Makefile new file mode 100644 index 000000000000..154b5bb2dc6e --- /dev/null +++ b/mail/bogofilter-bdb/Makefile @@ -0,0 +1,102 @@ +PORTNAME= bogofilter +DISTVERSION= 1.3.0.rc1 +PORTREVISION?= 0 +CATEGORIES?= mail +MASTER_SITES= SF/bogofilter/bogofilter-current/bogofilter-1.3.0.beta/ \ + https://gitlab.com/-/project/12408342/uploads/647db3bd2f28a1f91bdd3bb1945d91fe/ +PKGNAMESUFFIX?= -bdb + +MAINTAINER?= mandree@FreeBSD.org +COMMENT= Fast, teachable, learning spam detector +WWW= https://bogofilter.sourceforge.io/ + +LICENSE= GPLv2 + +.if !defined(MASTERDIR) || ${MASTERDIR} == ${.CURDIR} +# building master port +USES+= bdb:5+ +DEPRECATED= The Berkeley DB database interface is obsolescent. +EXPIRATION_DATE=2025-06-30 +.endif + +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) + +CONFLICTS_INSTALL?= bogofilter-sqlite bogofilter bogofilter-kc + +USES+= cpe perl5 shebangfix tar:xz +SHEBANG_FILES= contrib/randomtrain.sh contrib/scramble.sh \ + src/tests/unsort.pl contrib/*.pl +USE_PERL5= run +GNU_CONFIGURE= yes + +CPE_VENDOR= bogofilter_project + +UNICODE_USES= iconv +UNICODE_CONFIGURE_ENABLE= unicode +GSL_LIB_DEPENDS= libgsl.so:math/gsl +GSL_CONFIGURE_OFF= --with-included-gsl + +PORTDOCS= * + +TEST_TARGET= check + +.include <bsd.port.pre.mk> + +BF_LIBS?= -l${BDB_LIB_NAME} +BF_CPPFLAGS?= -I${BDB_INCLUDE_DIR} -I${LOCALBASE}/include +CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc +.if !defined(MASTERDIR) || ${MASTERDIR} == ${.CURDIR} +CONFIGURE_ARGS+= --with-database=db +.endif +.if ${PORT_OPTIONS:MUNICODE} +BF_LIBS+= ${ICONV_LIB} +.endif +CPPFLAGS+= ${BF_CPPFLAGS} +LIBS+= -L${LOCALBASE}/lib ${BF_LIBS} +CONFIGURE_ENV+= PERL="${PERL}" +INSTALL_TARGET= install-strip prefix=${PREFIX} mandir=${PREFIX}/share/man + +post-patch: + ${REINPLACE_CMD} -e 's/INTEGRITY_TESTS = t.lock1 t.lock3 t.valgrind/INTEGRITY_TESTS = t.lock1/' \ + -e 's/ENVIRON_TESTS = t.abort/ENVIRON_TESTS =/' \ + ${WRKSRC}/src/tests/Makefile.in + +post-build: + cd ${WRKSRC}/src && ${SETENVI} SHELL=${SH} ${MAKE_CMD} ${TEST_TARGET} ${_MAKE_JOBS} SHELL=${SH} \ + || { r=$$? ; head -n30000 ${WRKSRC}/src/tests/test-suite.log ; exit $$r ; } + +post-install: + @${MKDIR} ${STAGEDIR}${DOCSDIR}/contrib +.for i in html programmer xml + @${MKDIR} ${STAGEDIR}${DOCSDIR}/${i} +.endfor +.for i in AUTHORS COPYING INSTALL NEWS README README.git \ + doc/README.validation TODO GETTING.STARTED \ + RELEASE.NOTES doc/README.db doc/README.sqlite \ + doc/integrating-with-postfix doc/integrating-with-qmail \ + doc/bogofilter-tuning.HOWTO.html doc/bogofilter-SA-* \ + doc/bogofilter-faq.html doc/bogofilter-faq-fr.html + ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR} +.endfor +.for i in README.randomtrain README.contrib + ${INSTALL_DATA} ${WRKSRC}/contrib/${i} ${STAGEDIR}${DOCSDIR}/contrib/${i} +.endfor + ${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 + ${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 \ + bogominitrain.pl \ + randomtrain.sh scramble.sh spamitarium.pl stripsearch.pl trainbogo.sh + ${INSTALL_SCRIPT} ${WRKSRC}/contrib/${i} ${STAGEDIR}${DOCSDIR}/contrib/${i} +.endfor +.for i in dot-qmail-bogofilter-default \ + mailfilter.example vm-bogofilter.el + ${INSTALL_DATA} ${WRKSRC}/contrib/${i} ${STAGEDIR}${DOCSDIR}/contrib/${i} +.endfor + +.include <bsd.port.post.mk> diff --git a/mail/bogofilter-bdb/distinfo b/mail/bogofilter-bdb/distinfo new file mode 100644 index 000000000000..eacda71cdf59 --- /dev/null +++ b/mail/bogofilter-bdb/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1744986765 +SHA256 (bogofilter-1.3.0.rc1.tar.xz) = 0bc4b8300a106e7c5a4110c052272cfe64bb096ec5e7f552a44c3f41b574b29b +SIZE (bogofilter-1.3.0.rc1.tar.xz) = 764724 diff --git a/mail/bogofilter-bdb/files/patch-contrib__trainbogo.sh b/mail/bogofilter-bdb/files/patch-contrib__trainbogo.sh new file mode 100644 index 000000000000..0d7cd5742567 --- /dev/null +++ b/mail/bogofilter-bdb/files/patch-contrib__trainbogo.sh @@ -0,0 +1,11 @@ +--- ./contrib/trainbogo.sh.orig 2007-07-24 00:44:06.000000000 +0200 ++++ ./contrib/trainbogo.sh 2011-08-31 12:15:20.000000000 +0200 +@@ -181,7 +181,7 @@ + for i in "${hamdir}"/* "${spamdir}"/* + do + [ ! -f "${i}" ] && continue +- md5=$(printf "%s" "${rndseed}${i}" | md5sum | sed "s/ -//") ++ md5=$(printf "%s" "${rndseed}${i}" | md5) + echo "${md5} ${i}" >> "${list}" + done + diff --git a/mail/bogofilter-bdb/pkg-descr b/mail/bogofilter-bdb/pkg-descr new file mode 100644 index 000000000000..57fdfdc865d7 --- /dev/null +++ b/mail/bogofilter-bdb/pkg-descr @@ -0,0 +1,12 @@ +Bogofilter is a trainable email spam detector. + +Bogofilter takes an email message or other text on standard input, parses it +into words, does a statistical check against databases of "good" and "bad" +words, and returns a status code indicating whether or not the message is spam. +Bogofilter decodes base64 or quoted-printable encoded texts and ignores non-text +attachments and HTML comments. + +The supported database backends are LMDB, Kyoto Cabinet and SQLite3, and +for a while still Berkeley DB. The upstream version would theoretically +also support QDBM and Tokyo Cabinet, but these are not currently available +as FreeBSD ports. diff --git a/mail/bogofilter-bdb/pkg-install b/mail/bogofilter-bdb/pkg-install new file mode 100644 index 000000000000..8da3d8915d7e --- /dev/null +++ b/mail/bogofilter-bdb/pkg-install @@ -0,0 +1,15 @@ +if [ "$2" = "POST-INSTALL" ] && [ -e ${PKG_PREFIX}/etc/bogofilter.cf ] ; then +cat - <<_EOF + +-------------------------------------------------------------------------- +The recent bogofilter versions have undergone substantial changes that can +affect compatibility and may require that you change your configuration. + +See the RELEASE.NOTES file that shipped with bogofilter for details, +particularly the sections with headings [Incompat ...] and [Major ...]! + +It is also advisable to check the README.* file for your database driver. +-------------------------------------------------------------------------- + +_EOF +fi diff --git a/mail/bogofilter-bdb/pkg-plist b/mail/bogofilter-bdb/pkg-plist new file mode 100644 index 000000000000..19bc4ad38576 --- /dev/null +++ b/mail/bogofilter-bdb/pkg-plist @@ -0,0 +1,18 @@ +bin/bf_compact +bin/bf_copy +bin/bf_tar +bin/bogofilter +bin/bogogrep +bin/bogolexer +bin/bogotune +bin/bogoutil +bin/bogoupgrade +etc/bogofilter.cf.example +share/man/man1/bf_compact.1.gz +share/man/man1/bf_copy.1.gz +share/man/man1/bf_tar.1.gz +share/man/man1/bogofilter.1.gz +share/man/man1/bogolexer.1.gz +share/man/man1/bogotune.1.gz +share/man/man1/bogoupgrade.1.gz +share/man/man1/bogoutil.1.gz |
