dev-cpp/pangomm: stable 2.42.1 for hppa, bug #717144
[gentoo.git] / net-libs / libetpan / libetpan-1.9.4.ebuild
1 # Copyright 1999-2019 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:= ) )
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.4-berkdb_lookup.patch #519846
34         "${FILESDIR}"/${PN}-1.9.4-pkgconfig_file_no_ldflags.patch
35 )
36
37 pkg_pretend() {
38         if use gnutls && ! use ssl ; then
39                 ewarn "You have \"gnutls\" USE flag enabled but \"ssl\" USE flag disabled!"
40                 ewarn "No ssl support will be available in ${PN}."
41         fi
42
43         if use berkdb && use lmdb ; then
44                 ewarn "You have \"berkdb\" _and_ \"lmdb\" USE flags enabled."
45                 ewarn "Using lmdb as cache DB!"
46         fi
47 }
48
49 src_prepare() {
50         default
51         eautoreconf
52 }
53
54 src_configure() {
55         # in Prefix emake uses SHELL=${BASH}, export CONFIG_SHELL to the same so
56         # libtool recognises it as valid shell (bug #300211)
57         use prefix && export CONFIG_SHELL=${BASH}
58         local myeconfargs=(
59                 # --enable-debug simply injects "-O2 -g" into CFLAGS
60                 --disable-debug
61                 $(use_enable ipv6)
62                 $(use_enable liblockfile lockfile)
63                 $(use_enable static-libs static)
64                 $(use_with sasl)
65                 $(usex lmdb '--enable-lmdb --disable-db' "$(use_enable berkdb db) --disable-lmdb")
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 }