Add tokyocabinet support
authorTorsten Veller <tove@gentoo.org>
Mon, 12 Apr 2010 18:01:05 +0000 (18:01 +0000)
committerTorsten Veller <tove@gentoo.org>
Mon, 12 Apr 2010 18:01:05 +0000 (18:01 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

mail-filter/bogofilter/ChangeLog
mail-filter/bogofilter/Manifest
mail-filter/bogofilter/bogofilter-1.2.1-r1.ebuild [new file with mode: 0644]
mail-filter/bogofilter/metadata.xml

index a147940597846465dde7c56cdcb45ed11f749c21..7f64f7cc9ae0b49974bee840ca12900de1c7cffe 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for mail-filter/bogofilter
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/bogofilter/ChangeLog,v 1.128 2009/11/03 12:30:09 tove Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/bogofilter/ChangeLog,v 1.129 2010/04/12 18:01:05 tove Exp $
+
+*bogofilter-1.2.1-r1 (12 Apr 2010)
+
+  12 Apr 2010; Torsten Veller <tove@gentoo.org> +bogofilter-1.2.1-r1.ebuild,
+  metadata.xml:
+  Add tokyocabinet support
 
   03 Nov 2009; Torsten Veller <tove@gentoo.org> -bogofilter-1.2.0.ebuild:
   Cleanup
index 9f2c651636d1d4bc85b6b861c14af5d080f5b6f4..d6427574ca6b23c86f058309214563b307eeb3eb 100644 (file)
@@ -4,13 +4,14 @@ Hash: SHA1
 DIST bogofilter-0.92.8.tar.bz2 637420 RMD160 72b3d7426fca787fcb774b8d6c540a4668796e35 SHA1 ffaf181f71dfee7d4475d5c20fed4a8f50a3e7c4 SHA256 1f2f103b9e0038f789f842ecad11805bb8277f701b747ec3e851b02d3ebfc807
 DIST bogofilter-1.2.1.tar.bz2 857088 RMD160 e6a39250d78b8a418613f06d56b7dd33d81761a4 SHA1 3a1ebe57b057a5c7ed930995669f7a791fbcecab SHA256 7f90dd32b2887860896683ab8ba378c1f9c1a7a55ddee64057df5b773c4cb33c
 EBUILD bogofilter-0.92.8.ebuild 1439 RMD160 1f597cc8a53ef3b00f95dc82baf106a5c60d2f4a SHA1 1c0e882a4dd6c0c12afee7ad0521edcc8252f375 SHA256 de7872dd5ce704cd82aaf28834101d7aaa04d2188e9f5237d2438f36f791d42b
+EBUILD bogofilter-1.2.1-r1.ebuild 3661 RMD160 f3879b6eb010beb404613c142992189c7a301632 SHA1 fc43eb1ec0dcf0204ea0179678d23b6d795b405b SHA256 2531cbf8c1bee5c1e5bc1ba5a8d4dfea171dd5c5ee9bad09b43d381c5610532f
 EBUILD bogofilter-1.2.1.ebuild 2327 RMD160 cd1097aa9081180cc1f23b12de65abe23260f331 SHA1 8d76e3c0e4a84cc1b1af2992877b3d1864c24071 SHA256 c08f5659323de911de12e3781ce3db8ca6a02d242e88d78e22d0f16a6c47474e
-MISC ChangeLog 23855 RMD160 580cc2b88890d502dea0e0268314a4389d644e67 SHA1 f64640bb54079bee8605d1a4e2411194fea9a47f SHA256 8d3d797aec9d1714225a21b3a420b59f3eb80b7ee977c7566b23625127dfd66d
-MISC metadata.xml 424 RMD160 7780bbf745ba6b51f837cdc076b1b315ba8d33b9 SHA1 0b17aa0a89b5854ee1850da8e222b95015e1afd9 SHA256 ace8b08d5d5b207b9226c509b6d1f9610da16264d08033e28713df61063563d9
+MISC ChangeLog 24012 RMD160 04cc565f888b349ce775061204651a39f0def6b2 SHA1 e738e0fbece369dab9396fac1e29b22266663d0f SHA256 5d84635b69fc14f41632722f6ef2ffc54b696f5f0e06071b0919cba561c4b037
+MISC metadata.xml 506 RMD160 7a1aa2f88f7051aa5112885306e81892f5aabafa SHA1 7f2b67a5ca36edb6760f9291fbdf3001f65ddc55 SHA256 da4c28135e6fec4478a9acdafe1d4b023815d2cb116a681917ee4b69846e665e
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.11 (GNU/Linux)
+Version: GnuPG v2.0.15 (GNU/Linux)
 
-iEYEARECAAYFAkrwIlcACgkQV3J2n04EauwUmgCfRt0roTpnfin+yJJHJfVK5wYr
-NYoAnAu4Mc29fP2hh+qPN1EucmQ/Zz0I
-=muNk
+iEYEARECAAYFAkvDX+oACgkQV3J2n04EauyVrwCfeJdNKlhtRAS5lzoWE3NBbrCy
+lM4An2xRNw6tOmewao2ZEo4/r2sI+R09
+=B1Lh
 -----END PGP SIGNATURE-----
diff --git a/mail-filter/bogofilter/bogofilter-1.2.1-r1.ebuild b/mail-filter/bogofilter/bogofilter-1.2.1-r1.ebuild
new file mode 100644 (file)
index 0000000..d308f06
--- /dev/null
@@ -0,0 +1,109 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/bogofilter/bogofilter-1.2.1-r1.ebuild,v 1.1 2010/04/12 18:01:05 tove Exp $
+
+inherit db-use flag-o-matic
+
+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 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="berkdb sqlite tokyocabinet"
+
+DEPEND="virtual/libiconv
+       berkdb?  ( >=sys-libs/db-3.2 )
+       !berkdb? (
+               sqlite?  ( >=dev-db/sqlite-3.5.4 )
+               !sqlite? (
+                       tokyocabinet? ( dev-db/tokyocabinet )
+                       !tokyocabinet? ( >=sys-libs/db-3.2 )
+               )
+       )
+       sci-libs/gsl"
+#      app-arch/pax" # only needed for bf_tar
+
+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_compile() {
+       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-flags "-I$(db_includedir)"
+       fi
+
+       econf ${myconf} || die "configure failed"
+       emake || die "emake failed"
+}
+
+src_install() {
+       emake DESTDIR="${D}" install || die "make install failed"
+
+       exeinto /usr/share/${PN}/contrib
+       doexe contrib/{bogofilter-qfe,parmtest,randomtrain}.sh \
+               contrib/{bfproxy,bogominitrain,mime.get.rfc822,printmaildir}.pl \
+               contrib/{spamitarium,stripsearch}.pl || die "doexec failed"
+
+       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 || die "doins failed"
+
+       dodoc AUTHORS NEWS README RELEASE.NOTES* TODO GETTING.STARTED \
+               doc/integrating-with-* doc/README.{db,sqlite} || die "dodoc failed"
+
+       dohtml doc/*.html
+
+       dodir /usr/share/doc/${PF}/samples
+       mv "${D}"/etc/bogofilter.cf.example "${D}"/usr/share/doc/${PF}/samples/
+       rmdir "${D}"/etc
+}
+
+pkg_postinst() {
+       echo
+       elog "If you need \"${ROOT}usr/bin/bf_tar\" please install app-arch/pax."
+       echo
+}
index 00acb1c62c7b933eba6ccf1363cecaaa00e05cc4..32d2b6ec580bec11b14f1bd43994349ede4ea92b 100644 (file)
@@ -7,4 +7,5 @@
        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>
 </pkgmetadata>