diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-18 16:35:26 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2021-04-18 16:36:26 +0200 |
commit | a871d2b01b7673788592d8eb1ab34101c187fa79 (patch) | |
tree | bb0d927846b92720cd68bf2e8e4d0010f03c7a8d /dev-java/jaxen | |
parent | dev-java/jaxen: support dom4j (diff) | |
download | gentoo-a871d2b01b7673788592d8eb1ab34101c187fa79.tar.gz gentoo-a871d2b01b7673788592d8eb1ab34101c187fa79.tar.bz2 gentoo-a871d2b01b7673788592d8eb1ab34101c187fa79.zip |
dev-java/jaxen: improvements in 1.2.0-r1
1) added support for tests
2) added jdom and xom use flags
3) cleanup
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/jaxen')
-rw-r--r-- | dev-java/jaxen/jaxen-1.2.0-r1.ebuild | 43 | ||||
-rw-r--r-- | dev-java/jaxen/metadata.xml | 4 |
2 files changed, 34 insertions, 13 deletions
diff --git a/dev-java/jaxen/jaxen-1.2.0-r1.ebuild b/dev-java/jaxen/jaxen-1.2.0-r1.ebuild index adfa52aaccf4..86f30856f533 100644 --- a/dev-java/jaxen/jaxen-1.2.0-r1.ebuild +++ b/dev-java/jaxen/jaxen-1.2.0-r1.ebuild @@ -19,10 +19,10 @@ SRC_URI="https://github.com/${PN}-xpath/${PN}/archive/refs/tags/v${PV}.tar.gz -> LICENSE="BSD-2" SLOT="1.2" KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" -IUSE="dom4j" +IUSE="dom4j jdom xom" -# It seems that most tests depend on dom4j, jdom and xom which all depend on jaxen -RESTRICT="test" +# It seems that most tests depend on dom4j, jdom and xom which all depend back on jaxen +REQUIRED_USE="test? ( dom4j jdom xom )" # Compile dependencies # POM: pom.xml @@ -31,13 +31,19 @@ RESTRICT="test" # POM: pom.xml # test? junit:junit:3.8.2 -> >=dev-java/junit-3.8.2:0 +CDEPEND=" + dom4j? ( dev-java/dom4j:1 ) + jdom? ( dev-java/jdom:0 ) + xom? ( dev-java/xom:0 ) +" + DEPEND=" - dev-java/xerces:2 + ${CDEPEND} >=virtual/jdk-1.8:* - dom4j? ( dev-java/dom4j:1 ) " RDEPEND=" + ${CDEPEND} >=virtual/jre-1.8:* " @@ -45,18 +51,31 @@ S="${WORKDIR}" DOCS=( "${P}"/{LICENSE.txt,README.md} ) -JAVA_CLASSPATH_EXTRA="xerces-2" JAVA_SRC_DIR="${P}/src/java/main" +JAVA_TEST_SRC_DIR="${P}/src/java/test" +JAVA_TEST_GENTOO_CLASSPATH="junit" + src_prepare() { default - # solve cyclic deps by removing these dirs - # dom4j, jdom and xom depend on jaxen - # https://bugs.gentoo.org/739894#c9 - rm -rv "${JAVA_SRC_DIR}"/org/jaxen/{jdom,xom} || die - use dom4j || rm -rv "${JAVA_SRC_DIR}"/org/jaxen/dom4j || die - use dom4j && JAVA_GENTOO_CLASSPATH="dom4j-1" + if use dom4j; then + JAVA_GENTOO_CLASSPATH+=" dom4j-1" + else + rm -rv "${JAVA_SRC_DIR}"/org/jaxen/dom4j || die + fi + + if use jdom; then + JAVA_GENTOO_CLASSPATH+=" jdom" + else + rm -rv "${JAVA_SRC_DIR}"/org/jaxen/jdom || die + fi + + if use xom; then + JAVA_GENTOO_CLASSPATH+=" xom" + else + rm -rv "${JAVA_SRC_DIR}"/org/jaxen/xom || die + fi } src_install() { diff --git a/dev-java/jaxen/metadata.xml b/dev-java/jaxen/metadata.xml index 418032ce6ec8..e20be5fb7b4e 100644 --- a/dev-java/jaxen/metadata.xml +++ b/dev-java/jaxen/metadata.xml @@ -6,7 +6,9 @@ <name>Java</name> </maintainer> <use> - <flag name="dom4j">build the org.jaxen.dom4j.Dom4jXPath class</flag> + <flag name="dom4j">Includes org.jaxen.dom4j package</flag> + <flag name="jdom">Includes org.jaxen.jdom package</flag> + <flag name="xom">Includes org.jaxen.xom package</flag> </use> <upstream> <remote-id type="github">jaxen-xpath/jaxen</remote-id> |