diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2008-07-01 19:02:21 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2008-07-01 19:02:21 +0000 |
commit | bda25c5e691d96a326d026e9a71c6d9c4a0282dc (patch) | |
tree | 0796b32052876ea2bed0ab4669b07fae06389cdf /eclass/java-ant-2.eclass | |
parent | Depend unconditionally on dev-python/apsw (#230363). (diff) | |
download | gentoo-2-bda25c5e691d96a326d026e9a71c6d9c4a0282dc.tar.gz gentoo-2-bda25c5e691d96a326d026e9a71c6d9c4a0282dc.tar.bz2 gentoo-2-bda25c5e691d96a326d026e9a71c6d9c4a0282dc.zip |
Add support for JAVA_ANT_ENCODING using build-xml-rewrite.
Diffstat (limited to 'eclass/java-ant-2.eclass')
-rw-r--r-- | eclass/java-ant-2.eclass | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/eclass/java-ant-2.eclass b/eclass/java-ant-2.eclass index 1a830d6dcd9e..f88f9eea9d26 100644 --- a/eclass/java-ant-2.eclass +++ b/eclass/java-ant-2.eclass @@ -14,7 +14,7 @@ # # Licensed under the GNU General Public License, v2 # -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.35 2008/06/20 10:32:15 ali_bush Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.36 2008/07/01 19:02:21 betelgeuse Exp $ inherit java-utils-2 @@ -240,12 +240,22 @@ java-ant_bsfix_files() { # for javadoc target and all in one pass, we need the new rewriter. local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py" - if [[ ! -f ${rewriter3} ]]; then rewriter3="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py" fi - if [[ ! -f ${rewriter3} ]]; then + local rewriter4="/usr/$(get_libdir)/javatoolkit/bin/build-xml-rewrite" + + if [[ -x ${rewriter4} && ${JAVA_ANT_ENCODING} ]]; then + [[ ${JAVA_ANT_REWRITE_CLASSPATH} ]] && local gcp="-g" + [[ ${JAVA_ANT_ENCODING} ]] && local enc="-e ${JAVA_ANT_ENCODING}" + eval echo "cElementTree rewriter" ${output} + debug-print "${rewriter4} extra args: ${gcp} ${enc}" + ${rewriter4} ${gcp} ${enc} \ + -c "${JAVA_PKG_BSFIX_SOURCE_TAGS}" source ${want_source} \ + -c "${JAVA_PKG_BSFIX_TARGET_TAGS}" target ${want_target} \ + "${@}" || die "build-xml-rewrite failed" + elif [[ ! -f ${rewriter3} ]]; then debug-print "Using second generation rewriter" eval echo "Rewriting source attributes" ${output} eval xml-rewrite-2.py ${files} \ @@ -392,9 +402,8 @@ java-ant_rewrite-classpath() { # ------------------------------------------------------------------------------ java-ant_ignore-system-classes() { debug-print-function ${FUNCNAME} $* - local file="${1}" - [[ -z "${1}" ]] && file=build.xml - echo "Changing ignoresystemclasses to true for available tasks" + local file=${1:-build.xml} + echo "Changing ignoresystemclasses to true for available tasks in ${file}" java-ant_xml-rewrite -f "${file}" --change \ -e available -a ignoresystemclasses -v "true" } |