Сравнение apache-rat-0.13 с apache-rat-0.15

/usr/portage/dev-java/apache-rat/apache-rat-0.15.ebuild 2023-10-09 14:52:29.412368348 +0300
1 1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=7
4
EAPI=8
5 5

  
6
inherit java-pkg-2
6
# javadoc is broken for java 17, see https://bugs.gentoo.org/914458
7
JAVA_PKG_IUSE="doc source test"
8
MAVEN_PROVIDES="
9
	org.apache.rat:apache-rat-core:${PV}
10
	org.apache.rat:apache-rat-tasks:${PV}
11
"
12
JAVA_TESTING_FRAMEWORKS="junit-4"
13

  
14
inherit java-pkg-2 java-pkg-simple verify-sig
7 15

  
8
DESCRIPTION="Release audit tool, focused on licenses"
16
DESCRIPTION="Apache Rat is a release audit tool, focused on licenses"
9 17
HOMEPAGE="https://creadur.apache.org/rat/"
18
SRC_URI="mirror://apache//creadur/${P}/${P}-src.tar.bz2
19
	verify-sig? ( https://archive.apache.org/dist/creadur/${P}/${P}-src.tar.bz2.asc )"
20
S="${WORKDIR}/${P}"
10 21

  
11 22
LICENSE="Apache-2.0"
12 23
SLOT="0"
13
KEYWORDS="amd64 x86"
24
KEYWORDS="~amd64 ~x86"
14 25

  
15
RDEPEND="
16
	~dev-java/apache-rat-core-${PV}:0
17
	~dev-java/apache-rat-tasks-${PV}:0
18
	>=virtual/jre-1.8:*
26
CP_DEPEND="
27
	dev-java/ant-core:0
28
	dev-java/commons-cli:1
29
	dev-java/commons-collections:4
30
	dev-java/commons-compress:0
31
	dev-java/commons-io:1
32
	dev-java/commons-lang:3.6
19 33
"
20 34

  
21
S="${WORKDIR}"
35
DEPEND="${CP_DEPEND}
36
	>=virtual/jdk-1.8:*
37
	test? ( dev-java/ant-testutil:0 )"
38
RDEPEND="${CP_DEPEND}
39
	>=virtual/jre-1.8:*"
40

  
41
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-creadur )"
42
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/creadur.apache.org.asc"
43

  
44
DOCS=( NOTICE README.md README.txt RELEASE-NOTES.txt RELEASE_NOTES.txt )
45

  
46
PATCHES=( "${FILESDIR}/apache-rat-0.15-fix-tests.patch" )
47

  
48
src_prepare() {
49
	default #780585
50
	java-pkg-2_src_prepare
51
}
22 52

  
23
src_compile() { :; }
53
src_compile() {
54
	einfo "Compiling apache-rat-core.jar"
55
	JAVA_JAR_FILENAME="${PN}-core.jar"
56
	JAVA_RESOURCE_DIRS="${PN}-core/src/main/resources"
57
	JAVA_SRC_DIR="${PN}-core/src/main/java"
58
	java-pkg-simple_src_compile
59
	JAVA_GENTOO_CLASSPATH_EXTRA+=":${PN}-core.jar"
60
	rm -r target || die
61

  
62
	einfo "Compiling apache-rat-tasks.jar"
63
	JAVA_JAR_FILENAME="${PN}-tasks.jar"
64
	JAVA_RESOURCE_DIRS="${PN}-tasks/src/main/resources"
65
	JAVA_SRC_DIR="${PN}-tasks/src/main/java"
66
	java-pkg-simple_src_compile
67
	JAVA_GENTOO_CLASSPATH_EXTRA+=":${PN}-tasks.jar"
68
	rm -r target || die
69

  
70
	# javadoc is broken for java 17, see https://bugs.gentoo.org/914458
71
	if use doc; then
72
		einfo "Compiling javadocs"
73
		ejavadoc \
74
			-verbose \
75
			-classpath "$(java-pkg_getjars \
76
				--build-only ant-core)":"$(java-pkg_getjars \
77
				--build-only commons-cli-1)":"$(java-pkg_getjars \
78
				--build-only commons-collections-4)":"$(java-pkg_getjars \
79
				--build-only commons-compress):$(java-pkg_getjars \
80
				--build-only commons-io-1):$(java-pkg_getjars \
81
				--build-only commons-lang-3.6)" \
82
			-sourcepath "${PN}-core/src/main/java:${PN}-tasks/src/main/java" \
83
			-d javadoc -subpackages org.apache.rat org.apache.rat.anttasks
84
	fi
85
}
86

  
87
src_test() {
88
	JAVA_TEST_GENTOO_CLASSPATH="ant-testutil,junit-4"
89

  
90
	einfo "Testing apache-rat-core"
91
	cp -r "${PN}"-core/src/{main,test} src || die
92
	JAVA_TEST_RESOURCE_DIRS="src/test/resources"
93
	JAVA_TEST_SRC_DIR="src/test/java"
94
	java-pkg-simple_src_test
95
	rm -r src/{main,test} || die
96

  
97
	einfo "Testing apache-rat-tasks"
98
	cp -r "${PN}"-tasks/src/{main,test} src || die
99
	mkdir -p target/it-sources || die
100
	JAVA_TEST_RESOURCE_DIRS="src/test/resources"
101
	JAVA_TEST_SRC_DIR="src/test/java"
102
	java-pkg-simple_src_test
103
}
24 104

  
25 105
src_install() {
26
	default
27
	java-pkg_register-dependency apache-rat-core,apache-rat-tasks
28
	java-pkg_dolauncher "${PN}" --jar $(java-pkg_getjar apache-rat-core apache-rat-core.jar) --main org.apache.rat.Report
106
	java-pkg_dojar "${PN}-core.jar"
107
	java-pkg_dojar "${PN}-tasks.jar"
108
	java-pkg_dolauncher "${PN}" --main org.apache.rat.Report
109

  
110
	use doc && java-pkg_dojavadoc javadoc
111

  
112
	if use source; then
113
		java-pkg_dosrc "${PN}-core/src/main/java/*"
114
		java-pkg_dosrc "${PN}-tasks/src/main/java/*"
115
	fi
29 116
}
Спасибо!