1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 DESCRIPTION="A portable, efficient middleware for different kinds of mail access"
8 HOMEPAGE="http://libetpan.sourceforge.net/"
9 SRC_URI="https://github.com/dinhviethoa/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
13 KEYWORDS="~alpha amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
14 IUSE="berkdb gnutls ipv6 liblockfile libressl lmdb sasl ssl static-libs"
16 # BerkDB is only supported up to version 6.0
18 !lmdb? ( berkdb? ( <sys-libs/db-6.1:= ) )
21 gnutls? ( net-libs/gnutls:= )
23 !libressl? ( dev-libs/openssl:0= )
24 libressl? ( dev-libs/libressl:0= )
27 sasl? ( dev-libs/cyrus-sasl:2 )
28 liblockfile? ( net-libs/liblockfile )"
32 "${FILESDIR}"/${PN}-1.0-nonnull.patch
33 "${FILESDIR}"/${PN}-1.9.3-missing-stddev_h.patch
37 if use gnutls && ! use ssl ; then
38 ewarn "You have \"gnutls\" USE flag enabled but \"ssl\" USE flag disabled!"
39 ewarn "No ssl support will be available in ${PN}."
42 if use berkdb && use lmdb ; then
43 ewarn "You have \"berkdb\" _and_ \"lmdb\" USE flags enabled."
44 ewarn "Using lmdb as cache DB!"
54 # in Prefix emake uses SHELL=${BASH}, export CONFIG_SHELL to the same so
55 # libtool recognises it as valid shell (bug #300211)
56 use prefix && export CONFIG_SHELL=${BASH}
58 # --enable-debug simply injects "-O2 -g" into CFLAGS
60 $(use_enable berkdb db)
62 $(use_enable liblockfile lockfile)
64 $(use_enable static-libs static)
66 $(usex ssl "$(use_with gnutls) $(use_with !gnutls openssl)" '--without-gnutls --without-openssl')
68 econf "${myeconfargs[@]}"
73 find "${ED}" -name "*.la" -delete || die
74 if ! use static-libs ; then
75 find "${ED}" -name "*.a" -delete || die