# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit java-pkg eutils IUSE="doc jikes" 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" DEPEND=">=virtual/jdk-1.3 jikes? ( >=dev-java/jikes-1.21 )" RDEPEND=">=virtual/jre-1.3 >=dev-java/xalan-2.5.2 >=dev-java/xml-commons-1.0-r2 >=dev-java/xml-commons-resolver-1.1 >=dev-java/xjavac-20041208 >=dev-java/ant-core-1.5.2" src_unpack() { unpack ${A} mv tools ${S} cd ${S} epatch ${FILESDIR}/xerces-2.6.2-gentoo.patch cd ${S}/tools rm -f *.jar java-pkg_jar-from ant-core ant.jar java-pkg_jar-from ant-core ant-launcher.jar java-pkg_jar-from junit java-pkg_jar-from xalan java-pkg_jar-from xml-commons xml-apis.jar java-pkg_jar-from xml-commons-resolver xml-commons-resolver.jar resolver.jar cd ${S}/tools/bin rm -f *.jar java-pkg_jar-from xjavac-1 } src_compile() { addpredict /dev/random local antflags="jars sampjar" if use doc ; then antflags="${antflags} javadocs" fi if use jikes; then antflags="${antflags} -Dbuild.compiler=jikes" fi sh build.sh ${antflags} || die "Compile failed." } src_install() { java-pkg_dojar build/x*.jar dodoc TODO STATUS README ISSUES LICENSE 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 }