diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-java/netty | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-java/netty')
-rw-r--r-- | dev-java/netty/Manifest | 3 | ||||
-rw-r--r-- | dev-java/netty/netty-4.1.35-r1.ebuild | 201 | ||||
-rw-r--r-- | dev-java/netty/netty-4.1.35.ebuild | 2 |
3 files changed, 204 insertions, 2 deletions
diff --git a/dev-java/netty/Manifest b/dev-java/netty/Manifest index 8c76a1116395..9a8eca0d8af1 100644 --- a/dev-java/netty/Manifest +++ b/dev-java/netty/Manifest @@ -1,3 +1,4 @@ DIST netty-4.1.35.Final.tar.gz 2447958 BLAKE2B 133adc2b37d3e681d11ac2e0187c0f79bb7aeeb6c622a1bf6e66a35bb78cd5730eeeffccfb960948f2e1df5dfadaa44f62b6f354c03065493ae43e1399a5ba2e SHA512 c3ba4e34ae9d309118ff3517467ffc218136789b06287d747b57df08be84779dacf5e29b19157afecd759a3516bc346e434295291b3dd546f80c4ae7c3f0a3ca -EBUILD netty-4.1.35.ebuild 5857 BLAKE2B e49556f1ec09208ba8e06631a075d0763c11c7e30928520756653378a84e9e58b23c4f013bfc75a9fb984b34581317ea1afc89113ed630bc61ac793687f09b5f SHA512 1ad81114c4e8c7c5bfe30dff43b0b2d768280bac5f30216d8f07c10a9104199efacfe8a64c9c77064b6d5f47627f1ebd8878bf3e900b3c308edb224a0c1a6a87 +EBUILD netty-4.1.35-r1.ebuild 5857 BLAKE2B 90e00e4ad92865522a5bc5a070aabb8f0980a49ea884d03dcb8af57c3310dabdded6d38b3d7bc403cfa2cb3a59abbf0e57c9c6ea58f2262a3d570d53fb9d2c6f SHA512 9049cfe4ecdacd07d3663df68c5f67aea1655154468ffd835efc9415034573e252f0b1a24089458550bc7e02ea45ac75e4661203e954974b72bf753af9a726ba +EBUILD netty-4.1.35.ebuild 5853 BLAKE2B a6f9664df891175234eb940606a8232a32ac7dbec4e6a2522bfabd0cc30cdfe7126e7c000f05460ba62791e9402c6bf2791b28180ce6844017fc9efa525db048 SHA512 2e5ddf7410b4f26b7559fd192dcc3242ccc4f84470a09abbc8a387a4c7a56fa2c62abf07619a83b82b8f10937d7589cde4e508ba61b18df9f9d1ca8dac0d74a3 MISC metadata.xml 507 BLAKE2B 821a563701bddd615a49743269e82ef5f906d5f30d957accbba10cda171b3a8943911733247e05efc9c28b40fd75396e78c2b28c3297a74b15ea8b716dc50ad1 SHA512 5c237af46f2d99e807ad5d442c83af2d1bbd85f3d3ed71e5dc3595c91d2e8104e5025216911e74901817cfd495eb6e96e22248bd1a05c90018c7d13b99d1d494 diff --git a/dev-java/netty/netty-4.1.35-r1.ebuild b/dev-java/netty/netty-4.1.35-r1.ebuild new file mode 100644 index 000000000000..fdac02193f25 --- /dev/null +++ b/dev-java/netty/netty-4.1.35-r1.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# Skeleton command: +# java-ebuilder --generate-ebuild --workdir . --pom common/pom.xml --download-uri https://codeload.github.com/netty/netty/tar.gz/netty-4.1.35.Final --slot 0 --keywords "~amd64 ~arm ~arm64 ~ppc64 ~x86" --ebuild netty-4.1.35.ebuild + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" +MAVEN_ID="io.netty:netty:4.1.35.Final" +JAVA_TESTING_FRAMEWORKS="junit-4" + +inherit java-pkg-2 java-pkg-simple + +DESCRIPTION="Async event-driven framework for high performance network applications" +HOMEPAGE="https://netty.io/" +SRC_URI="https://github.com/netty/netty/archive/refs/tags/netty-${PV}.Final.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +# We do not build the full range of modules provided by netty but only what +# was available before in netty-common, netty-buffer and netty-transport. +# Further modules might be added to the array. +NETTY_MODULES=( + "common" + "resolver" + "buffer" + "transport" +) + +# Common dependencies +# POM: common/pom.xml +# commons-logging:commons-logging:1.2 -> >=dev-java/commons-logging-1.2:0 +# log4j:log4j:1.2.17 -> >=dev-java/log4j-1.2.17:0 +# org.apache.logging.log4j:log4j-api:2.6.2 -> >=dev-java/log4j-api-2.17.1:2 +# org.jctools:jctools-core:2.1.1 -> !!!suitable-mavenVersion-not-found!!! +# org.slf4j:slf4j-api:1.7.21 -> >=dev-java/slf4j-api-1.7.32:0 + +# "Failed to load class org.slf4j.impl.StaticLoggerBinder" +# Using slf4j-simple instead of slf4j-api solves it. +# https://www.slf4j.org/codes.html +CP_DEPEND=" + dev-java/commons-logging:0 + dev-java/jctools-core:3 + dev-java/log4j-12-api:2 + dev-java/slf4j-simple:0 +" + +# Compile dependencies +# POM: common/pom.xml +# test? ch.qos.logback:logback-classic:1.1.7 -> !!!groupId-not-found!!! +# test? io.netty:netty-build:25 -> !!!artifactId-not-found!!! +# test? io.netty:netty-dev-tools:4.1.35.Final -> !!!artifactId-not-found!!! +# test? junit:junit:4.12 -> >=dev-java/junit-4.13.2:4 +# test? org.apache.logging.log4j:log4j-core:2.6.2 -> >=dev-java/log4j-core-2.17.1:2 +# test? org.hamcrest:hamcrest-library:1.3 -> >=dev-java/hamcrest-library-1.3:1.3 +# test? org.javassist:javassist:3.20.0-GA -> !!!groupId-not-found!!! +# test? org.mockito:mockito-core:2.18.3 -> >=dev-java/mockito-4.4.0:4 + +DEPEND=" + >=virtual/jdk-1.8:* + ${CP_DEPEND} + test? ( + dev-java/javassist:3 + dev-java/hamcrest-library:1.3 + dev-java/logback-classic:0 + dev-java/log4j-core:2 + dev-java/mockito:4 + ) +" + +RDEPEND=" + >=virtual/jre-1.8:* + ${CP_DEPEND} +" + +S="${WORKDIR}/netty-netty-${PV}.Final" + +JAVA_TEST_GENTOO_CLASSPATH="hamcrest-library-1.3,javassist-3,junit-4,logback-classic,log4j-core-2,mockito-4" + +# There were 12 failures: +# 1) testCompositeDirectBuffer(io.netty.buffer.ByteBufAllocatorTest) +# java.lang.InstantiationException +# at java.base/jdk.internal.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48) +# +# FAILURES!!! +# Tests run: 10015, Failures: 12 + +# There was 1 failure: +# 1) initializationError(io.netty.channel.BaseChannelTest) +# org.junit.runners.model.InvalidTestClassError: Invalid test class 'io.netty.channel.BaseChannelTest': +# 1. The class io.netty.channel.BaseChannelTest is not public. +# 2. Test class should have exactly one public constructor +# 3. No runnable methods +# +# FAILURES!!! +# Tests run: 10277, Failures: 1 + +JAVA_TEST_EXCLUDES=( + "io.netty.buffer.ByteBufAllocatorTest" + "io.netty.channel.BaseChannelTest" +) + +src_prepare() { + default + + sed \ + -e 's:verifyZeroInteractions:verifyNoInteractions:' \ + -i buffer/src/test/java/io/netty/buffer/UnpooledTest.java \ + -i transport/src/test/java/io/netty/channel/CompleteChannelFutureTest.java || die + + # transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java:262: error: reference to assertEquals is ambiguous + # assertEquals(1L, channel.readOutbound()); + # ^ + # both method assertEquals(long,long) in Assert and method assertEquals(Object,Object) in Assert match + rm transport/src/test/java/io/netty/channel/PendingWriteQueueTest.java || die +} + +src_compile() { + local module + # We loop over the modules list and compile the jar files. + for module in "${NETTY_MODULES[@]}"; do + JAVA_SRC_DIR=() + JAVA_RESOURCE_DIRS=() + JAVA_MAIN_CLASS="" + + JAVA_SRC_DIR=( + "$module/src/main/java" + "$module/src/module" + ) + + # Not all of the modules have resources. + if [[ -d $module/src/main/resources ]]; then \ + JAVA_RESOURCE_DIRS="$module/src/main/resources" + fi + + JAVA_JAR_FILENAME="$module.jar" + + einfo "Compiling netty-${module}" + java-pkg-simple_src_compile + + JAVA_GENTOO_CLASSPATH_EXTRA+=":$module.jar" + + rm -r target || die + + done + + if use doc; then + JAVA_SRC_DIR=() + JAVA_JAR_FILENAME="ignoreme.jar" + + for module in "${NETTY_MODULES[@]}" ; do + # Some modules don't have source code + if [[ -d $module/src/main/java/io ]]; then \ + JAVA_SRC_DIR+=( "$module/src/main/java" ) + fi + + done + + java-pkg-simple_src_compile + fi +} + +src_test() { + local module + for module in "${NETTY_MODULES[@]}"; do + JAVA_TEST_SRC_DIR="$module/src/test/java" + JAVA_TEST_RESOURCE_DIRS=() + + # Not all of the modules have test resources. + if [[ -d $module/src/test/resources ]]; then \ + JAVA_TEST_RESOURCE_DIRS="$module/src/test/resources" + fi + + einfo "Testing netty-${module}" + java-pkg-simple_src_test + done +} + +src_install() { + einstalldocs # https://bugs.gentoo.org/789582 + + local module + for module in "${NETTY_MODULES[@]}"; do + JAVA_MAIN_CLASS=$( sed -n 's:.*<mainClass>\(.*\)</mainClass>:\1:p' $module/pom.xml ) + java-pkg_dojar $module.jar + + # Some modules don't have source code + if [[ -d $module/src/main/java/org ]]; then + if use source; then + java-pkg_dosrc "$module/src/main/java/*" + fi + fi + done + + if use doc; then + java-pkg_dojavadoc target/api + fi +} diff --git a/dev-java/netty/netty-4.1.35.ebuild b/dev-java/netty/netty-4.1.35.ebuild index 16ffa4df654d..a59641a77cb8 100644 --- a/dev-java/netty/netty-4.1.35.ebuild +++ b/dev-java/netty/netty-4.1.35.ebuild @@ -18,7 +18,7 @@ SRC_URI="https://github.com/netty/netty/archive/refs/tags/netty-${PV}.Final.tar. LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +KEYWORDS="amd64 ~arm arm64 ppc64 x86" # We do not build the full range of modules provided by netty but only what # was available before in netty-common, netty-buffer and netty-transport. |