commit:     557c936b744c36a9e17469e6c7d7a1518710b055
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Tue Sep 24 10:31:39 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Wed Sep 25 07:10:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=557c936b

dev-java/commons-compress: add 1.27.1

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/38756
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-java/commons-compress/Manifest                 |  2 +
 .../commons-compress-1.27.1.ebuild                 | 73 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/dev-java/commons-compress/Manifest 
b/dev-java/commons-compress/Manifest
index 531be855daa7..46ca3203744a 100644
--- a/dev-java/commons-compress/Manifest
+++ b/dev-java/commons-compress/Manifest
@@ -1,2 +1,4 @@
 DIST commons-compress-1.26.1-src.tar.gz 54843710 BLAKE2B 
84c4c1363a4396a06773a8c120f5f32d98fceaa139e33a2a27df79a9aea41b8084a93a5735b0c4cd17fa88c404060af2336ab20f127acceb0da948ff170164c3
 SHA512 
096c94344a9bbcd021a3cce0869456cf6d22ca5136b63de017922d7c3de5d94b591961fe550201b654f9dc90b2cd8f32ef9bf1e507fddfb2e2f7c33bddc790c4
 DIST commons-compress-1.26.1-src.tar.gz.asc 488 BLAKE2B 
4df27d6d7ab226eb87ca6b7691c677b95d59c2d37f44ced6a5c0586aefa2506c9a635d869fd181526149416c228a8859a961386ca98519dc080709a55d9264c9
 SHA512 
b9533d63f961022ca42e79f8aed91a6c4b8a91cb0f3aa095a4ffa2202ed87d171f6c0d32babfbd730eb0c250be2331da4bd12e5251f7e7076f78536d20d96ced
+DIST commons-compress-1.27.1-src.tar.gz 61131529 BLAKE2B 
d6109c33d833548228e2bdcb2a5563526a7adede825de7422108d9e0890942e875b28032527bdc7c329306973c2ddc0da1995f028999c66b1ccefe5830a4a741
 SHA512 
c7a2cef26959e687ad19b96b5ba8393d7514095e13bf0f29bd41e6b3c3cb2260d8ff23283ff3d5fd137b2522b843e7f0f50ab46bcf0f66df5383674f35f223ab
+DIST commons-compress-1.27.1-src.tar.gz.asc 488 BLAKE2B 
d7ed8dfae26b41a8884deecfb8b09e827388749f9f2c1f762947dae61635c64a76e4f86171bf893eb4d6ca53e270332a2487afbab3664f33d6618837417e979c
 SHA512 
a7e12ee2470eae3f76540115dfb7817c3ce6142e2ac23bbd42150c32d9b615e889d3c52122b253fa9e56408c99ae5415b4987b6d8b97ff52090f676a2087b2f5

diff --git a/dev-java/commons-compress/commons-compress-1.27.1.ebuild 
b/dev-java/commons-compress/commons-compress-1.27.1.ebuild
new file mode 100644
index 000000000000..b2adfc0cc3c8
--- /dev/null
+++ b/dev-java/commons-compress/commons-compress-1.27.1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Not ready for running tests, https://bugs.gentoo.org/839681
+JAVA_PKG_IUSE="doc source"
+MAVEN_ID="org.apache.commons:commons-compress:${PV}"
+
+inherit java-pkg-2 java-pkg-simple verify-sig
+
+DESCRIPTION="Java API for working with archive files"
+HOMEPAGE="https://commons.apache.org/proper/commons-compress/";
+SRC_URI="mirror://apache/commons/compress/source/${P}-src.tar.gz
+       verify-sig? ( 
https://downloads.apache.org/commons/compress/source/${P}-src.tar.gz.asc )"
+S="${WORKDIR}/${P}-src"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )"
+CP_DEPEND="
+       dev-java/asm:9
+       dev-java/brotli-dec:0
+       dev-java/commons-codec:0
+       >=dev-java/commons-io-2.17.0:1
+       dev-java/commons-lang:3.6
+       dev-java/xz-java:0
+       dev-java/zstd-jni:0
+"
+DEPEND="${CP_DEPEND}
+       >=virtual/jdk-11:*
+       dev-java/osgi-core:0"
+RDEPEND="${CP_DEPEND}
+       >=virtual/jre-1.8:*"
+
+JAVA_CLASSPATH_EXTRA="osgi-core"
+JAVA_ENCODING="iso-8859-1"     # unmappable character for utf-8
+JAVA_MAIN_CLASS="org.apache.commons.compress.archivers.Lister"
+JAVA_SRC_DIR="src/main/java"
+
+src_compile() {
+       # getting dependencies into the modulepath
+       DEPENDENCIES=(
+               asm-9
+               brotli-dec
+               commons-codec
+               commons-io-1
+               commons-lang-3.6
+               xz-java
+               zstd-jni
+       )
+       local modulepath
+       for dependency in ${DEPENDENCIES[@]}; do
+               modulepath="${modulepath}:$(java-pkg_getjars --build-only 
${dependency})"
+       done
+
+       JAVA_JAR_FILENAME="org.apache.${PN}.jar"
+       java-pkg-simple_src_compile     # creates a legacy jar file without 
module-info
+
+       # generate module-info.java
+       jdeps \
+               --module-path "${modulepath}" \
+               --generate-module-info \
+               src/main/java \
+               --multi-release 9 \
+               "${JAVA_JAR_FILENAME}" || die
+
+       JAVA_JAR_FILENAME="${PN}.jar"
+       java-pkg-simple_src_compile     # creates the final jar file including 
module-info
+}

Reply via email to