summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolkmar W. Pogatzki <gentoo@pogatzki.net>2022-07-01 13:18:12 +0200
committerFlorian Schmaus <flow@gentoo.org>2022-07-22 19:36:31 +0200
commite8e2547f893bda1be9263f4fbf8f107b4245696f (patch)
treeb70d1a9b6f1e8cb5d5970c0e9705595c4b5e850f /dev-java
parentdev-java/opentest4j: java 11 for module-info (diff)
downloadgentoo-e8e2547f893bda1be9263f4fbf8f107b4245696f.tar.gz
gentoo-e8e2547f893bda1be9263f4fbf8f107b4245696f.tar.bz2
gentoo-e8e2547f893bda1be9263f4fbf8f107b4245696f.zip
dev-java/mockito: switch to monolithic byte-buddy
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/mockito/mockito-4.6.1-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-java/mockito/mockito-4.6.1-r1.ebuild b/dev-java/mockito/mockito-4.6.1-r1.ebuild
new file mode 100644
index 000000000000..493246812dac
--- /dev/null
+++ b/dev-java/mockito/mockito-4.6.1-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Tests not enabled, wants junit-jupiter.
+# "${S}/settings.gradle.kts"
+JAVA_PKG_IUSE="doc source"
+MAVEN_ID="org.mockito:mockito-core:4.6.1"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Mockito mock objects library core API and implementation"
+HOMEPAGE="https://github.com/mockito/mockito"
+SRC_URI="https://github.com/mockito/mockito/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="4"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+CP_DEPEND="
+ dev-java/asm:9
+ >=dev-java/byte-buddy-1.12.12:0
+ dev-java/objenesis:0
+"
+
+DEPEND="
+ dev-java/junit:4
+ >=dev-java/opentest4j-1.2.0-r1:0
+ >=virtual/jdk-1.8:*
+ ${CP_DEPEND}
+"
+
+RDEPEND="
+ >=virtual/jre-1.8:*
+ ${CP_DEPEND}
+"
+
+S="${WORKDIR}/${P}"
+
+JAVA_CLASSPATH_EXTRA="
+ junit-4
+ opentest4j
+"
+
+JAVA_SRC_DIR="src/main/java"
+JAVA_AUTOMATIC_MODULE_NAME="org.mockito"
+
+src_prepare() {
+ default
+ sed \
+ -e 's:net.bytebuddy.jar.asm:org.objectweb.asm:' \
+ -i src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodAdvice.java \
+ -i src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java || die
+}