eclass/java-{ant,utils}: updated for new javatoolkit layout
authorMiroslav Šulc <fordfrog@gentoo.org>
Wed, 30 Oct 2019 20:25:00 +0000 (21:25 +0100)
committerMiroslav Šulc <fordfrog@gentoo.org>
Wed, 30 Oct 2019 20:27:17 +0000 (21:27 +0100)
Bug: https://bugs.gentoo.org/627440
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
eclass/java-ant-2.eclass
eclass/java-utils-2.eclass

index 1fd4feb39134c7f015be56014efc1cc1acfd1061..5be76953edd6add05adbea039428e165ea5d9627 100644 (file)
@@ -224,8 +224,13 @@ java-ant_bsfix_files() {
                        files+=( -f "${file}" )
                done
 
-               local rewriter3="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
-               local rewriter4="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/build-xml-rewrite"
+               if [ -e "${EPREFIX}/usr/libexec/javatoolkit" ]; then
+                       local rewriter3="${EPREFIX}/usr/libexec/javatoolkit/xml-rewrite-3.py"
+                       local rewriter4="${EPREFIX}/usr/libexec/javatoolkit/build-xml-rewrite"
+               else
+                       local rewriter3="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
+                       local rewriter4="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/build-xml-rewrite"
+               fi
 
                if [[ -x ${rewriter4} && ${JAVA_ANT_ENCODING} ]]; then
                        [[ ${JAVA_ANT_REWRITE_CLASSPATH} ]] && local gcp="-g"
@@ -375,11 +380,11 @@ java-ant_ignore-system-classes() {
 # @DESCRIPTION:
 # Run the right xml-rewrite binary with the given arguments
 java-ant_xml-rewrite() {
-       local gen2="${EPREFIX}/usr/bin/xml-rewrite-2.py"
        local gen2_1="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
+       local gen2_2="${EPREFIX}/usr/libexec/javatoolkit/xml-rewrite-2.py"
        # gen1 is deprecated
-       if [[ -x "${gen2}" ]]; then
-               ${gen2} "${@}" || die "${gen2} failed"
+       if [[ -x "${gen2_2}" ]]; then
+               ${gen2_2} "${@}" || die "${gen2_2} failed"
        elif [[ -x "${gen2_1}" ]]; then
                ${gen2_1} "${@}" || die "${gen2_1} failed"
        else
index 4f7eb0356fc982359a48d747c8fb7d6a12749204..e32cb572f147183a1eb07eee8980121d28332c8e 100644 (file)
@@ -2729,10 +2729,13 @@ java-pkg_jar-list() {
 java-pkg_verify-classes() {
        #$(find ${D} -type f -name '*.jar' -o -name '*.class')
 
-       local version_verify="/usr/bin/class-version-verify.py"
+       local version_verify_1="${EPREFIX}/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py"
+       local version_verify_2="${EPREFIX}/usr/libexec/javatoolkit/class-version-verify.py"
 
-       if [[ ! -x "${version_verify}" ]]; then
-               version_verify="/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py"
+       if [[ -x "${version_verify_1}" ]]; then
+               local version_verify=${version_verify_1}
+       else
+               local version_verify=${version_verify_2}
        fi
 
        if [[ ! -x "${version_verify}" ]]; then