Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/xerial-core/
Date: Thu, 20 Jan 2022 10:24:03
Message-Id: 1642674183.e2f71c912afab2ff3b456033ccea54598e1b118d.fordfrog@gentoo
1 commit: e2f71c912afab2ff3b456033ccea54598e1b118d
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Wed Jan 19 16:12:54 2022 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 20 10:23:03 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2f71c91
7
8 dev-java/xerial-core: EAPI 8, min java 1.8:*
9
10 Switching to java-pkg-simple.eclass
11 Closes: https://bugs.gentoo.org/737074
12 Package-Manager: Portage-3.0.28, Repoman-3.0.3
13 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
14 Closes: https://github.com/gentoo/gentoo/pull/23871
15 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
16
17 dev-java/xerial-core/metadata.xml | 2 +-
18 dev-java/xerial-core/xerial-core-2.0.1-r1.ebuild | 48 ++++++++++++++++++++++++
19 2 files changed, 49 insertions(+), 1 deletion(-)
20
21 diff --git a/dev-java/xerial-core/metadata.xml b/dev-java/xerial-core/metadata.xml
22 index 779bb7bdf601..7661bbcec79a 100644
23 --- a/dev-java/xerial-core/metadata.xml
24 +++ b/dev-java/xerial-core/metadata.xml
25 @@ -6,6 +6,6 @@
26 <name>Java</name>
27 </maintainer>
28 <upstream>
29 - <remote-id type="google-code">xerial</remote-id>
30 + <remote-id type="github">xerial/xerial-java</remote-id>
31 </upstream>
32 </pkgmetadata>
33
34 diff --git a/dev-java/xerial-core/xerial-core-2.0.1-r1.ebuild b/dev-java/xerial-core/xerial-core-2.0.1-r1.ebuild
35 new file mode 100644
36 index 000000000000..93fd310af6bb
37 --- /dev/null
38 +++ b/dev-java/xerial-core/xerial-core-2.0.1-r1.ebuild
39 @@ -0,0 +1,48 @@
40 +# Copyright 1999-2022 Gentoo Authors
41 +# Distributed under the terms of the GNU General Public License v2
42 +
43 +# Skeleton command:
44 +# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri mirror://gentoo/distfiles/4f/xerial-core-2.0.1.tar.bz2 --slot 0 --keywords "~amd64 ~x86" --ebuild xerial-core-2.0.1-r1.ebuild
45 +
46 +EAPI=8
47 +
48 +JAVA_PKG_IUSE="doc source test"
49 +MAVEN_ID="org.xerial:xerial-core:2.0.1"
50 +JAVA_TESTING_FRAMEWORKS="junit-4"
51 +
52 +inherit java-pkg-2 java-pkg-simple
53 +
54 +DESCRIPTION="Core library of the Xerial project."
55 +HOMEPAGE="https://xerial.org"
56 +# SRC_URI="https://github.com/xerial/xerial-java/archive/refs/tags/xerial-core-${PV}.tar.gz"
57 +# Downloading from github is broken
58 +SRC_URI="https://dev.gentoo.org/~ercpe/distfiles/${CATEGORY}/${PN}/${P}.tar.bz2"
59 +
60 +LICENSE="Apache-2.0"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~x86"
63 +
64 +DEPEND=">=virtual/jdk-1.8:*"
65 +RDEPEND=">=virtual/jre-1.8:*"
66 +
67 +S="${WORKDIR}/${P}"
68 +
69 +JAVA_SRC_DIR="src/main/java"
70 +JAVA_RESOURCE_DIRS="src/main/java"
71 +
72 +JAVA_TEST_GENTOO_CLASSPATH="junit-4"
73 +JAVA_TEST_SRC_DIR="src/test/java"
74 +JAVA_TEST_RESOURCE_DIRS=(
75 + "src/test/java"
76 + "src/test/resources"
77 +)
78 +
79 +src_test() {
80 + # 1) listResoucesInJAR(org.xerial.util.FileResourceTest)
81 + # java.lang.AssertionError: at least one resource must be found in org.junit.runner
82 + local vm_version="$(java-config -g PROVIDES_VERSION)"
83 + if [[ "${vm_version}" != "1.8" ]] ; then
84 + JAVA_TEST_EXCLUDES+=( "org.xerial.util.FileResourceTest" )
85 + fi
86 + java-pkg-simple_src_test
87 +}