summaryrefslogtreecommitdiff
blob: 7320886dbe8a63d16e3186ddc70303e164986704 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# No tests, #839681
JAVA_PKG_IUSE="doc source"
MAVEN_ID="org.apache.poi:poi-main:${PV}"

inherit java-pkg-2 java-pkg-simple verify-sig

DESCRIPTION="Maven build of Apache POI for Sonar checks"
HOMEPAGE="https://poi.apache.org/"
RELEASE_DATE="20231118"
SRC_URI="https://archive.apache.org/dist/poi/release/src/poi-src-${PV}-${RELEASE_DATE}.tgz
	verify-sig? ( https://archive.apache.org/dist/poi/release/src/poi-src-${PV}-${RELEASE_DATE}.tgz.asc )"
S="${WORKDIR}/poi-src-${PV}-${RELEASE_DATE}"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"

VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/poi.apache.org.asc"
BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-poi )"
DEPEND="
	dev-java/commons-codec:0
	dev-java/commons-collections:4
	dev-java/commons-io:1
	dev-java/commons-math:3
	dev-java/log4j-api:2
	>=dev-java/sparsebitset-1.3:0
	>=virtual/jdk-11:*
"

RDEPEND=">=virtual/jre-1.8:*"

JAVA_AUTOMATIC_MODULE_NAME="org.apache.poi.poi"
JAVA_CLASSPATH_EXTRA="
	commons-codec
	commons-collections-4
	commons-io-1
	commons-math-3
	log4j-api-2
	sparsebitset
"
JAVA_RESOURCE_DIRS="poi/src/main/resources"
JAVA_SRC_DIR=( poi/src/main/java{,9} )

src_prepare() {
	java-pkg-2_src_prepare
	sed \
		-e "s:@VERSION@:${PV}:g" \
		-e "s:@DSTAMP@:${RELEASE_DATE}:g" \
		poi/src/main/version/Version.java.template \
		> poi/src/main/java/org/apache/poi/Version.java || die
	# log4j-api does not provide Automatic-Module
	sed \
		-e '/org.apache.logging.log4j/d' \
		-i poi/src/main/java9/module-info.java || die
}