blob: f0163a3a3c7f7437cbf38129271122c3e40224c3 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright 2023-2024 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"
IUSE="+launcher"
BDEPEND="app-arch/unzip"
CP_DEPEND=">=dev-java/ant-1.10.14: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" )
JAVADOC_CLASSPATH="ant"
JAVADOC_SRC_DIRS=(
core/data core/java1{2,3,4}
ant/ant1{4,5}
)
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
use doc && ejavadoc
}
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
}
|