summaryrefslogtreecommitdiff
blob: e60f09907a12dc5293cc029f4ebcce0df3d8b5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit autotools db-use eutils perl-app toolchain-funcs

MY_PV=${PV/_/}

DESCRIPTION="Utilities and Perl modules to administer a Cyrus IMAP server"
HOMEPAGE="http://www.cyrusimap.org/"
SRC_URI="ftp://ftp.cyrusimap.org/cyrus-imapd/cyrus-imapd-${MY_PV}.tar.gz"

LICENSE="BSD-with-attribution"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86"
IUSE="berkdb kerberos libressl ssl"

RDEPEND=">=dev-lang/perl-5.6.1
	>=dev-libs/cyrus-sasl-2.1.13
	dev-perl/Term-ReadLine-Perl
	dev-perl/TermReadKey
	berkdb? ( >=sys-libs/db-3.2:* )
	ssl? (
		!libressl? ( dev-libs/openssl:0= )
		libressl? ( dev-libs/libressl:0= )
	)
	kerberos? ( virtual/krb5 )"

DEPEND="$RDEPEND"

S="${WORKDIR}/cyrus-imapd-${MY_PV}"

src_prepare() {
	epatch "${FILESDIR}/${PN}-2.4.10-ldflags.patch"
	sed -i -e "s/ar cr/$(tc-getAR) cr/" \
		perl/sieve/lib/Makefile.in \
		imap/Makefile.in \
		lib/Makefile.in \
		installsieve/Makefile.in \
		com_err/et/Makefile.in \
		sieve/Makefile.in \
		syslog/Makefile.in
	AT_M4DIR="cmulocal" eautoreconf
}

src_configure() {
	local myconf
	if use berkdb ; then
		myconf="--with-bdb-incdir=$(db_includedir)"
	fi
	econf \
		--disable-server \
		--enable-murder \
		--enable-netscapehack \
		--with-cyrus-group=mail \
		--with-com_err=yes \
		--with-perl=/usr/bin/perl \
		--without-krb \
		--without-krbdes \
		$(use_with berkdb bdb) \
		$(use_enable kerberos gssapi) \
		$(use_with ssl openssl) \
		${myconf}
}

src_compile() {
	emake -C "${S}/lib" all
	emake -C "${S}/perl" all
}

src_install () {
	emake -C "${S}/perl" DESTDIR="${D}" INSTALLDIRS=vendor install
	perl_delete_localpod		# bug #98122
}