Files
gentoo/dev-java/metadata-extractor/metadata-extractor-2.8.1.ebuild
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

53 lines
1.2 KiB
Bash

# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
JAVA_PKG_IUSE="doc source"
inherit java-pkg-2 java-pkg-simple
DESCRIPTION="Access the metadata in digital images and video via a simple Java API"
HOMEPAGE="http://www.drewnoakes.com/code/exif/"
SRC_URI="https://github.com/drewnoakes/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples test"
RESTRICT="!test? ( test )"
CDEPEND="dev-java/xmpcore:0"
DEPEND="${CDEPEND}
>=virtual/jdk-1.6
test? ( dev-java/junit:4 )"
RDEPEND="${CDEPEND}
>=virtual/jre-1.6"
S="${WORKDIR}/${P}"
JAVA_SRC_DIR="Source"
JAVA_GENTOO_CLASSPATH="xmpcore"
java_prepare() {
java-pkg_clean
}
src_install() {
java-pkg-simple_src_install
dodoc {CONTRIBUTING,README}.md
use examples && java-pkg_doexamples Samples
}
src_test() {
local DIR=Tests
local CP="${DIR}:${S}/${PN}.jar:$(java-pkg_getjars junit-4,${JAVA_GENTOO_CLASSPATH})"
local TESTS=$(find ${DIR} -name "*Test.java")
TESTS="${TESTS//Tests\/}"
TESTS="${TESTS//.java}"
TESTS="${TESTS//\//.}"
ejavac -cp "${CP}" -d ${DIR} $(find ${DIR} -name "*.java")
ejunit4 -classpath "${CP}" ${TESTS}
}