summaryrefslogtreecommitdiff
blob: ef8563a2b52d63c723c62cd94df4590f7b627e71 (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-java/xalan/xalan-2.5.2.ebuild,v 1.3 2004/01/19 04:52:32 strider Exp $

inherit java-pkg eutils

IUSE="doc"

MY_P=${PN}-j_${PV//./_}
S=${WORKDIR}/${MY_P}
DESCRIPTION="XSLT processor"
HOMEPAGE="http://xml.apache.org/xalan-j/index.html"
SRC_URI="mirror://apache/xml/xalan-j/source/${MY_P}-src.tar.gz"
LICENSE="Apache-1.1"
SLOT="0"
KEYWORDS="x86 sparc ppc amd64"
DEPEND=">=virtual/jdk-1.3
	>=dev-java/ant-1.5.2
	>=dev-java/xerces-2.6.0"
RDEPEND=">=virtual/jdk-1.3
	>=dev-java/xerces-2.6.0"

src_compile() {
	CLASSPATH=$CLASSPATH:`pwd`/bin/xercesImpl.jar:`pwd`/bin/bsf.jar:`pwd`/src\
	ant jar ${myc} || die "build failed"

	if [ -n "`use doc`" ] ; then
		if [ `java-config --java-version 2>&1 | grep "1\.4\."  | wc -l` -lt 1 ]  ; then
			ant javadocs || die "Build Javadocs Failed"
		else
			USE=""
			einfo "                                                          "
			einfo " 1.4.x JDKs are unable to compile Javadocs at this time.  "
			einfo "                                                          "
		fi
	fi
}

src_install () {
	java-pkg_dojar build/*.jar
	dohtml readme.html

	if [ -n "`use doc`" ] ; then
		dodir /usr/share/doc/${P}
		dodoc TODO STATUS README LICENSE ISSUES
		dohtml -r build/docs/*
	fi
}

pkg_postinst() {
	if [ -n "`use doc`" ] ; then
		einfo "                                                          "
		einfo " API Documentation is in /usr/share/doc/${PN}-${PV}.      "
		einfo "                                                          "
		einfo " Design documentation can be found online at:             "
		einfo "     http://xml.apache.org/xalan-j/design/design2_0_0.html"
		einfo "                                                          "
		sleep 5
	else
		einfo "                                                          "
		einfo " Online Documentation:                                    "
		einfo "     http://xml.apache.org/xalan-j/design/design2_0_0.html"
		einfo "     http://xml.apache.org/xalan-j/apidocs/index.html     "
		einfo "                                                          "
		sleep 5
	fi
}