diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-04-06 22:33:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-04-06 22:33:41 +0100 |
commit | e68d405c5d712af4387159df07e226217bdda049 (patch) | |
tree | 009ab0f3d427f0813e62930d71802cb054c07e30 /dev-java/univocity-parsers | |
parent | 401101f9c8077911929d3f2b60a37098460a5d89 (diff) |
gentoo resync : 06.04.2022
Diffstat (limited to 'dev-java/univocity-parsers')
4 files changed, 218 insertions, 0 deletions
diff --git a/dev-java/univocity-parsers/Manifest b/dev-java/univocity-parsers/Manifest new file mode 100644 index 000000000000..43f5ace30117 --- /dev/null +++ b/dev-java/univocity-parsers/Manifest @@ -0,0 +1,4 @@ +AUX univocity-parsers-2.9.1-explicitly-import-Record.patch 7598 BLAKE2B dabf3f190ecedc9f8897418ffb03351c9dc2b6db2d0cece5325997ba7b6b99da5a52466fbef920a5c09785874f99422c0eaba70031159a5186a26109a8fbc275 SHA512 80a84722a81a97b3f799dc2962c19b7bed077170a436e09a4440d536ec78ab6a994df7dfe1e4e3ea30c9fdecfb61f5f78147fa0045b63cfc3d274952b4dffb47 +DIST univocity-parsers-2.9.1.tar.gz 486417 BLAKE2B 4da3d31a1e57613731a0e112dfedcb084e57a2d0b6568e14f49986c447a080cb2cf8c530a6bb0ed30026a3afe5c5c648de2b4559eeca9432c5e13b5eb9b92b67 SHA512 f22062a277015c5f7fdc10b192ff07576baa6a8b67116bdc8e9aed37a70b6f3268a8faf0e422620be63deff13e3d74d4606f7c972cd9b4afda553f88feb75887 +EBUILD univocity-parsers-2.9.1.ebuild 981 BLAKE2B cde807edd70b02ad0e71da6ba057da4b94effb8684795ff0d481418a7f8bb6fa6ac2bbe43b81abd922754b9c8c914adb3b7e0dab4f073232dee3b9d6f1857b84 SHA512 4994d40cf0d7a542935d63ab8132a1ae9064002703e8a07e46f781ef7e72210bae85637fabfa4d2e9da43f9f1ae6852d47cdb729e22b5f912b9a0f1c4f686f95 +MISC metadata.xml 562 BLAKE2B a15a9a3770842da39b54d159216f2aaa51d45034c85e88001a2be7132ba7d9723f15c0a4ff9a3a90aa1fd4748b36ed74ac51a4ef5d9bfcbaeb48f51d5c5fe06a SHA512 3999b470a7b5318086021ba8df7b47f545658b096e1151ef6b56a73623c43f3bf2a6da7a35dd4911de764068524b8bb9ee7d511ed3d5d8d44dd0a9e06129df06 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 +} |