dev-java/*: Update Manifest hashes
[gentoo.git] / dev-java / xml-xmlbeans / xml-xmlbeans-2.6.0.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5 JAVA_PKG_IUSE="doc source"
6
7 inherit java-pkg-2 java-ant-2
8
9 MY_P="xmlbeans-${PV}"
10
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"
14
15 LICENSE="Apache-2.0"
16 SLOT="2"
17 KEYWORDS="~amd64 ~ppc64 ~x86"
18
19 CDEPEND="
20         dev-java/saxon:9
21         dev-java/jsr173:0
22         dev-java/annogen:0
23         dev-java/piccolo:0
24         dev-java/ant-core:0
25         dev-java/xml-commons-resolver:0"
26
27 RDEPEND="
28         ${CDEPEND}
29         >=virtual/jre-1.6"
30
31 DEPEND="
32         ${CDEPEND}
33         >=virtual/jdk-1.6"
34
35 S="${WORKDIR}/${MY_P}"
36
37 PATCHES=(
38         "${FILESDIR}"/${P}-remove-jamsupport.patch
39         "${FILESDIR}"/${P}-piccolo.patch
40         "${FILESDIR}"/${P}-jam.patch
41         "${FILESDIR}"/${P}-SchemaCompiler.java.patch
42 )
43
44 java_prepare() {
45         epatch "${PATCHES[@]}"
46
47         # Preserve the old xbean jar, which is required for bootstrapping schemas.
48         mv external/lib/oldxbean.jar "${T}"/ || die
49
50         # Remove bundled binary files.
51         find . -name '*.jar' -exec rm -v {} + || die
52
53         pushd external/lib > /dev/null || die
54
55         find . -iname '*.zip' -exec rm -v {} + || die
56
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}
60
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}
64
65         # Put back the preserved old xbean jar.
66         mv "${T}"/oldxbean.jar . || die
67
68         popd > /dev/null || die
69
70         # Create empty directories to let the build pass.
71         mkdir -p build/classes/{jam,piccolo} || die
72 }
73
74 JAVA_ANT_REWRITE_CLASSPATH="true"
75
76 EANT_GENTOO_CLASSPATH="
77         annogen
78         piccolo
79         ant-core
80         saxon-9
81 "
82
83 EANT_BUILD_TARGET="deploy"
84 EANT_DOC_TARGET="docs"
85
86 EANT_EXTRA_ARGS="-Dpiccolo.classes.notRequired=true"
87 EANT_EXTRA_ARGS+=" -Djam.classes.notRequired=true"
88 EANT_EXTRA_ARGS+=" -Dsaxon9.jar.exists=true"
89
90 src_install() {
91         java-pkg_dojar build/lib/xbean*.jar
92
93         dodoc NOTICE.txt README.txt
94         if use doc; then
95                 java-pkg_dojavadoc build/docs/reference
96                 java-pkg_dohtml -r docs
97         fi
98
99         use source && java-pkg_dosrc src/*
100 }
101
102 pkg_postinst() {
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."
105 }