diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /mail-filter/bogofilter | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'mail-filter/bogofilter')
-rw-r--r-- | mail-filter/bogofilter/Manifest | 1 | ||||
-rw-r--r-- | mail-filter/bogofilter/bogofilter-1.2.4-r1.ebuild | 125 | ||||
-rw-r--r-- | mail-filter/bogofilter/files/bogofilter-1.2.2-gcc34.patch | 24 | ||||
-rw-r--r-- | mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch | 11 | ||||
-rw-r--r-- | mail-filter/bogofilter/metadata.xml | 19 |
5 files changed, 180 insertions, 0 deletions
diff --git a/mail-filter/bogofilter/Manifest b/mail-filter/bogofilter/Manifest new file mode 100644 index 000000000000..8cc0b8978eaa --- /dev/null +++ b/mail-filter/bogofilter/Manifest @@ -0,0 +1 @@ +DIST bogofilter-1.2.4.tar.bz2 887848 SHA256 e10287a58d135feaea26880ce7d4b9fa2841fb114a2154bf7da8da98aab0a6b4 SHA512 e8c0b6bcc14f12fbbb2752e697a6d9065e17abfca3f70045ce9fe668d01c1cfad4adaa35c81546ecdd3639b0c28f3f4776bb5ed4699f21e9e2a5b19ca33479db WHIRLPOOL a35a2ce87333d07fe64972d173a4ae6a3105e31577b5915fdd376f41a14fb226e94a173d393c14aac7ca147726aa4267b1c6060ce7df5deea11ca82c3d350a13 diff --git a/mail-filter/bogofilter/bogofilter-1.2.4-r1.ebuild b/mail-filter/bogofilter/bogofilter-1.2.4-r1.ebuild new file mode 100644 index 000000000000..348722a62761 --- /dev/null +++ b/mail-filter/bogofilter/bogofilter-1.2.4-r1.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools db-use eutils flag-o-matic toolchain-funcs + +DESCRIPTION="Bayesian spam filter designed with fast algorithms, and tuned for speed" +HOMEPAGE="http://bogofilter.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd" +IUSE="berkdb sqlite tokyocabinet" + +DEPEND="virtual/libiconv + berkdb? ( >=sys-libs/db-3.2 ) + !berkdb? ( + sqlite? ( >=dev-db/sqlite-3.6.22 ) + !sqlite? ( + tokyocabinet? ( dev-db/tokyocabinet ) + !tokyocabinet? ( >=sys-libs/db-3.2 ) + ) + ) + sci-libs/gsl + app-arch/pax" +# pax needed for bf_tar +RDEPEND="${DEPEND}" + +pkg_setup() { + has_version mail-filter/bogofilter || return 0 + if ( use berkdb && ! has_version 'mail-filter/bogofilter[berkdb]' ) || \ + ( ! use berkdb && has_version 'mail-filter/bogofilter[berkdb]' ) || \ + ( use sqlite && ! has_version 'mail-filter/bogofilter[sqlite]' ) || \ + ( ! use sqlite && has_version 'mail-filter/bogofilter[sqlite]' ) || \ + ( has_version '>=mail-filter/bogofilter-1.2.1-r1' && \ + ( use tokyocabinet && ! has_version 'mail-filter/bogofilter[tokyocabinet]' ) || \ + ( ! use tokyocabinet && has_version 'mail-filter/bogofilter[tokyocabinet]' ) + ) ; then + ewarn + ewarn "If you want to switch the database backend, you must dump the wordlist" + ewarn "with the current version (old use flags) and load it with the new version!" + ewarn + fi +} + +src_prepare() { + # bug 445918 + sed -i -e 's/ -ggdb//' configure.ac || die + + # bug 421747 + epatch "${FILESDIR}"/${P}-test-env.patch + chmod +x src/tests/t.{ctype,leakfind,lexer.qpcr,lexer.eoh,message_id,queue_id} + + eautoreconf +} + +src_configure() { + local myconf="" berkdb=true + myconf="--without-included-gsl" + + # determine backend: berkdb *is* default + if use berkdb && use sqlite ; then + elog "Both useflags berkdb and sqlite are in USE:" + elog "Using berkdb as database backend." + elif use berkdb && use tokyocabinet ; then + elog "Both useflags berkdb and tokyocabinet are in USE:" + elog "Using berkdb as database backend." + elif use sqlite && use tokyocabinet ; then + elog "Both useflags sqlite and tokyocabinet are in USE:" + elog "Using sqlite as database backend." + myconf="${myconf} --with-database=sqlite" + berkdb=false + elif use sqlite ; then + myconf="${myconf} --with-database=sqlite" + berkdb=false + elif use tokyocabinet ; then + myconf="${myconf} --with-database=tokyocabinet" + berkdb=false + elif ! use berkdb ; then + elog "Neither berkdb nor sqlite nor tokyocabinet are in USE:" + elog "Using berkdb as database backend." + fi + + # Include the right berkdb headers for FreeBSD + if ${berkdb} ; then + append-cppflags "-I$(db_includedir)" + fi + + # bug #324405 + if [[ $(gcc-version) == "3.4" ]] ; then + epatch "${FILESDIR}"/${PN}-1.2.2-gcc34.patch + fi + + econf ${myconf} +} + +src_test() { + emake -C src/ check +} + +src_install() { + emake DESTDIR="${D}" install + + exeinto /usr/share/${PN}/contrib + doexe contrib/{bogofilter-qfe,parmtest,randomtrain}.sh \ + contrib/{bfproxy,bogominitrain,mime.get.rfc822,printmaildir}.pl \ + contrib/{spamitarium,stripsearch}.pl + + insinto /usr/share/${PN}/contrib + doins contrib/{README.*,dot-qmail-bogofilter-default} \ + contrib/{bogogrep.c,bogo.R,bogofilter-milter.pl,*.example} \ + contrib/vm-bogofilter.el \ + contrib/{trainbogo,scramble}.sh + + dodoc AUTHORS NEWS README RELEASE.NOTES* TODO GETTING.STARTED \ + doc/integrating-with-* doc/README.{db,sqlite} + + dohtml doc/*.html + + dodir /usr/share/doc/${PF}/samples + mv "${D}"/etc/bogofilter.cf.example "${D}"/usr/share/doc/${PF}/samples/ || die + rmdir "${D}"/etc || die +} diff --git a/mail-filter/bogofilter/files/bogofilter-1.2.2-gcc34.patch b/mail-filter/bogofilter/files/bogofilter-1.2.2-gcc34.patch new file mode 100644 index 000000000000..80e4d787cf87 --- /dev/null +++ b/mail-filter/bogofilter/files/bogofilter-1.2.2-gcc34.patch @@ -0,0 +1,24 @@ +diff -ruN bogofilter-1.2.1-orig/src/Makefile.am bogofilter-1.2.1/src/Makefile.am +--- bogofilter-1.2.1-orig/src/Makefile.am 2009-05-28 22:59:05.000000000 +0200 ++++ bogofilter-1.2.1/src/Makefile.am 2010-06-16 22:52:36.000000000 +0200 +@@ -16,7 +16,7 @@ + AM_CPPFLAGS = -iquote$(top_srcdir)/gnugetopt -iquote$(top_srcdir)/trio \ + -I$(srcdir) @GSL_CFLAGS@ -I$(top_srcdir)/gsl/specfunc -I$(top_srcdir) + else +-AM_CPPFLAGS = -I$(top_srcdir)/gnugetopt -I$(top_srcdir)/trio -I- -I. \ ++AM_CPPFLAGS = -I$(top_srcdir)/gnugetopt -I$(top_srcdir)/trio -I. \ + -I$(srcdir) @GSL_CFLAGS@ -I$(top_srcdir)/gsl/specfunc -I$(top_srcdir) + endif + +diff -ruN bogofilter-1.2.1-orig/src/Makefile.in bogofilter-1.2.1/src/Makefile.in +--- bogofilter-1.2.1-orig/src/Makefile.in 2009-08-01 21:00:51.000000000 +0200 ++++ bogofilter-1.2.1/src/Makefile.in 2010-06-16 22:52:23.000000000 +0200 +@@ -483,7 +483,7 @@ + @ENABLE_MEMDEBUG_TRUE@MEMDEBUG_SRC = memdebug.c memdebug.h + noinst_LIBRARIES = libbogofilter.a $(am__append_3) $(am__append_5) \ + $(am__append_10) +-@USE_GCC4_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/gnugetopt -I$(top_srcdir)/trio -I- -I. \ ++@USE_GCC4_FALSE@AM_CPPFLAGS = -I$(top_srcdir)/gnugetopt -I$(top_srcdir)/trio -I. \ + @USE_GCC4_FALSE@ -I$(srcdir) @GSL_CFLAGS@ -I$(top_srcdir)/gsl/specfunc -I$(top_srcdir) + + @USE_GCC4_TRUE@AM_CPPFLAGS = -iquote$(top_srcdir)/gnugetopt -iquote$(top_srcdir)/trio \ diff --git a/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch b/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch new file mode 100644 index 000000000000..8cf109c45519 --- /dev/null +++ b/mail-filter/bogofilter/files/bogofilter-1.2.4-test-env.patch @@ -0,0 +1,11 @@ +--- a/src/tests/Makefile.am ++++ b/src/tests/Makefile.am +@@ -67,7 +67,7 @@ + + TESTS=$(BUILT_TESTS) $(TESTSCRIPTS) + +-TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(SHELL) $(VERBOSE) ++TESTS_ENVIRONMENT=RUN_FROM_MAKE=1 AWK=$(AWK) srcdir=$(srcdir) SHELL="$(SHELL)" $(VERBOSE) + + EXTRA_DIST=$(TESTSCRIPTS) t.frame t.save t.skel \ + printcore t._abort unsort.pl \ diff --git a/mail-filter/bogofilter/metadata.xml b/mail-filter/bogofilter/metadata.xml new file mode 100644 index 000000000000..5204b3d1809c --- /dev/null +++ b/mail-filter/bogofilter/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>johu@gentoo.org</email> + <name>Johannes Huber</name> + </maintainer> + <longdescription> + Bogofilter is a mail filter that classifies mail as spam or ham (non-spam) + by a statistical analysis of the message's header and content (body). The + program is able to learn from the user's classifications and corrections. + </longdescription> + <use> + <flag name="tokyocabinet">Enable Tokyo Cabinet database support</flag> + </use> + <upstream> + <remote-id type="sourceforge">bogofilter</remote-id> + </upstream> +</pkgmetadata> |