From: Miroslav Šulc Date: Wed, 30 Oct 2019 20:25:00 +0000 (+0100) Subject: eclass/java-{ant,utils}: updated for new javatoolkit layout X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8cb182d6a7c9a6f75df73e64f15d34e077271405;p=gentoo.git eclass/java-{ant,utils}: updated for new javatoolkit layout Bug: https://bugs.gentoo.org/627440 Signed-off-by: Miroslav Šulc --- diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index 1fd4feb39134..5be76953edd6 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -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 diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index 4f7eb0356fc9..e32cb572f147 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -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