mail-filter/anubis: Revbump to fix mysql dependency and build failure
authorBrian Evans <grknight@gentoo.org>
Tue, 12 Feb 2019 19:41:49 +0000 (14:41 -0500)
committerBrian Evans <grknight@gentoo.org>
Tue, 12 Feb 2019 19:46:27 +0000 (14:46 -0500)
Bug: https://bugs.gentoo.org/665906
Closes: https://bugs.gentoo.org/615450
Package-Manager: Portage-2.3.59, Repoman-2.3.12
Signed-off-by: Brian Evans <grknight@gentoo.org>
mail-filter/anubis/anubis-4.2-r1.ebuild [new file with mode: 0644]
mail-filter/anubis/files/anubis-4.2-gdbm.patch [new file with mode: 0644]

diff --git a/mail-filter/anubis/anubis-4.2-r1.ebuild b/mail-filter/anubis/anubis-4.2-r1.ebuild
new file mode 100644 (file)
index 0000000..ef65b94
--- /dev/null
@@ -0,0 +1,69 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit pam user
+
+DESCRIPTION="GNU Anubis is an outgoing mail processor"
+HOMEPAGE="https://www.gnu.org/software/anubis/"
+
+SRC_URI="mirror://gnu/anubis/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="crypt guile mysql postgres nls pam pcre sasl socks5 +gnutls tcpd test"
+
+RDEPEND="sys-libs/gdbm
+       crypt? ( >=app-crypt/gpgme-1.8.0 )
+       guile? ( >=dev-scheme/guile-1.8 )
+       mysql? ( dev-db/mysql-connector-c )
+       pam? ( virtual/pam )
+       postgres? ( dev-db/postgresql:*[server] )
+       nls? ( sys-devel/gettext )
+       pcre? ( >=dev-libs/libpcre-3.9 )
+       sasl? ( virtual/gsasl )
+       gnutls? ( net-libs/gnutls )
+       tcpd? ( >=sys-apps/tcp-wrappers-7.6 )"
+DEPEND="${RDEPEND}
+       test? ( dev-util/dejagnu )"
+
+REQUIRED_USE="mysql? ( sasl )
+       postgres? ( sasl )"
+
+PATCHES=( "${FILESDIR}/anubis-4.2-gdbm.patch" )
+
+pkg_setup() {
+       enewuser anubis
+}
+
+src_configure() {
+       econf --with-unprivileged-user=anubis \
+               --disable-rpath \
+               $(use_with mysql) \
+               $(use_with postgres) \
+               $(use_with pam) \
+               $(use_with pcre) \
+               $(use_enable nls) \
+               $(use_with guile) \
+               $(use_with sasl gsasl) \
+               $(use_with gnutls) \
+               $(use_with tcpd tcp-wrappers) \
+               $(use_with socks5 socks-proxy) \
+               $(use_with crypt gpgme)
+}
+
+src_test() {
+       emake -C testsuite check
+}
+
+src_install() {
+       default
+       docinto examples
+       dodoc examples/*anubis*
+       docinto guile
+       dodoc guile/*.scm
+
+       use pam  && pamd_mimic system-auth anubis auth account session
+}
diff --git a/mail-filter/anubis/files/anubis-4.2-gdbm.patch b/mail-filter/anubis/files/anubis-4.2-gdbm.patch
new file mode 100644 (file)
index 0000000..5c54560
--- /dev/null
@@ -0,0 +1,21 @@
+diff -aurN a/src/gdbm.c b/src/gdbm.c
+--- a/src/gdbm.c       2014-05-22 01:39:58.000000000 -0400
++++ b/src/gdbm.c       2019-02-12 13:29:39.270414662 -0500
+@@ -209,7 +209,7 @@
+ }
+ const char *
+-gdbm_db_strerror (void *d, int rc)
++anubis_gdbm_db_strerror (void *d, int rc)
+ {
+   return gdbm_strerror (rc);
+ }
+@@ -222,7 +222,7 @@
+                     gdbm_db_close,
+                     gdbm_db_get,
+                     gdbm_db_put,
+-                    gdbm_db_delete, gdbm_db_list, gdbm_db_strerror);
++                    gdbm_db_delete, gdbm_db_list, anubis_gdbm_db_strerror);
+ }
+ #endif /* HAVE_LIBGDBM */