summaryrefslogtreecommitdiff
path: root/dev-java/dom4j/dom4j-2.1.4.ebuild
blob: 8f84f42c2a587eba8bde75624bee2c350fab2a42 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

JAVA_PKG_IUSE="doc source test"
MAVEN_ID="org.dom4j:dom4j:2.1.4"
JAVA_TESTING_FRAMEWORKS="testng"

inherit java-pkg-2 java-pkg-simple

DESCRIPTION="flexible XML framework for Java"
HOMEPAGE="https://dom4j.github.io/"
SRC_URI="https://github.com/${PN}/${PN}/archive/version-${PV}.tar.gz -> ${P}.tar.gz
	https://repo1.maven.org/maven2/jaxen/jaxen/1.2.0/jaxen-1.2.0.jar"
S="${WORKDIR}/${PN}-version-${PV}"

LICENSE="dom4j"
SLOT="1"
KEYWORDS="amd64 arm64 ppc64"
IUSE="jaxen"

CP_DEPEND="
	dev-java/jaxb-api:2
	dev-java/xpp2:0
	dev-java/xpp3:0
	dev-java/xsdlib:0
"
DEPEND="${CP_DEPEND}
	>=virtual/jdk-1.8:*
	jaxen? ( dev-java/jaxen:1.2[dom4j] )
	test? ( dev-java/xerces:2 )
"

RDEPEND="${CP_DEPEND}
	>=virtual/jre-1.8:*
	jaxen? ( dev-java/jaxen:1.2[dom4j] )
"

JAVA_AUTOMATIC_MODULE_NAME="org.dom4j"

# dom4j has a cyclic dependency on jaxen[dom4j].
# The downloaded jaxen-1.2.0.jar is provided for compilation only.
# No prebuilt software is actually installed onto the system.
JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/jaxen-1.2.0.jar"
JAVA_SRC_DIR="src/main/java"

JAVA_TEST_GENTOO_CLASSPATH="testng,xerces-2"
JAVA_TEST_RESOURCE_DIRS="xml"
JAVA_TEST_SRC_DIR="src/test/java"

src_prepare() {
	java-pkg-2_src_prepare
	java-pkg_clean ..

	if use jaxen; then
		JAVA_GENTOO_CLASSPATH+=" jaxen-1.2"
	fi
}