/[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.29 Revision 1.30
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.29 2008/02/13 19:44:15 betelgeuse Exp $ 17# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.30 2008/03/05 19:30:29 betelgeuse 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
108# Targets to fix the 'target' attribute in 108# Targets to fix the 'target' attribute in
109# 109#
110# default: javacdoc javac xjavac javac.preset 110# default: javacdoc javac xjavac javac.preset
111# ------------------------------------------------------------------------------ 111# ------------------------------------------------------------------------------
112JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"} 112JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"}
113
114# ------------------------------------------------------------------------------
115# @global JAVA_ANT_CLASSPATH_TAGS
116#
117# Targets to add the classpath attribute to
118#
119# default: javac xjavac
120# ------------------------------------------------------------------------------
121JAVA_ANT_CLASSPATH_TAGS="javac xjavac"
113 122
114# ------------------------------------------------------------------------------ 123# ------------------------------------------------------------------------------
115# @global JAVA_ANT_IGNORE_SYSTEM_CLASSES 124# @global JAVA_ANT_IGNORE_SYSTEM_CLASSES
116# 125#
117# Rewrites available tasks to ignore ant classpath. 126# Rewrites available tasks to ignore ant classpath.
342 351
343# ------------------------------------------------------------------------------ 352# ------------------------------------------------------------------------------
344# @public java-ant_rewrite-classpath 353# @public java-ant_rewrite-classpath
345# 354#
346# Adds 'classpath="${gentoo.classpath}"' to specified build file. 355# Adds 'classpath="${gentoo.classpath}"' to specified build file.
356# Affected by:
357# JAVA_ANT_CLASSPATH_TAGS
347# @param $1 - the file to rewrite (defaults to build.xml) 358# @param $1 - the file to rewrite (defaults to build.xml)
348# ------------------------------------------------------------------------------ 359# ------------------------------------------------------------------------------
349java-ant_rewrite-classpath() { 360java-ant_rewrite-classpath() {
350 debug-print-function ${FUNCNAME} $* 361 debug-print-function ${FUNCNAME} $*
351 362
358 369
359 cp "${file}" "${file}.orig" || die "failed to copy ${file}" 370 cp "${file}" "${file}.orig" || die "failed to copy ${file}"
360 371
361 chmod u+w "${file}" 372 chmod u+w "${file}"
362 373
363 java-ant_xml-rewrite -f "${file}" --change -e javac -e xjavac -a classpath -v '${gentoo.classpath}' 374 java-ant_xml-rewrite -f "${file}" --change \
375 -e ${JAVA_ANT_CLASSPATH_TAGS// / -e } -a classpath -v '${gentoo.classpath}'
364 376
365 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then 377 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
366 diff -NurbB "${file}.orig" "${file}" 378 diff -NurbB "${file}.orig" "${file}"
367 fi 379 fi
368} 380}

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.20