/[gentoo-x86]/eclass/java-ant-2.eclass
Gentoo

Diff of /eclass/java-ant-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.32 Revision 1.33
12# and xml-rewrite.py because they were so slow 12# and xml-rewrite.py because they were so slow
13# Petteri Räty (betelgeuse@gentoo.org) 13# Petteri Räty (betelgeuse@gentoo.org)
14# 14#
15# Licensed under the GNU General Public License, v2 15# Licensed under the GNU General Public License, v2
16# 16#
17# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.32 2008/04/15 09:33:36 ali_bush Exp $ 17# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.33 2008/06/18 10:27:22 ali_bush Exp $
18 18
19inherit java-utils-2 19inherit java-utils-2
20 20
21# This eclass provides functionality for Java packages which use 21# This eclass provides functionality for Java packages which use
22# ant to build. In particular, it will attempt to fix build.xml files, so that 22# ant to build. In particular, it will attempt to fix build.xml files, so that
238 local output=">/dev/null" 238 local output=">/dev/null"
239 fi 239 fi
240 240
241 # for javadoc target and all in one pass, we need the new rewriter. 241 # for javadoc target and all in one pass, we need the new rewriter.
242 local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py" 242 local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py"
243
244 if [[ ! -f ${rewriter3} ]]; then
245 rewriter3="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
246 fi
247
243 if [[ ! -f ${rewriter3} ]]; then 248 if [[ ! -f ${rewriter3} ]]; then
244 debug-print "Using second generation rewriter" 249 debug-print "Using second generation rewriter"
245 eval echo "Rewriting source attributes" ${output} 250 eval echo "Rewriting source attributes" ${output}
246 eval xml-rewrite-2.py ${files} \ 251 eval xml-rewrite-2.py ${files} \
247 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \ 252 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
398# @public java-ant_xml-rewrite 403# @public java-ant_xml-rewrite
399# Run the right xml-rewrite binary with the given arguments 404# Run the right xml-rewrite binary with the given arguments
400# ------------------------------------------------------------------------------ 405# ------------------------------------------------------------------------------
401java-ant_xml-rewrite() { 406java-ant_xml-rewrite() {
402 local gen2="/usr/bin/xml-rewrite-2.py" 407 local gen2="/usr/bin/xml-rewrite-2.py"
408 local gen2_1="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
403 # gen1 is deprecated 409 # gen1 is deprecated
404 if [[ -x "${gen2}" ]]; then 410 if [[ -x "${gen2}" ]]; then
405 ${gen2} "${@}" || die "${gen2} failed" 411 ${gen2} "${@}" || die "${gen2} failed"
412 elif [[ "${gen2_1}" ]]; then
413 ${gen2} "${@}" || die "${gen2_1} failed"
406 else 414 else
407 eerror "No binary for rewriting found." 415 eerror "No binary for rewriting found."
408 eerror "Do you have dev-java/javatoolkit installed?" 416 eerror "Do you have dev-java/javatoolkit installed?"
409 die "xml-rewrite not found" 417 die "xml-rewrite not found"
410 fi 418 fi

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.20