summaryrefslogtreecommitdiff
blob: bf428f94caafc664acfd60097a8348841f0e7d5b (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/xerces/xerces-2.6.2-r1.ebuild,v 1.15 2005/01/26 21:20:44 corsair Exp $

inherit java-pkg eutils

IUSE="doc"

S=${WORKDIR}/xerces-${PV//./_}
DESCRIPTION="The next generation of high performance, fully compliant XML parsers in the Apache Xerces family"
HOMEPAGE="http://xml.apache.org/xerces2-j/index.html"
SRC_URI="mirror://apache/xml/xerces-j/Xerces-J-src.${PV}.tar.gz
	mirror://apache/xml/xerces-j/Xerces-J-tools.${PV}.tar.gz"

LICENSE="Apache-1.1"
SLOT="2"
KEYWORDS="x86 ppc sparc amd64 ppc64"

DEPEND=">=dev-java/ant-core-1.5.2"
RDEPEND=">=virtual/jdk-1.3"

src_unpack() {
	unpack ${A}
	mv tools ${S}
}

src_compile() {
	addpredict /dev/random
	if use doc ; then
		sh build.sh jars sampjar javadocs || die "Compile failed."
	else
		sh build.sh jars sampjar || die "Compile failed."
	fi
}

src_install() {
	java-pkg_dojar build/x*.jar
	dodoc TODO STATUS README ISSUES
	dohtml Readme.html

	if use doc ; then
		dodir /usr/share/doc/${PF}
		cp -a samples ${D}/usr/share/doc/${PF}
		java-pkg_dohtml -r build/docs/javadocs
	fi
}

pkg_postinst() {
	if use doc ; then
		einfo "                                                          "
		einfo " API Documentation is in /usr/share/doc/${PN}-${PV}.      "
		einfo "                                                          "
		einfo " Online Documentation:                                    "
		einfo "     http://xml.apache.org/xerces2-j/api.html             "
		einfo "                                                          "
		epause 5
	else
		einfo "                                                          "
		einfo " Online Documentation:                                    "
		einfo "     http://xml.apache.org/xerces2-j/api.html             "
		einfo "                                                          "
		epause 5
	fi
}