dev-qt/qtopengl: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / net-libs / libetpan / libetpan-1.9.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit autotools
6
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"
10
11 LICENSE="BSD"
12 SLOT="0"
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"
15
16 # BerkDB is only supported up to version 6.0
17 DEPEND="sys-libs/zlib
18         !lmdb? ( berkdb? ( <sys-libs/db-6.1:= ) )
19         lmdb? ( dev-db/lmdb )
20         ssl? (
21                 gnutls? ( net-libs/gnutls:= )
22                 !gnutls? (
23                         !libressl? ( dev-libs/openssl:0= )
24                         libressl? ( dev-libs/libressl:0= )
25                 )
26         )
27         sasl? ( dev-libs/cyrus-sasl:2 )
28         liblockfile? ( net-libs/liblockfile )"
29 RDEPEND="${DEPEND}"
30
31 PATCHES=(
32         "${FILESDIR}"/${PN}-1.0-nonnull.patch
33         "${FILESDIR}"/${PN}-1.9.3-missing-stddev_h.patch
34 )
35
36 pkg_pretend() {
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}."
40         fi
41
42         if use berkdb && use lmdb ; then
43                 ewarn "You have \"berkdb\" _and_ \"lmdb\" USE flags enabled."
44                 ewarn "Using lmdb as cache DB!"
45         fi
46 }
47
48 src_prepare() {
49         default
50         eautoreconf
51 }
52
53 src_configure() {
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}
57         local myeconfargs=(
58                 # --enable-debug simply injects "-O2 -g" into CFLAGS
59                 --disable-debug
60                 $(use_enable berkdb db)
61                 $(use_enable ipv6)
62                 $(use_enable liblockfile lockfile)
63                 $(use_enable lmdb)
64                 $(use_enable static-libs static)
65                 $(use_with sasl)
66                 $(usex ssl "$(use_with gnutls) $(use_with !gnutls openssl)" '--without-gnutls --without-openssl')
67         )
68         econf "${myeconfargs[@]}"
69 }
70
71 src_install() {
72         default
73         find "${ED}" -name "*.la" -delete || die
74         if ! use static-libs ; then
75                 find "${ED}" -name "*.a" -delete || die
76         fi
77 }