Files
gentoo/dev-java/jdom/jdom-2.0.6-r4.ebuild
T
Michał Górny 064af661d0 */*: [QA] Fix trivial cases of MissingTestRestrict
The result was achieved via the following pipeline:

    pkgcheck scan -c RestrictTestCheck -R FormatReporter \
      --format '{category}/{package}/{package}-{version}.ebuild' |
    xargs -n32 grep -L RESTRICT |
    xargs -n32 sed -i -e '/^IUSE=.*test/aRESTRICT="!test? ( test )"'

The resulting metadata was compared before and after the change.
Few Go ebuilds had to be fixed manually due to implicit RESTRICT=strip
added by the eclass.  Two ebuilds have to be fixed because of multiline
IUSE.

Suggested-by: Robin H. Johnson <robbat2@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/13942
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2019-12-11 00:22:38 +01:00

65 lines
1.3 KiB
Bash

# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
MY_P="JDOM-${PV}"
JAVA_PKG_IUSE="doc source"
inherit eutils java-pkg-2 java-ant-2
DESCRIPTION="Java API to manipulate XML data"
SRC_URI="https://github.com/hunterhacker/${PN}/archive/${MY_P}.tar.gz"
HOMEPAGE="http://www.jdom.org"
LICENSE="Apache-1.1"
SLOT="2"
KEYWORDS="amd64 ppc64 x86"
IUSE="test"
RESTRICT="!test? ( test )"
CDEPEND="
dev-java/xalan:0
dev-java/jaxen:1.1
dev-java/iso-relax:0"
RDEPEND="
${CDEPEND}
>=virtual/jre-1.6"
DEPEND="
${CDEPEND}
>=virtual/jdk-1.6
test? ( dev-java/ant-junit:0 )"
JAVA_ANT_REWRITE_CLASSPATH="true"
EANT_BUILD_TARGET="jars"
EANT_TEST_TARGET="junit"
EANT_GENTOO_CLASSPATH="iso-relax,jaxen-1.1,xalan"
S="${WORKDIR}/${PN}-${MY_P}"
PATCHES=(
"${FILESDIR}/build-xml-2.patch"
)
java_prepare() {
java-pkg_clean
epatch "${PATCHES[@]}"
# Remove Android stuff to avoid junit RDEPEND.
rm -vr contrib/src/java/org/jdom2/contrib/android || die
}
src_install() {
java-pkg_newjar build/package/${PN}-${SLOT}.x-????.??.??.??.??.jar ${PN}.jar
java-pkg_newjar build/package/${PN}-${SLOT}.x-????.??.??.??.??-contrib.jar ${PN}-contrib.jar
dodoc {CHANGES,COMMITTERS,README,TODO}.txt
use doc && java-pkg_dojavadoc build/apidocs
use source && java-pkg_dosrc {contrib,core}/src/java/*
}
src_test() {
java-pkg-2_src_test
}