summaryrefslogtreecommitdiff
blob: 7b86c2e617157890ebeca925e5c35cfe71de465a (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/ldapsdk/ldapsdk-4.1.7-r1.ebuild,v 1.3 2005/04/26 01:27:43 gustavoz Exp $

inherit eutils java-pkg

DESCRIPTION="Netscape Directory SDK for Java"
HOMEPAGE="http://www.mozilla.org/directory/javasdk.html"
SRC_URI="http://www.mozilla.org/directory/${PN}_java_20020819.tar.gz"

LICENSE="MPL-1.1"
SLOT="4.1"
KEYWORDS="x86 amd64 sparc"
IUSE="doc"

S=${WORKDIR}/mozilla/directory/java-sdk

DEPEND=">=virtual/jdk-1.4
	>=dev-java/ant-core-1.6.2"
RDEPEND=">=virtual/jre-1.4
	=dev-java/jss-3.4*
	=dev-java/jakarta-oro-2.0*"

src_unpack() {
	unpack ${A}

	cd ${WORKDIR}/mozilla
	epatch ${FILESDIR}/ldapsdk-gentoo.patch

	cd ${S}
	echo "ororegexp.jar=`java-config -p jakarta-oro-2.0`" > build.properties
	echo "jss.jar=`java-config -p jss-3.4`" >> build.properties

	cd ${S}/ldapjdk/lib
	rm -f *.jar
	java-pkg_jar-from jss-3.4

	cd ${S}/ldapsp/lib
	rm *.jar
}

src_compile() {
	local antflags="dist-jdk dist-filter dist-beans dist-jndi"
	use doc && antflags="${antflags} build-docs"
	ant ${antflags} || die "compile failed"
}

src_install () {
	java-pkg_dojar dist/packages/*.jar

	use doc && java-pkg_dohtml -r dist/doc/*
}