1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 JAVA_PKG_IUSE="doc source"
7 inherit java-pkg-2 java-ant-2
11 DESCRIPTION="An XML-Java binding tool"
12 HOMEPAGE="http://xmlbeans.apache.org/"
13 SRC_URI="http://archive.apache.org/dist/xmlbeans/source/${MY_P}-src.zip"
17 KEYWORDS="~amd64 ~ppc64 ~x86"
25 dev-java/xml-commons-resolver:0"
35 S="${WORKDIR}/${MY_P}"
38 "${FILESDIR}"/${P}-remove-jamsupport.patch
39 "${FILESDIR}"/${P}-piccolo.patch
40 "${FILESDIR}"/${P}-jam.patch
41 "${FILESDIR}"/${P}-SchemaCompiler.java.patch
45 epatch "${PATCHES[@]}"
47 # Preserve the old xbean jar, which is required for bootstrapping schemas.
48 mv external/lib/oldxbean.jar "${T}"/ || die
50 # Remove bundled binary files.
51 find . -name '*.jar' -exec rm -v {} + || die
53 pushd external/lib > /dev/null || die
55 find . -iname '*.zip' -exec rm -v {} + || die
57 # Symlink the dependencies.
58 java-pkg_jar-from jsr173{,.jar,_1.0_api_bundle.jar}
59 java-pkg_jar-from jsr173{,.jar,_1.0_api.jar}
61 mkdir xml-commons-resolver-1.1 || die
62 java-pkg_jar-from xml-commons-resolver{,.jar} xcresolver.zip
63 java-pkg_jar-from xml-commons-resolver{,.jar,-1.1/resolver.jar}
65 # Put back the preserved old xbean jar.
66 mv "${T}"/oldxbean.jar . || die
68 popd > /dev/null || die
70 # Create empty directories to let the build pass.
71 mkdir -p build/classes/{jam,piccolo} || die
74 JAVA_ANT_REWRITE_CLASSPATH="true"
76 EANT_GENTOO_CLASSPATH="
83 EANT_BUILD_TARGET="deploy"
84 EANT_DOC_TARGET="docs"
86 EANT_EXTRA_ARGS="-Dpiccolo.classes.notRequired=true"
87 EANT_EXTRA_ARGS+=" -Djam.classes.notRequired=true"
88 EANT_EXTRA_ARGS+=" -Dsaxon9.jar.exists=true"
91 java-pkg_dojar build/lib/xbean*.jar
93 dodoc NOTICE.txt README.txt
95 java-pkg_dojavadoc build/docs/reference
96 java-pkg_dohtml -r docs
99 use source && java-pkg_dosrc src/*
103 ewarn "This package uses an old binary xbean to bootstrap its schemas."
104 ewarn "If you do not trust the binary part of this build, please unmerge."