summaryrefslogtreecommitdiff
path: root/dev-java/jmock
diff options
context:
space:
mode:
Diffstat (limited to 'dev-java/jmock')
-rw-r--r--dev-java/jmock/Manifest2
-rw-r--r--dev-java/jmock/jmock-2.12.0.ebuild98
2 files changed, 100 insertions, 0 deletions
diff --git a/dev-java/jmock/Manifest b/dev-java/jmock/Manifest
index 8db6939969fa..57ebf3299033 100644
--- a/dev-java/jmock/Manifest
+++ b/dev-java/jmock/Manifest
@@ -1,6 +1,8 @@
AUX jmock-1.2.0-AbstractMo.patch 1193 BLAKE2B b822ccada923c92a421294549ffb9f02fffeffbd7a57bdc79e0749147a361ad2cd0fed6b5b63166d21078684b235312393fb7af63a3b293d0e8a7a1f18fa70eb SHA512 53ac2c2f603aa8685aa18737b96a05fa590ed9bda8208dc06ceca159eed7dcb609a01cfb113597fad335f5ceed89d796e448c4deaffd3076a29d57c6ed8f15ed
DIST jmock-1.2.0-jars.zip 153214 BLAKE2B 2c40696229018406f3b60559013b73b5331c223da6e2743830c4c9b8b728484b1ebed8fb347c240f50f6936c2fd1e4ee85b754315682047a87a14414effc3a48 SHA512 5290f1d14cbc3d0f223bdaf59716b037dbc021c8f39a3784d13af8d8be3edbddc5e2eb4754b80e78ae954daf12889210183e7e11c110012b4d9320344efe19da
+DIST jmock-2.12.0.tar.gz 111963 BLAKE2B d4b8c8c4ca68ed8dae3b4906e3163fa5e8e8ea8f4b993386d7fa605e0188dd43462550ae4833ab9dbfe68c24e15cf6d19a6f444ca57f666fdfe8b29734fd32f7 SHA512 b1ba12981e7379f5b07a29749c7640906c02f72f52158921d0ac02abf69c9c8c2dc753f4462ff0afa5807852a06f59a6da9ed9357ae7dc0303b0377a0e3da854
DIST jmock-2.6.1-jars.zip 1249841 BLAKE2B 87861dad7151000e1397a54d0ded7e49c3fd81fca64afd74d6176436f336be5b5e89f73be8c124cf086798f74aef4972303137529113e3c85ba93353f95e3a42 SHA512 7cd1d2e89dceb31c68ad3f702ad937b5de6ec77cc37e94be7aa53db2fc61d11aa40ec5aab225a3eeeba5064ad8384f10413ac05a9df97102c8e63f4209ea149e
EBUILD jmock-1.2.0-r2.ebuild 961 BLAKE2B 66253c0e57e4a2d44378f457e41a613fe8ea76c6c7f8760178ed706bc9b29ff2be3392d52997da22b3cdcef3d845ea4e606a639a9660ba64dc45a91edff9811c SHA512 37f94cfa6c76d6eb5a5053959c68a0e38e9acf6d1f8ada58f022fb79cd84d4c11a7e91acf09950dd86978395ccfad536b28efaf8f9ab923501edf3549ccd8c39
+EBUILD jmock-2.12.0.ebuild 2622 BLAKE2B 45a289d3cf0b16ed3d73fce43d9363844da4bb4d5f57838a18caf8f736ce144b59d9f735a9965cc27a9a4a551c384785f68f06cc261b6b5790605fc09d646b46 SHA512 c079df5429b14cb3879b3b6855dd0e0ff24d402da723c8c557646b1dd8d01033e180d1340ddcb6c8b0fa0f7d30f60533a2a9eb012e53c457a6a2ded7454eefcb
EBUILD jmock-2.6.1-r1.ebuild 825 BLAKE2B 5e066e2552eceb12ce383abf78f52573636db5c22ef94c2769fdeb48493d5256d68d5183313faa5fc9ef01b91415df0747c2f2ab4479342a949f83467f80dab7 SHA512 52e29c763963f8afce59474aeb77a06aa67695d4cbfb12b08e064813f216445a402b520b497305d7554f00386973c3313a6b00b926d991bf481a7fd15d620c18
MISC metadata.xml 233 BLAKE2B 2b385ca77219f08b2874b3a4a91a0c836d3cb45ec44b05babb33d590c56ceb5337ecb93a8450a37f8e6bbf4cfc1455892e8142d22e0a1d527d40361e2dce350b SHA512 1acc975a7dc3344bc63282d652ca00d8245970b58353b4fd00f09a4859db3eaba2dcd85e1537d424b7174e4f9c01c2ffb10ec6d107b5c895c9ca20730666de7f
diff --git a/dev-java/jmock/jmock-2.12.0.ebuild b/dev-java/jmock/jmock-2.12.0.ebuild
new file mode 100644
index 000000000000..56d262a4cbfe
--- /dev/null
+++ b/dev-java/jmock/jmock-2.12.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom jmock/pom.xml --download-uri https://github.com/jmock-developers/jmock-library/archive/2.12.0.tar.gz --slot 2 --keywords "~amd64 ~arm64 ~ppc64 ~x86" --ebuild jmock-2.12.0.ebuild
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.jmock:jmock:2.12.0"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="An expressive Mock Object library for Test Driven Development"
+HOMEPAGE="http://jmock.org/"
+SRC_URI="https://github.com/${PN}-developers/${PN}-library/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="2"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+DEPEND="
+ dev-java/asm:9
+ dev-java/bsh:0
+ dev-java/hamcrest:0
+ >=virtual/jdk-1.8:*
+ test? (
+ dev-java/findbugs-annotations:0
+ dev-java/jaxws-api:0
+ )
+"
+
+RDEPEND=">=virtual/jre-1.8:*"
+
+S="${WORKDIR}/jmock-library-${PV}"
+
+JAVA_TEST_GENTOO_CLASSPATH="
+ findbugs-annotations
+ jaxws-api
+ junit-4
+"
+JAVA_TEST_SRC_DIR="jmock/src/test/java"
+
+src_prepare() {
+ default
+ # We have "signed.jar" directly in ${S}, not in "../testjar/target/".
+ sed \
+ -e 's:\.\.\/testjar\/target\/\(signed.jar\):\1:' \
+ -i jmock/src/test/java/org/jmock/test/unit/lib/JavaReflectionImposteriserTests.java || die
+}
+
+src_compile() {
+ if use test; then
+ einfo "Compiling testjar"
+ JAVA_SRC_DIR="testjar/src/main/java"
+ JAVA_CLASSPATH_EXTRA="findbugs-annotations"
+ JAVA_JAR_FILENAME="signed.jar"
+ java-pkg-simple_src_compile
+ cp {,un}signed.jar || die
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":signed.jar:unsigned.jar"
+ rm -r target || die
+ fi
+
+ einfo "Compiling jmock.jar"
+ JAVA_SRC_DIR="jmock/src/main/java"
+ JAVA_CLASSPATH_EXTRA="
+ asm-9
+ bsh
+ hamcrest
+ "
+ JAVA_JAR_FILENAME="jmock.jar"
+ java-pkg-simple_src_compile
+
+ # Code generation according to jmock/pom.xml#L73-L90
+ "$(java-config -J)" \
+ -cp $(java-config --with-dependencies --classpath asm:9):${PN}.jar \
+ org.jmock.ExpectationsCreator
+
+ # Update jmock.jar with updated Expectations.class
+ jar ufv jmock.jar -C target/classes org/jmock/Expectations.class || die
+}
+
+src_test() {
+ # ${S}/pom.xml#L131-L143
+ pushd jmock/src/test/java || die
+ local JAVA_TEST_RUN_ONLY=$(find * \
+ \( -wholename "**/*Test.java" \
+ -o -wholename '**/*Tests.java' \)\
+ ! -wholename "**/Failing*TestCase.java" \
+ ! -wholename "**/VerifyingTestCaseTests$*" \
+ ! -wholename "**/Abstract*Test.java" \
+ )
+ popd
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//.java}"
+ JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}"
+ java-pkg-simple_src_test
+}