summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2024-09-30 10:19:41 +0200
committerMiroslav Šulc <fordfrog@gentoo.org>2024-10-20 12:04:41 +0200
commit79e86386bd7513f29495c5a3283a158ec8446217 (patch)
tree891a48d4a7e348c542a52d5910a3c941e6b8b263 /dev-java
parentapp-misc/remind: Stabilize 05.00.06 amd64, #941875 (diff)
downloadgentoo-79e86386bd7513f29495c5a3283a158ec8446217.tar.gz
gentoo-79e86386bd7513f29495c5a3283a158ec8446217.tar.bz2
gentoo-79e86386bd7513f29495c5a3283a158ec8446217.zip
dev-java/commons-csv: add 1.12.0
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/38836/commits/6ca724d74a4516c2c132853fd8d4105b230fd86b Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/commons-csv/Manifest2
-rw-r--r--dev-java/commons-csv/commons-csv-1.12.0.ebuild96
2 files changed, 98 insertions, 0 deletions
diff --git a/dev-java/commons-csv/Manifest b/dev-java/commons-csv/Manifest
index 0bc18bae17ce..82556142c5a2 100644
--- a/dev-java/commons-csv/Manifest
+++ b/dev-java/commons-csv/Manifest
@@ -1 +1,3 @@
+DIST commons-csv-1.12.0-src.tar.gz 36993963 BLAKE2B ae6e207906efa3265ba92e1919356c77fa75616eaae0b095d9795100df2c5eb514c73a855ab4fc7a77c7958aff2eacaac860775b514e705e010e6cd3e5fb9e8c SHA512 67d8fd651a9785825b2f13c5f6bd95e0f2649ef9f65ec6889a2f9fcb34bd7a2a8c2b2df06e71eb0bcb1d0063953696daadbe06cf87624714682f0c3235fe7d11
+DIST commons-csv-1.12.0-src.tar.gz.asc 488 BLAKE2B a8185e5625b87fa6040b989f3c5d768c6cd689a63ddcec871b4a38ac1b4b8ae053f03d2a5f1a8e209205c1203f3514e8ef352e7c61eef009508cc0271a3944ad SHA512 0a74375a57a585cb7182cbd1935850b456ad33c119111eff8bac9c39470ed522ad64527b759eb1df5563ca12ca7dab983b7bf6eec3565970969e8d94ba357d4b
DIST commons-csv-1.9.0-sources.tar.gz 36975991 BLAKE2B b2e2091556f3766968dbe660e4059f491eedc458d3c15c0372770d144737ab3ddcc78ff36f674759bde8aa9690e4bbe14866f8546e1de3b67498736678650697 SHA512 4610197fbbf1b3fb3ff19ff8f5ee0ffe945c34c05e3db71b89156bf17aa7f6b2816ddace85457fec82cb22337f777e08eac5984d7299e702b537f0d242d368d8
diff --git a/dev-java/commons-csv/commons-csv-1.12.0.ebuild b/dev-java/commons-csv/commons-csv-1.12.0.ebuild
new file mode 100644
index 000000000000..a85b884d5160
--- /dev/null
+++ b/dev-java/commons-csv/commons-csv-1.12.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.apache.commons:commons-csv:1.12.0"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple verify-sig
+
+DESCRIPTION="Simple interface for reading and writing CSV files of various types"
+HOMEPAGE="https://commons.apache.org/proper/commons-csv/"
+SRC_URI="mirror://apache/commons/csv/source/${P}-src.tar.gz
+ verify-sig? ( https://archive.apache.org/dist/commons/csv/source/${P}-src.tar.gz.asc )"
+S="${WORKDIR}/${P}-src"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64"
+
+RESTRICT="test" #839681
+
+VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/commons.apache.org.asc"
+
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-apache-commons )"
+
+DEPEND="
+ >=virtual/jdk-11:*
+ dev-java/commons-codec:0
+ dev-java/commons-io:1
+ test? (
+ >=dev-java/commons-lang-3.12.0:3.6
+ dev-java/junit:5
+ dev-java/mockito:4
+ )
+"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+DOCS=( LICENSE.txt NOTICE.txt RELEASE-NOTES.txt )
+
+JAVA_CLASSPATH_EXTRA="
+ commons-codec
+ commons-io-1
+"
+
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="
+ commons-io-1
+ commons-lang-3.6
+ junit-5
+ mockito-4
+"
+
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+src_compile() {
+ # getting dependencies into the modulepath
+ DEPENDENCIES=(
+ commons-codec
+ commons-io-1
+ )
+ local modulepath
+ for dependency in ${DEPENDENCIES[@]}; do
+ modulepath="${modulepath}:$(java-pkg_getjars --build-only ${dependency})"
+ done
+
+ local JAVA_MODULE_NAME="org.apache.${PN/-/.}"
+ JAVA_JAR_FILENAME="${JAVA_MODULE_NAME}.jar"
+ java-pkg-simple_src_compile # creates a legacy jar file without module-info
+
+ # generate module-info.java
+ jdeps \
+ --module-path "${modulepath}" \
+ --add-modules=ALL-MODULE-PATH \
+ --generate-module-info src/main \
+ --multi-release 9 \
+ "${JAVA_MODULE_NAME}.jar" || die
+
+ # compile module-info.java
+ ejavac \
+ -source 9 -target 9 \
+ --module-path "${modulepath}" \
+ --patch-module "${JAVA_MODULE_NAME}"="${JAVA_MODULE_NAME}.jar" \
+ -d target/versions/9 \
+ src/main/"${JAVA_MODULE_NAME}"/versions/9/module-info.java
+
+ # package
+ JAVA_JAR_FILENAME="${PN}.jar"
+ jar cvf "${JAVA_JAR_FILENAME}" \
+ -C target/classes . \
+ --release 9 -C target/versions/9 . || die
+}