summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/json/Manifest1
-rw-r--r--dev-java/json/json-20240303.ebuild81
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-java/json/Manifest b/dev-java/json/Manifest
index 05f94127628e..d2c92e99c74d 100644
--- a/dev-java/json/Manifest
+++ b/dev-java/json/Manifest
@@ -1,4 +1,5 @@
DIST json-20231013.tar.gz 240211 BLAKE2B c0594f89c2b02273c736c0fc362f1e3d519d3d88b7e708e64bbd5ca202f539368e9856e311dd9ad42a24c317cfd727feed5af215fbc5e9bbcb18e797323684c8 SHA512 4c5eb3e9ef77825c9e7b874c9084b5bb75b39c527c3cb419fc45171e0d11b24796931a2d16255500ed86610da3ac7805b302ec0b1051f97c97795580dca7c183
DIST json-20240205.tar.gz 245788 BLAKE2B 2c4fa44aa16a53cce153879af6a31364e21e9cc140bc7472535d2a8d2d0fc346502fd4a6e5022d326c80fe23557ce4ce408faf142bcdeec0c9b22aca13b044df SHA512 55e79510819b8e318e15b04cab317fdfd9785ac6b8fe60ef740b2f1eb7298548622556b968def89f4f2eb7761765149f192747b0966698b431cfeb9f2ea72284
+DIST json-20240303.tar.gz 245665 BLAKE2B 3462398895ab6da9610dac8851f2aa4528359e255015fd59a160fe99443819fa5bb57eb30ce177238d06abe95aaae9847cc85e4eee59c90edf7732bd823d9b89 SHA512 22465216eca7e4721aacca7b519d0bf1b0fe20b2de68ef0b6c62feae811e11203bfc733d8e9c97e2aa5b6ed30c74eefc601025b31807e51d496666412516afc9
DIST json-path-2.1.0.jar 189658 BLAKE2B 2813abfc3b6c758f600bb5e8f8b73eac8dc2a642d461bc26c569a650378ea65cebf691afe975fa2dca406eb324863c36c4623b21c1df2cb83c92e6859b5a9d85 SHA512 c16fc68a04945ad49eb96c38f68a8b4ff351ab1bbc51685f42d22723b2dee4b827ba45cb6b8167199e3f4d22e668ef58665558beec8e11399ac547e9fcebd9f6
DIST json-path-2.9.0.jar 276633 BLAKE2B bb83d6c6d972ea05dce3ef9878c0db0b93d6168cb796b63365a4615434c24edaad86bf021d6bf8736d67504ed8803c423efe01a323e094a59854cd9e73eb6862 SHA512 9a9dbb2cd36662c8049419ed891290602baeca2549eb7df62122cb20c91e66bc8c2c0e5e13199c4a70bf0b6e62ea4c2601f84e4c79d2af25ff1704481c86740a
diff --git a/dev-java/json/json-20240303.ebuild b/dev-java/json/json-20240303.ebuild
new file mode 100644
index 000000000000..5e807e77efd0
--- /dev/null
+++ b/dev-java/json/json-20240303.ebuild
@@ -0,0 +1,81 @@
+# 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.json:json:${PV}"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple check-reqs
+
+DESCRIPTION="A reference implementation of a JSON package in Java"
+HOMEPAGE="https://github.com/stleary/JSON-java"
+JPV="2.9.0"
+SRC_URI="https://codeload.github.com/stleary/JSON-java/tar.gz/${PV} -> ${P}.tar.gz
+ test? (
+ https://repo1.maven.org/maven2/com/jayway/jsonpath/json-path/${JPV}/json-path-${JPV}.jar
+ )"
+S="${WORKDIR}/JSON-java-${PV}"
+
+LICENSE="JSON"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/asm:9
+ dev-java/json-smart:2
+ dev-java/mockito:4
+ dev-java/slf4j-api:0
+ )
+"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+DOCS=( {CONTRIBUTING,README,SECURITY}.md )
+
+JAVA_AUTOMATIC_MODULE_NAME="org.json"
+JAVA_SRC_DIR="src/main/java"
+
+JAVA_TEST_GENTOO_CLASSPATH="
+ asm-9
+ json-smart-2
+ junit-4
+ mockito-4
+ slf4j-api
+"
+JAVA_TEST_RESOURCE_DIRS="src/test/resources"
+JAVA_TEST_SRC_DIR="src/test/java"
+
+check_env() {
+ if use test; then
+ # this is needed only for tests
+ CHECKREQS_MEMORY="2048M"
+ check-reqs_pkg_pretend
+ fi
+}
+
+pkg_pretend() {
+ check_env
+}
+
+pkg_setup() {
+ check_env
+ java-pkg-2_pkg_setup
+}
+
+src_test() {
+ # setting Xms for bug #930723
+ # gradlew: DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"
+ JAVA_TEST_EXTRA_ARGS=" -Xmx${CHECKREQS_MEMORY}"
+ JAVA_GENTOO_CLASSPATH_EXTRA="${DISTDIR}/json-path-${JPV}.jar" # Test compile dependency
+
+ local vm_version="$(java-config -g PROVIDES_VERSION)"
+ if ver_test "${vm_version}" -ge 17; then
+ JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.lang=ALL-UNNAMED )
+ JAVA_TEST_EXTRA_ARGS+=( --add-opens=java.base/java.io=ALL-UNNAMED )
+ fi
+ java-pkg-simple_src_test
+}