• [gentoo-dev] [PATCH] java-pkg-simple.eclass: fix a problem in multi-rel

    From Volkmar W. Pogatzki@21:1/5 to All on Sun May 18 08:40:01 2025
    There was too much of '--release ${version}' leading to validation
    errors and preventing successful creation of the jar when packaging
    (jar --create -f ) dev-java/fastdoubleparser. Removing it and changing
    the output directory of multi-release classes solves the problem and
    allows removal of the multi_release variable.

    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    ---
    eclass/java-pkg-simple.eclass | 29 +++++++++++------------------
    1 file changed, 11 insertions(+), 18 deletions(-)

    diff --git a/eclass/java-pkg-simple.eclass b/eclass/java-pkg-simple.eclass index 0cce6a2cdfa8..40271156bb3a 100644
    --- a/eclass/java-pkg-simple.eclass
    +++ b/eclass/java-pkg-simple.eclass
    @@ -598,7 +598,7 @@ java-pkg-simple_src_compile() {

    # compile sources in ${reldir}
    ejavac \
    - -d target/versions/${release} \
    + -d ${classes}/META-INF/versions/${release} \
    -encoding ${JAVA_ENCODING} \
    -classpath "${modulepath}:${JAVA_INTERMEDIATE_JAR_NAME}.jar" \
    --module-path "${modulepath}:${JAVA_INTERMEDIATE_JAR_NAME}.jar" \
    @@ -606,7 +606,7 @@ java-pkg-simple_src_compile() {
    --patch-module "${JAVA_INTERMEDIATE_JAR_NAME}"="${JAVA_INTERMEDIATE_JAR_NAME}.jar" \
    ${JAVAC_ARGS} $(find ${reldir} -type f -name '*.java')

    - JAVA_GENTOO_CLASSPATH_EXTRA+=":target/versions/${release}"
    + JAVA_GENTOO_CLASSPATH_EXTRA+=":${classes}/META-INF/versions/