diff options
author | Florian Schmaus <flow@gentoo.org> | 2022-04-15 10:43:06 +0200 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2022-04-15 11:35:05 +0200 |
commit | 6c3a10a7a1cee9440e33cfbf7223cddb75584b81 (patch) | |
tree | 765683747ae2c78013651f6b909ca40017bcb342 /dev-java/netty | |
parent | dev-java/netty: initial import (diff) | |
download | gentoo-6c3a10a7a1cee9440e33cfbf7223cddb75584b81.tar.gz gentoo-6c3a10a7a1cee9440e33cfbf7223cddb75584b81.tar.bz2 gentoo-6c3a10a7a1cee9440e33cfbf7223cddb75584b81.zip |
dev-java/netty: style changes and minor fixes
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'dev-java/netty')
-rw-r--r-- | dev-java/netty/netty-4.1.35.ebuild | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/dev-java/netty/netty-4.1.35.ebuild b/dev-java/netty/netty-4.1.35.ebuild index fdc4a3046307..93c2ad37726c 100644 --- a/dev-java/netty/netty-4.1.35.ebuild +++ b/dev-java/netty/netty-4.1.35.ebuild @@ -14,7 +14,7 @@ inherit java-pkg-2 java-pkg-simple DESCRIPTION="Async event-driven framework for high performance network applications" HOMEPAGE="https://netty.io/" -SRC_URI="https://codeload.github.com/netty/netty/tar.gz/netty-${PV}.Final -> ${P}.Final.tar.gz" +SRC_URI="https://github.com/netty/netty/archive/refs/tags/netty-${PV}.Final.tar.gz" LICENSE="Apache-2.0" SLOT="0" @@ -23,7 +23,7 @@ KEYWORDS="~amd64" # 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. -modules=( +NETTY_MODULES=( "common" "resolver" "buffer" @@ -73,7 +73,8 @@ DEPEND=" RDEPEND=" >=virtual/jre-1.8:* - ${CP_DEPEND}" + ${CP_DEPEND} +" S="${WORKDIR}/netty-netty-${PV}.Final" @@ -118,15 +119,13 @@ src_prepare() { } src_compile() { + local module # We loop over the modules list and compile the jar files. - for module in "${modules[@]}" ; do \ - - JAVA_SRC_DIR="" - JAVA_RESOURCE_DIRS="" + for module in "${NETTY_MODULES[@]}"; do + JAVA_SRC_DIR=() + JAVA_RESOURCE_DIRS=() JAVA_MAIN_CLASS="" - echo "compiling $module" - JAVA_SRC_DIR=( "$module/src/main/java" "$module/src/module" @@ -139,6 +138,7 @@ src_compile() { JAVA_JAR_FILENAME="$module.jar" + einfo "Compiling netty-${module}" java-pkg-simple_src_compile JAVA_GENTOO_CLASSPATH_EXTRA+=":$module.jar" @@ -148,12 +148,10 @@ src_compile() { done if use doc; then - - JAVA_SRC_DIR="" + JAVA_SRC_DIR=() JAVA_JAR_FILENAME="ignoreme.jar" - for module in "${modules[@]}" ; do \ - + 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" ) @@ -166,38 +164,35 @@ src_compile() { } src_test() { - for module in "${modules[@]}" ; do \ - + local module + for module in "${NETTY_MODULES[@]}"; do JAVA_TEST_SRC_DIR="$module/src/test/java" - JAVA_TEST_RESOURCE_DIRS="" + 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 - for module in "${modules[@]}" ; do \ - + 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 [[ -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 |