public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/byte-buddy/
Date: Wed, 10 Aug 2022 08:27:30 +0000 (UTC)	[thread overview]
Message-ID: <1660119762.1505d7f95b7d62aa5c760777cca8ec0d3d357757.flow@gentoo> (raw)

commit:     1505d7f95b7d62aa5c760777cca8ec0d3d357757
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Wed Aug  3 11:13:31 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Aug 10 08:22:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1505d7f9

dev-java/byte-buddy: add 1.12.13

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/26720
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 dev-java/byte-buddy/Manifest                  |   1 +
 dev-java/byte-buddy/byte-buddy-1.12.13.ebuild | 153 ++++++++++++++++++++++++++
 2 files changed, 154 insertions(+)

diff --git a/dev-java/byte-buddy/Manifest b/dev-java/byte-buddy/Manifest
index 57136f2a7976..fffac52846d5 100644
--- a/dev-java/byte-buddy/Manifest
+++ b/dev-java/byte-buddy/Manifest
@@ -1,2 +1,3 @@
 DIST byte-buddy-1.12.10-sources.jar 1331398 BLAKE2B 8732ac81514de40d3d2ffd67ddca05ab9b8a5d0a7f240ee4591fd02b41f410f9e834f389aa898829fbae6082e14a090f87052f537b2b6293c7f8f98d4a5d0583 SHA512 15cb4330598d9259afa29aac0317f8e0e003eb76fb26052bba0714ad30453db721938be7d46fcc6a0c7bbe124bffe68dfee6fcf11a3e4030e99ef01d0ae3d461
 DIST byte-buddy-1.12.12.tar.gz 149937318 BLAKE2B 1a1bd0de97b47ace4c64649da3ae80dcb421a4d46e9b4f66e121accad94a99a2b81fa9aeaca99ae14cf1ef56feff5248d5700d6b056d490563bbc7ae9f07ace9 SHA512 bd8dc5b86ce456d5a907dd23643233bb001c15df5419aeed177d3b4f8054ab172d13244d0b3fef734e8232dfdd9339745d8112fa69e0be566b62459c198bf67a
+DIST byte-buddy-1.12.13.tar.gz 1721038 BLAKE2B 60aadbbb3b56e5ac2ecc2bb162653b769f4d4b913bd675457ce2fbf12a5777addc4beb2bb2e347d5956dbf1fbe6a6dfce078a29c53b1f1e2a60585670897d4ee SHA512 88c221d0dccb248683069070e498c5d4320f4fce059c45f460e04fbd86c2c596c18a4c7f4e9b3a0480eaf96d93593d1f1af87d894a7c4b3d73511e88a95f4e92

diff --git a/dev-java/byte-buddy/byte-buddy-1.12.13.ebuild b/dev-java/byte-buddy/byte-buddy-1.12.13.ebuild
new file mode 100644
index 000000000000..c5c66b0dfca9
--- /dev/null
+++ b/dev-java/byte-buddy/byte-buddy-1.12.13.ebuild
@@ -0,0 +1,153 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Skeleton command:
+# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri https://github.com/raphw/byte-buddy/archive/byte-buddy-1.12.13.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild byte-buddy-1.12.13.ebuild
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="net.bytebuddy:byte-buddy-agent:1.12.13"
+JAVA_TESTING_FRAMEWORKS="junit-4"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Offers convenience for attaching an agent to the local or a remote VM"
+HOMEPAGE="https://bytebuddy.net"
+SRC_URI="https://github.com/raphw/${PN}/archive/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+DEPEND="
+	>=virtual/jdk-11:*
+	dev-java/asm:9
+	dev-java/findbugs-annotations:0
+	dev-java/jna:4
+	dev-java/jsr305:0
+	test? (
+		dev-java/mockito:4
+	)
+"
+
+RDEPEND="
+	>=virtual/jre-1.8:*
+"
+
+S="${WORKDIR}/${PN}-${P}"
+
+JAVA_CLASSPATH_EXTRA="
+	asm-9
+	findbugs-annotations
+	jsr305
+	jna-4
+"
+
+src_prepare() {
+	default
+	# https://github.com/raphw/byte-buddy/blob/byte-buddy-1.12.12/byte-buddy-agent/pom.xml#L132-L165
+	cat > byte-buddy-agent/src/main/java/module-info.java <<-EOF
+		module net.bytebuddy.agent {
+			requires java.instrument;
+			requires static jdk.attach;
+			requires static com.sun.jna;
+			requires static com.sun.jna.platform;
+			requires java.base;
+			exports net.bytebuddy.agent;
+			exports net.bytebuddy.agent.utility.nullability;
+		}
+	EOF
+
+	sed \
+		-e 's:verifyZeroInteractions:verifyNoInteractions:g' \
+		-i byte-buddy-dep/src/test/java/net/bytebuddy/*.java \
+		-i byte-buddy-dep/src/test/java/net/bytebuddy/*/*Test.java \
+		-i byte-buddy-dep/src/test/java/net/bytebuddy/*/*/*Test.java \
+		-i byte-buddy-dep/src/test/java/net/bytebuddy/*/*/*/*Test.java \
+		-i byte-buddy-dep/src/test/java/net/bytebuddy/*/*/*/*/*Test.java \
+		|| die
+}
+
+src_compile() {
+	einfo "Compiling byte-buddy-agent.jar"
+	JAVA_SRC_DIR="byte-buddy-agent/src/main/java"
+	JAVA_RESOURCE_DIRS="byte-buddy-agent/src/main/resources"
+	JAVA_JAR_FILENAME="byte-buddy-agent.jar"
+	java-pkg-simple_src_compile
+	JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy-agent.jar"
+	rm -r target || die
+
+# For pkgdiff to compare the content of module-info.class
+#	mkdir -p META-INF/versions/9 || die
+#	cp target/classes/module-info.class META-INF/versions/9/ || die
+#	jar -uf byte-buddy.jar -C . META-INF/versions/9/module-info.class || die
+
+	einfo "Compiling byte-buddy-dep.jar"
+	JAVA_SRC_DIR="byte-buddy-dep/src/main/java"
+	JAVA_RESOURCE_DIRS=()
+	JAVA_JAR_FILENAME="byte-buddy-dep.jar"
+	java-pkg-simple_src_compile
+	JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy-dep.jar"
+	rm -r target || die
+
+	if use doc; then
+		einfo "Compiling javadocs"
+		JAVA_SRC_DIR=(
+			"byte-buddy-agent/src/main/java"
+			"byte-buddy-dep/src/main/java"
+		)
+		JAVA_JAR_FILENAME="ignoreme.jar"
+		java-pkg-simple_src_compile
+	fi
+}
+
+src_test() {
+	JAVA_TEST_GENTOO_CLASSPATH="junit-4,mockito-4"
+
+	# einfo "Setting -Djava.library.path"
+	# This would work only after manually adding libjnidispatch.so to /usr/share/jna-4/lib/jna.jar,
+	# done with ( jar -uf /usr/share/jna-4/lib/jna.jar -C . com/sun/jna/linux-x86-64/libjnidispatch )
+#	JAVA_TEST_EXTRA_ARGS=( -Djava.library.path+="$(java-config -i jna-4)" com.sun.jna.Native )
+	# Otherwise fails with:
+	# Exception in thread "main" java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86-64/libjnidispatch.so) not found in resource path
+
+	einfo "Testing byte-buddy-agent"
+	JAVA_TEST_SRC_DIR="byte-buddy-agent/src/test/java"
+	# Native library (com/sun/jna/linux-x86-64/libjnidispatch.so) not found in resource path
+	JAVA_TEST_EXCLUDES=(
+		net.bytebuddy.agent.VirtualMachineAttachmentTest
+	)
+	java-pkg-simple_src_test
+
+	einfo "Testing byte-buddy-dep"
+	JAVA_TEST_SRC_DIR="byte-buddy-dep/src/test/java"
+	JAVA_TEST_RESOURCE_DIRS=(
+		byte-buddy-dep/src/test/resources
+		byte-buddy-dep/src/test/precompiled*
+	)
+
+	# what "mvn test" does with java 17 is:
+	# Tests run: 9855, Failures: 0, Errors: 0, Skipped: 0
+	JAVA_TEST_EXCLUDES+=(
+		net.bytebuddy.pool.TypePoolDefaultMethodDescriptionTest	# 39 tests
+		# v1.12.13
+		net.bytebuddy.build.CachedReturnPluginTest	# 44 tests
+		net.bytebuddy.build.CachedReturnPluginOtherTest	# 4 tests 
+	)
+	java-pkg-simple_src_test
+}
+
+src_install() {
+	java-pkg_dojar "byte-buddy-agent.jar"
+	java-pkg_dojar "byte-buddy-dep.jar"
+
+	if use doc; then
+		java-pkg_dojavadoc target/api
+	fi
+
+	if use source; then
+		java-pkg_dosrc "byte-buddy-agent/src/main/java/*"
+		java-pkg_dosrc "byte-buddy-dep/src/main/java/*"
+	fi
+}


             reply	other threads:[~2022-08-10  8:27 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10  8:27 Florian Schmaus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-04-05 10:56 [gentoo-commits] repo/gentoo:master commit in: dev-java/byte-buddy/ Miroslav Šulc
2023-04-04  5:10 Sam James
2023-04-03 21:40 Sam James
2023-04-03 21:40 Sam James
2023-04-03  8:11 Jakov Smolić
2023-03-04 13:03 Miroslav Šulc
2023-02-09 18:09 Arthur Zamarin
2023-02-09 18:09 Arthur Zamarin
2023-02-09 18:07 Sam James
2023-02-09 18:07 Sam James
2023-01-10 12:35 Florian Schmaus
2023-01-10 12:35 Florian Schmaus
2022-12-10 17:12 Arthur Zamarin
2022-12-10 14:56 Arthur Zamarin
2022-12-10 14:54 Arthur Zamarin
2022-12-10 14:33 Arthur Zamarin
2022-12-10 14:33 Arthur Zamarin
2022-10-17  4:49 Miroslav Šulc
2022-10-16 16:49 Sam James
2022-10-14 19:04 Sam James
2022-10-14 19:04 Sam James
2022-10-14  8:15 Arthur Zamarin
2022-09-16 18:58 Arthur Zamarin
2022-09-14 21:04 Sam James
2022-09-14 19:31 Arthur Zamarin
2022-09-14  9:35 Florian Schmaus
2022-09-09  8:08 Jakov Smolić
2022-09-09  8:08 Jakov Smolić
2022-08-23  4:41 Miroslav Šulc
2022-08-22  0:01 Sam James
2022-08-22  0:00 Sam James
2022-08-22  0:00 Sam James
2022-08-21 15:46 Arthur Zamarin
2022-08-21 15:46 Arthur Zamarin
2022-07-22 17:36 Florian Schmaus
2022-07-07 16:20 Arthur Zamarin
2022-07-07 14:29 Arthur Zamarin
2022-07-05 17:54 Sam James
2022-07-03 12:22 Jakov Smolić
2022-07-03 12:11 Jakov Smolić
2022-06-17 12:45 Arthur Zamarin
2022-06-16 15:15 Sam James
2022-06-16 15:15 Sam James
2022-06-03  8:54 Florian Schmaus
2022-04-15  9:36 Florian Schmaus
2022-04-10 15:16 Florian Schmaus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1660119762.1505d7f95b7d62aa5c760777cca8ec0d3d357757.flow@gentoo \
    --to=flow@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox