summaryrefslogtreecommitdiff
blob: c9e6fe4e0190f2aed2918b9edcfefb3a7a2b0fe1 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/gnu-javamail/gnu-javamail-1.0.ebuild,v 1.3 2005/11/09 08:37:40 axxo Exp $

inherit java-pkg

MY_PN="mail"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="GNU implementation of the Javamail API"
HOMEPAGE="http://www.gnu.org/software/classpathx/javamail/"
SRC_URI="mirror://gnu/classpathx/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="1"
KEYWORDS="~x86"
IUSE="doc jikes"
RDEPEND=">=virtual/jre-1.3
	=dev-java/gnu-jaf-1*
	=dev-java/gnu-classpath-inetlib-1.0*"
DEPEND=">=virtual/jdk-1.3
	${RDEPEND}
	jikes? ( >=dev-java/jikes-1.19 )"

S=${WORKDIR}/${MY_P}

src_compile() {
	local activation=$(dirname $(java-pkg_getjar gnu-jaf-1 activation.jar))
	local inetlib=$(dirname $(java-pkg_getjar gnu-classpath-inetlib-1.0 inetlib.jar))

	# TODO: Add jikes back	
	# TODO: Useflag this
	econf \
		--with-activation-jar=${activation} \
		--with-inetlib-jar=${inetlib} \
		--enable-smtp \
		--enable-imap \
		--enable-pop3 \
		--enable-nntp \
		--enable-mbox \
		--enable-maildir \
		|| die

	echo "Configure finished. Compiling... Please wait."

	emake || die

	if use doc; then
		emake javadoc || die
	fi
}

src_install() {
	java-pkg_dojar gnumail.jar gnumail-providers.jar || die
	dodoc AUTHORS ChangeLog NEWS README README.*
	use doc && java-pkg_dohtml -r docs/*
}