summaryrefslogtreecommitdiff
blob: bb14ce18c5d8536018790c242db8fadfe07c2adc (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils versionator

KEYWORDS="~x86"

DESCRIPTION="A powerful C++ class library for working with MIME messages and Internet messaging services like IMAP, POP or SMTP."
HOMEPAGE="http://www.vmime.org/"
SRC_URI="mirror://sourceforge/vmime/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
IUSE="debug doc sasl ssl"

CDEPEND="sasl? ( net-libs/libgsasl )
		ssl? ( net-libs/gnutls )
		virtual/libiconv"
DEPEND="${CDEPEND}
		doc? ( app-doc/doxygen )"
RDEPEND="${CDEPEND}"

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}/${P}-gnutls_ssl-detection.patch"
}

src_compile() {
	econf \
		$(use_enable debug) \
		$(use_enable sasl) \
		$(use_enable ssl tls) \
		--enable-platform-posix \
		--enable-messaging \
		--enable-messaging-proto-pop3 \
		--enable-messaging-proto-smtp \
		--enable-messaging-proto-imap \
		--enable-messaging-proto-maildir \
		--enable-messaging-proto-sendmail \
		|| die "econf failed"
	emake || die "emake failed"
	if use doc ; then
		doxygen vmime.doxygen || die "doxygen failed"
	fi
}

src_install() {
	emake DESTDIR="${D}" install || die "emake install failed"
	if use doc ; then
		dohtml doc/html/*
	fi
	insinto /usr/share/${PN}
	doins -r examples

}