From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 079F515838C for ; Fri, 19 Jan 2024 12:44:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BB5BBE2A5B; Fri, 19 Jan 2024 12:44:08 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 99AD1E2A5B for ; Fri, 19 Jan 2024 12:44:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A996C343241 for ; Fri, 19 Jan 2024 12:44:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 42AEA13AA for ; Fri, 19 Jan 2024 12:44:06 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1705668226.d589f4e4bbd55b37de3871f1a2bf5e59a679d177.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/java-pkg-simple.eclass X-VCS-Directories: eclass/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: d589f4e4bbd55b37de3871f1a2bf5e59a679d177 X-VCS-Branch: master Date: Fri, 19 Jan 2024 12:44:06 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a82a47d3-5c0c-421d-89f9-1b532f801910 X-Archives-Hash: c02d7171c48f2ac5fbb8aafee711ac1f commit: d589f4e4bbd55b37de3871f1a2bf5e59a679d177 Author: Manuel Mommertz desy de> AuthorDate: Wed Jan 17 13:14:41 2024 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Fri Jan 19 12:43:46 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d589f4e4 java-pkg-simple.eclass: cut possible prefix to allow integer comparison Signed-off-by: Manuel Mommertz desy.de> Signed-off-by: Miroslav Šulc gentoo.org> eclass/java-pkg-simple.eclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index 7bd2599a142d..990b09f73c00 100644 --- a/eclass/java-pkg-simple.eclass +++ b/eclass/java-pkg-simple.eclass @@ -367,7 +367,8 @@ java-pkg-simple_src_compile() { # gather sources # if target < 9, we need to compile module-info.java separately # as this feature is not supported before Java 9 - if [[ $(java-pkg_get-target) -lt 9 ]]; then + local target="$(java-pkg_get-target)" + if [[ ${target#1.} -lt 9 ]]; then find "${JAVA_SRC_DIR[@]}" -name \*.java ! -name module-info.java > ${sources} moduleinfo=$(find "${JAVA_SRC_DIR[@]}" -name module-info.java) else @@ -382,7 +383,7 @@ java-pkg-simple_src_compile() { java-pkg-simple_getclasspath java-pkg-simple_prepend_resources ${classes} "${JAVA_RESOURCE_DIRS[@]}" - if [[ -n ${moduleinfo} ]] || [[ $(java-pkg_get-target) -lt 9 ]]; then + if [[ -n ${moduleinfo} ]] || [[ ${target#1.} -lt 9 ]]; then ejavac -d ${classes} -encoding ${JAVA_ENCODING}\ ${classpath:+-classpath ${classpath}} ${JAVAC_ARGS} @${sources} else @@ -528,7 +529,8 @@ java-pkg-simple_src_test() { # gathering sources for testing # if target < 9, we need to compile module-info.java separately # as this feature is not supported before Java 9 - if [[ $(java-pkg_get-target) -lt 9 ]]; then + local target="$(java-pkg_get-target)" + if [[ ${target#1.} -lt 9 ]]; then find "${JAVA_TEST_SRC_DIR[@]}" -name \*.java ! -name module-info.java > ${test_sources} moduleinfo=$(find "${JAVA_TEST_SRC_DIR[@]}" -name module-info.java) else @@ -537,7 +539,7 @@ java-pkg-simple_src_test() { # compile if [[ -s ${test_sources} ]]; then - if [[ -n ${moduleinfo} ]] || [[ $(java-pkg_get-target) -lt 9 ]]; then + if [[ -n ${moduleinfo} ]] || [[ ${target#1.} -lt 9 ]]; then ejavac -d ${classes} -encoding ${JAVA_ENCODING}\ ${classpath:+-classpath ${classpath}} ${JAVAC_ARGS} @${test_sources} else