summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2023-11-06 10:31:38 +0100
committerMiroslav Šulc <fordfrog@gentoo.org>2023-12-04 09:51:16 +0100
commitd2d1736ac85f9f22dc20f0771ad114b8c5f790b1 (patch)
treebb41c35a1bbae0f2808a8273948233624e8cf963 /dev-java/emma
parentdev-lang/fuzion: restrict to jdk:17 for #916689 (diff)
downloadgentoo-d2d1736ac85f9f22dc20f0771ad114b8c5f790b1.tar.gz
gentoo-d2d1736ac85f9f22dc20f0771ad114b8c5f790b1.tar.bz2
gentoo-d2d1736ac85f9f22dc20f0771ad114b8c5f790b1.zip
dev-java/emma: rewrite with java-pkg-simple.eclass
Bug: https://bugs.gentoo.org/916903 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/33687 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/emma')
-rw-r--r--dev-java/emma/emma-2.0.5312-r5.ebuild84
1 files changed, 84 insertions, 0 deletions
diff --git a/dev-java/emma/emma-2.0.5312-r5.ebuild b/dev-java/emma/emma-2.0.5312-r5.ebuild
new file mode 100644
index 000000000000..66d41e71a6ba
--- /dev/null
+++ b/dev-java/emma/emma-2.0.5312-r5.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source"
+MAVEN_PROVIDES="
+ emma:emma:${PV}
+ emma:emma_ant:${PV}
+"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Free Java code coverage tool"
+HOMEPAGE="https://emma.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/emma/emma-release/${PV}/${P}-src.zip"
+S="${WORKDIR}/${P}"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+IUSE="+launcher"
+
+BDEPEND="app-arch/unzip"
+CP_DEPEND="dev-java/ant-core:0"
+DEPEND="${CP_DEPEND}
+ >=virtual/jdk-1.8:*"
+RDEPEND="${CP_DEPEND}
+ >=virtual/jre-1.8:*
+ launcher? ( !sci-biology/emboss:0 )"
+
+PATCHES=( "${FILESDIR}/emma-2.0.5312-java15api.patch" )
+
+src_prepare() {
+ default #780585
+}
+
+src_compile() {
+ einfo "Compiling emma.jar"
+ JAVA_JAR_FILENAME="emma.jar"
+ JAVA_MAIN_CLASS="emmarun"
+ JAVA_RESOURCE_DIRS=( core/res )
+ JAVA_SRC_DIR=( core/data core/java1{2,3,4} )
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":emma.jar"
+ rm -r target || die
+
+ einfo "Compiling emma_ant.jar"
+ JAVA_JAR_FILENAME="emma_ant.jar"
+ JAVA_MAIN_CLASS="com.vladium.emma.ANTMain"
+ JAVA_RESOURCE_DIRS=()
+ JAVA_SRC_DIR=( ant/ant1{4,5} )
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":emma_ant.jar"
+ rm -r target || die
+
+ if use doc; then
+ einfo "Compiling javadocs"
+ JAVA_SRC_DIR=(
+ core/data core/java1{2,3,4}
+ ant/ant1{4,5}
+ )
+ JAVA_JAR_FILENAME="ignoreme.jar"
+ java-pkg-simple_src_compile
+ fi
+}
+
+src_install() {
+ java-pkg_dojar "emma.jar" "emma_ant.jar"
+ java-pkg_register-ant-task
+
+ use launcher && java-pkg_dolauncher ${PN} --main emmarun
+
+ if use doc; then
+ java-pkg_dojavadoc target/api
+ fi
+
+ if use source; then
+ java-pkg_dosrc core/data/*
+ java-pkg_dosrc core/java1{2,3,4}/*
+ java-pkg_dosrc ant/ant1{4,5}*
+ fi
+}