summaryrefslogtreecommitdiff
path: root/dev-java/byte-buddy
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-05 23:52:45 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-05 23:52:45 +0000
commit1c33e521c460dc40899ce7bc919602b842ce27e2 (patch)
tree580eefad4cce1e883e7504b93352a9029b53036d /dev-java/byte-buddy
parent65e4244e411c4f65f55f2aa91f39e228f4c0680b (diff)
gentoo auto-resync : 05:03:2023 - 23:52:45
Diffstat (limited to 'dev-java/byte-buddy')
-rw-r--r--dev-java/byte-buddy/Manifest2
-rw-r--r--dev-java/byte-buddy/byte-buddy-1.14.0.ebuild161
2 files changed, 163 insertions, 0 deletions
diff --git a/dev-java/byte-buddy/Manifest b/dev-java/byte-buddy/Manifest
index d39f403eb502..9e785994920b 100644
--- a/dev-java/byte-buddy/Manifest
+++ b/dev-java/byte-buddy/Manifest
@@ -1,3 +1,5 @@
DIST byte-buddy-1.12.21.tar.gz 1931819 BLAKE2B 6b37b21d5f31c1564a3cc4d30870a7eca3c4c0512815db881a20602dc7ac970145dd9cc2bd6af4f2fdca0ff542b43dc675376c91f7ea7fdf3ea306112eba842b SHA512 9513caa9a5fc0924aea46e8de21ad2ad90320a582ad17be93f6305eb27f98d3af2c3fa09565083b5d97c0d9f0a1b0a9c7105738c4b65616e78bf2e7657c4ee76
+DIST byte-buddy-1.14.0.tar.gz 1989303 BLAKE2B c284f54ebc6bf67e4706380f0876f403fcf5ae172a690888d13d6b3399cf41bf1fd8890bf15059f71a9457ec6343254ad1f421f8e4975aa70dd9a2103ab59610 SHA512 e6ccda287935b5ff7104d5c0e4904b0595918a21bcc90c6ac5b2358cc0371b22a4fcac2a95dde9e377c5d1e43077c8b57ea9520a9093b2380ab53c830f107ced
EBUILD byte-buddy-1.12.21.ebuild 4845 BLAKE2B 1464adfb8d4e25f149a6125e95b2b1befceb4963f66df40d42546fc39874aeb70b93949616afee90098b2b473daa8e53cb7c2047399ff9bbf74902ca00cebe8f SHA512 4c1a8dec6ea9a423b5dd45926322c431347631ec50223cae1a0ba63b9667d361c44dc3118b5a2da4a9c6dbc7a5070b0b6e04adbb2fccf48a429169dbb36b5a19
+EBUILD byte-buddy-1.14.0.ebuild 4849 BLAKE2B 72a46c884f59290637f485db774fc112e61aad43d47d6740df11e9bfede3a1ac6bda8816ea0f43f3c52060f4892432478ec5db2b786553dfd948ca314125e816 SHA512 59b2a36dc62527739442a201363536c6a92860968990c3562af97caafef0dafd387d5f708e14efd6de0e0ca2b42922a1499a75f27fdb03e5ac795917fbc9f54f
MISC metadata.xml 440 BLAKE2B ef73e69de33dc6bbea38c81b8744fad5ce4764644d9cc6168d7c0f175856e30c3a577ffc597f25f8caf26bacfd80663b55eddde047a346fcb582d883269233b9 SHA512 b27c92e768c2783c90c8b4693c3265a9533a09abe76b2b3bd54e3865d270eed91414fcd89513bc30feb0243ea21f63d354b907b74eb18e98f899811101a6c956
diff --git a/dev-java/byte-buddy/byte-buddy-1.14.0.ebuild b/dev-java/byte-buddy/byte-buddy-1.14.0.ebuild
new file mode 100644
index 000000000000..f1f274b658eb
--- /dev/null
+++ b/dev-java/byte-buddy/byte-buddy-1.14.0.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2023 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.23.tar.gz --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild byte-buddy-1.12.23.ebuild
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_PROVIDES="net.bytebuddy:byte-buddy-agent:1.12.23 net.bytebuddy:byte-buddy:1.12.23"
+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/byte-buddy/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}/byte-buddy-${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.20/byte-buddy-agent/pom.xml#L142-L176
+ cat > byte-buddy-agent/src/main/java/module-info.java <<-EOF || die
+ 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
+
+ # instead of shading byte-buddy-dep we move it into byte-buddy.
+ mv byte-buddy{-dep,}/src/main/java || die "cannot move sources"
+
+ # https://github.com/raphw/byte-buddy/blob/byte-buddy-1.12.20/byte-buddy/pom.xml#L159-L195
+ local exports="$( \
+ sed -n '/<packages.list.external>/,/<\/packages.list.external/p' \
+ byte-buddy/pom.xml \
+ | sed -e 's:^:exports :' -e 's:,:;:' \
+ | grep -v 'packages.list.external\|shade' | tr -s '[:space:]' \
+ )" || die
+ cat > byte-buddy/src/main/java/module-info.java <<-EOF || die
+ module net.bytebuddy {
+ requires static java.instrument;
+ requires static java.management;
+ requires static jdk.unsupported;
+ requires static net.bytebuddy.agent;
+ requires static com.sun.jna;
+ requires static com.sun.jna.platform;
+ requires java.base;
+ ${exports}
+ }
+ EOF
+}
+
+src_compile() {
+ einfo "Compiling byte-buddy-agent.jar"
+ JAVA_JAR_FILENAME="byte-buddy-agent.jar"
+ JAVA_RESOURCE_DIRS="byte-buddy-agent/src/main/resources"
+ JAVA_SRC_DIR="byte-buddy-agent/src/main/java"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy-agent.jar"
+ rm -r target || die
+
+ einfo "Compiling byte-buddy.jar"
+ JAVA_JAR_FILENAME="byte-buddy.jar"
+ JAVA_MAIN_CLASS="net.bytebuddy.build.Plugin\$Engine\$Default"
+ JAVA_RESOURCE_DIRS=()
+ JAVA_SRC_DIR="byte-buddy/src/main/java"
+ java-pkg-simple_src_compile
+ JAVA_GENTOO_CLASSPATH_EXTRA+=":byte-buddy.jar"
+ rm -r target || die
+
+ if use doc; then
+ einfo "Compiling javadocs"
+ rm byte-buddy-agent/src/main/java/module-info.java || die
+ JAVA_SRC_DIR=(
+ "byte-buddy-agent/src/main/java"
+ "byte-buddy/src/main/java"
+ )
+ JAVA_JAR_FILENAME="ignoreme.jar"
+ java-pkg-simple_src_compile
+ fi
+}
+
+src_test() {
+ # instead of shading byte-buddy-dep we move it into byte-buddy.
+ mv byte-buddy{-dep,}/src/test || die "cannot move tests"
+
+ # @Ignore one of 4 tests, https://bugs.gentoo.org/863386
+ sed \
+ -e '/import org.junit.Test/a import org.junit.Ignore;' \
+ -e '/testIgnoreExistingField()/i @Ignore' \
+ -i byte-buddy/src/test/java/net/bytebuddy/build/CachedReturnPluginOtherTest.java || die
+
+ # @Ignore one of 39 tests, https://bugs.gentoo.org/863386
+ sed \
+ -e '/import org.junit.Test/a import org.junit.Ignore;' \
+ -e '/testNoParameterNameAndModifiers()/i @Ignore' \
+ -i byte-buddy/src/test/java/net/bytebuddy/description/method/AbstractMethodDescriptionTest.java || die
+
+ JAVA_TEST_GENTOO_CLASSPATH="junit-4,mockito-4"
+
+ einfo "Testing byte-buddy-agent"
+ # https://github.com/raphw/byte-buddy/issues/1321#issuecomment-1252776459
+ JAVA_TEST_EXTRA_ARGS=( -Dnet.bytebuddy.test.jnapath="${EPREFIX}/usr/$(get_libdir)/jna-4/" )
+ JAVA_TEST_SRC_DIR="byte-buddy-agent/src/test/java"
+ java-pkg-simple_src_test
+
+ einfo "Testing byte-buddy"
+ JAVA_TEST_RESOURCE_DIRS=( byte-buddy/src/test/{resources,precompiled*} )
+ JAVA_TEST_SRC_DIR="byte-buddy/src/test/java"
+
+ JAVA_TEST_EXCLUDES=(
+ # all tests in this class fail, https://bugs.gentoo.org/863386
+ net.bytebuddy.build.CachedReturnPluginTest
+ )
+ java-pkg-simple_src_test
+}
+
+src_install() {
+ java-pkg_dojar "byte-buddy-agent.jar"
+ java-pkg_dojar "byte-buddy.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/src/main/java/*"
+ fi
+}