diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2022-04-04 18:08:10 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-04-06 10:01:40 +0200 |
commit | 5f5b77963dbdfa1f1751094ea0731b1dc5afd9b3 (patch) | |
tree | 214305c0f9166742bbf88fd7e4315f5a0d2e1078 /dev-java/univocity-parsers | |
parent | dev-java/opentest4j: Import from junit-5-ebuild-repo (diff) | |
download | gentoo-5f5b77963dbdfa1f1751094ea0731b1dc5afd9b3.tar.gz gentoo-5f5b77963dbdfa1f1751094ea0731b1dc5afd9b3.tar.bz2 gentoo-5f5b77963dbdfa1f1751094ea0731b1dc5afd9b3.zip |
dev-java/univocity-parsers: Import from junit-5-ebuild-repo
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/24906
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/univocity-parsers')
4 files changed, 215 insertions, 0 deletions
diff --git a/dev-java/univocity-parsers/Manifest b/dev-java/univocity-parsers/Manifest new file mode 100644 index 000000000000..df94d9fa5eb2 --- /dev/null +++ b/dev-java/univocity-parsers/Manifest @@ -0,0 +1 @@ +DIST univocity-parsers-2.9.1.tar.gz 486417 BLAKE2B 4da3d31a1e57613731a0e112dfedcb084e57a2d0b6568e14f49986c447a080cb2cf8c530a6bb0ed30026a3afe5c5c648de2b4559eeca9432c5e13b5eb9b92b67 SHA512 f22062a277015c5f7fdc10b192ff07576baa6a8b67116bdc8e9aed37a70b6f3268a8faf0e422620be63deff13e3d74d4606f7c972cd9b4afda553f88feb75887 diff --git a/dev-java/univocity-parsers/files/univocity-parsers-2.9.1-explicitly-import-Record.patch b/dev-java/univocity-parsers/files/univocity-parsers-2.9.1-explicitly-import-Record.patch new file mode 100644 index 000000000000..ca18412aeac4 --- /dev/null +++ b/dev-java/univocity-parsers/files/univocity-parsers-2.9.1-explicitly-import-Record.patch @@ -0,0 +1,159 @@ +From 6dffca791430639ca06dc6f2d9c309e085d8ba32 Mon Sep 17 00:00:00 2001 +From: Yuan Liao <liaoyuan@gmail.com> +Date: Mon, 4 Apr 2022 09:36:20 -0700 +Subject: [PATCH] Fix "reference to Record is ambiguous" for JDK 16+ + +Since Java 16, a new java.lang.Record class has been added to the Java +SE API. Classes under the java.lang package, including this Record +class, are automatically imported in any Java source file. Because this +project also has a com.univocity.parsers.common.record.Record interface, +when it is being compiled on JDK 16 and above, there would be an +ambiguity as to which class/interface to use for the 'Record' type: + +src/main/java/com/univocity/parsers/common/Context.java:136: error: reference to Record is ambiguous + Record toRecord(String[] row); + ^ + both interface com.univocity.parsers.common.record.Record in com.univocity.parsers.common.record and class java.lang.Record in java.lang match + +The resolution to this issue is simply to import the Record interface +under this project explicitly in every source file using it. + +Bug: https://github.com/Leo3418/junit-5-ebuild-repo/issues/4 +Reported-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> +Signed-off-by: Yuan Liao <liaoyuan@gmail.com> +--- + src/main/java/com/univocity/parsers/common/AbstractParser.java | 1 + + src/main/java/com/univocity/parsers/common/AbstractWriter.java | 1 + + src/main/java/com/univocity/parsers/common/Context.java | 1 + + src/main/java/com/univocity/parsers/common/ContextWrapper.java | 1 + + src/main/java/com/univocity/parsers/common/DefaultContext.java | 1 + + .../java/com/univocity/parsers/common/NoopParsingContext.java | 1 + + .../java/com/univocity/parsers/common/ParsingContextWrapper.java | 1 + + .../com/univocity/parsers/common/iterators/RecordIterator.java | 1 + + src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java | 1 + + src/main/java/com/univocity/parsers/fixed/Lookup.java | 1 + + 10 files changed, 10 insertions(+) + +diff --git a/src/main/java/com/univocity/parsers/common/AbstractParser.java b/src/main/java/com/univocity/parsers/common/AbstractParser.java +index 42191ad..6dd4dac 100644 +--- a/src/main/java/com/univocity/parsers/common/AbstractParser.java ++++ b/src/main/java/com/univocity/parsers/common/AbstractParser.java +@@ -20,6 +20,7 @@ import com.univocity.parsers.common.input.*; + import com.univocity.parsers.common.iterators.*; + import com.univocity.parsers.common.processor.*; + import com.univocity.parsers.common.processor.core.*; ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + import java.io.*; +diff --git a/src/main/java/com/univocity/parsers/common/AbstractWriter.java b/src/main/java/com/univocity/parsers/common/AbstractWriter.java +index 6a19562..d7a5207 100644 +--- a/src/main/java/com/univocity/parsers/common/AbstractWriter.java ++++ b/src/main/java/com/univocity/parsers/common/AbstractWriter.java +@@ -18,6 +18,7 @@ package com.univocity.parsers.common; + import com.univocity.parsers.common.fields.*; + import com.univocity.parsers.common.input.*; + import com.univocity.parsers.common.processor.*; ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + import com.univocity.parsers.fixed.*; + +diff --git a/src/main/java/com/univocity/parsers/common/Context.java b/src/main/java/com/univocity/parsers/common/Context.java +index d0adf5f..f3b28c9 100644 +--- a/src/main/java/com/univocity/parsers/common/Context.java ++++ b/src/main/java/com/univocity/parsers/common/Context.java +@@ -15,6 +15,7 @@ + ******************************************************************************/ + package com.univocity.parsers.common; + ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + /** +diff --git a/src/main/java/com/univocity/parsers/common/ContextWrapper.java b/src/main/java/com/univocity/parsers/common/ContextWrapper.java +index bee87e8..c338895 100644 +--- a/src/main/java/com/univocity/parsers/common/ContextWrapper.java ++++ b/src/main/java/com/univocity/parsers/common/ContextWrapper.java +@@ -15,6 +15,7 @@ + ******************************************************************************/ + package com.univocity.parsers.common; + ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + /** +diff --git a/src/main/java/com/univocity/parsers/common/DefaultContext.java b/src/main/java/com/univocity/parsers/common/DefaultContext.java +index 11ea961..7346e64 100644 +--- a/src/main/java/com/univocity/parsers/common/DefaultContext.java ++++ b/src/main/java/com/univocity/parsers/common/DefaultContext.java +@@ -15,6 +15,7 @@ + */ + package com.univocity.parsers.common; + ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + /** +diff --git a/src/main/java/com/univocity/parsers/common/NoopParsingContext.java b/src/main/java/com/univocity/parsers/common/NoopParsingContext.java +index fe1f07d..79d8787 100644 +--- a/src/main/java/com/univocity/parsers/common/NoopParsingContext.java ++++ b/src/main/java/com/univocity/parsers/common/NoopParsingContext.java +@@ -15,6 +15,7 @@ + ******************************************************************************/ + package com.univocity.parsers.common; + ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + import java.util.*; +diff --git a/src/main/java/com/univocity/parsers/common/ParsingContextWrapper.java b/src/main/java/com/univocity/parsers/common/ParsingContextWrapper.java +index 20a59d8..e8b4f9d 100644 +--- a/src/main/java/com/univocity/parsers/common/ParsingContextWrapper.java ++++ b/src/main/java/com/univocity/parsers/common/ParsingContextWrapper.java +@@ -15,6 +15,7 @@ + */ + package com.univocity.parsers.common; + ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + import java.util.*; +diff --git a/src/main/java/com/univocity/parsers/common/iterators/RecordIterator.java b/src/main/java/com/univocity/parsers/common/iterators/RecordIterator.java +index 01b22cb..1620205 100644 +--- a/src/main/java/com/univocity/parsers/common/iterators/RecordIterator.java ++++ b/src/main/java/com/univocity/parsers/common/iterators/RecordIterator.java +@@ -16,6 +16,7 @@ + package com.univocity.parsers.common.iterators; + + import com.univocity.parsers.common.*; ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + import java.io.*; +diff --git a/src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java b/src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java +index b38bc99..25285eb 100644 +--- a/src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java ++++ b/src/main/java/com/univocity/parsers/fixed/FixedWidthParser.java +@@ -17,6 +17,7 @@ package com.univocity.parsers.fixed; + + import com.univocity.parsers.common.*; + import com.univocity.parsers.common.input.*; ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + /** +diff --git a/src/main/java/com/univocity/parsers/fixed/Lookup.java b/src/main/java/com/univocity/parsers/fixed/Lookup.java +index 1aeff0d..bcf0f98 100644 +--- a/src/main/java/com/univocity/parsers/fixed/Lookup.java ++++ b/src/main/java/com/univocity/parsers/fixed/Lookup.java +@@ -16,6 +16,7 @@ + package com.univocity.parsers.fixed; + + import com.univocity.parsers.common.*; ++import com.univocity.parsers.common.record.Record; + import com.univocity.parsers.common.record.*; + + import java.util.*; +-- +2.35.1 + diff --git a/dev-java/univocity-parsers/metadata.xml b/dev-java/univocity-parsers/metadata.xml new file mode 100644 index 000000000000..155f678863f2 --- /dev/null +++ b/dev-java/univocity-parsers/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>java@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">uniVocity/univocity-parsers</remote-id> + </upstream> + <longdescription> + univocity-parsers is a collection of extremely fast and reliable parsers for Java. It provides a consistent interface for handling different file formats, and a solid framework for the development of new parsers. + </longdescription> +</pkgmetadata> diff --git a/dev-java/univocity-parsers/univocity-parsers-2.9.1.ebuild b/dev-java/univocity-parsers/univocity-parsers-2.9.1.ebuild new file mode 100644 index 000000000000..d8a1215f2da3 --- /dev/null +++ b/dev-java/univocity-parsers/univocity-parsers-2.9.1.ebuild @@ -0,0 +1,42 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Some test dependencies have not been packaged yet +JAVA_PKG_IUSE="doc source" +MAVEN_ID="com.univocity:univocity-parsers:2.9.1" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="A collection of extremely fast and reliable parsers for Java" +HOMEPAGE="https://www.univocity.com/" +SRC_URI="https://github.com/uniVocity/univocity-parsers/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DEPEND=" + >=virtual/jdk-1.8:* +" + +RDEPEND=" + >=virtual/jre-1.8:* +" + +# Restore value of S overridden by java-pkg-simple.eclass to default +S="${WORKDIR}/${P}" + +JAVA_SRC_DIR="src/main/java" + +src_prepare() { + # https://github.com/uniVocity/univocity-parsers/pull/502 + eapply "${FILESDIR}/${P}-explicitly-import-Record.patch" + java-pkg-2_src_prepare +} + +src_install() { + java-pkg-simple_src_install + einstalldocs # https://bugs.gentoo.org/789582 +} |