/[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.10 Revision 1.11
8# and xml-rewrite.py because they were so slow 8# and xml-rewrite.py because they were so slow
9# Petteri Räty (betelgeuse@gentoo.org) 9# Petteri Räty (betelgeuse@gentoo.org)
10# 10#
11# Licensed under the GNU General Public License, v2 11# Licensed under the GNU General Public License, v2
12# 12#
13# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.10 2006/12/27 18:46:01 betelgeuse Exp $ 13# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.11 2007/01/06 19:45:27 betelgeuse Exp $
14 14
15inherit java-utils-2 15inherit java-utils-2
16 16
17# This eclass provides functionality for Java packages which use 17# This eclass provides functionality for Java packages which use
18# ant to build. In particular, it will attempt to fix build.xml files, so that 18# ant to build. In particular, it will attempt to fix build.xml files, so that
129 [[ "${bsfix_these// /}" ]] && eval java-ant_bsfix_files ${bsfix_these} 129 [[ "${bsfix_these// /}" ]] && eval java-ant_bsfix_files ${bsfix_these}
130 130
131 popd > /dev/null 131 popd > /dev/null
132} 132}
133 133
134_bsfix_die() {
135 if has_version dev-python/pyxml; then
136 eerror "If the output above contains:"
137 eerror "ImportError:"
138 eerror "/usr/lib/python2.4/site-packages/_xmlplus/parsers/pyexpat.so:"
139 eerror "undefined symbol: PyUnicodeUCS2_DecodeUTF8"
140 eerror "Try re-emerging dev-python/pyxml"
141 die ${1} " Look at the eerror message above"
142 else
143 die ${1}
144 fi
145}
146
134# ------------------------------------------------------------------------------ 147# ------------------------------------------------------------------------------
135# @public java-ant_bsfix_files 148# @public java-ant_bsfix_files
136# 149#
137# Attempts to fix named build files. The following variables will affect its behavior 150# Attempts to fix named build files. The following variables will affect its behavior
138# as listed above: 151# as listed above:
176 189
177 if [[ -z "${using_new}" ]]; then 190 if [[ -z "${using_new}" ]]; then
178 vecho "Rewriting $file (using xml-rewrite.py)" 191 vecho "Rewriting $file (using xml-rewrite.py)"
179 # Doing this twice because otherwise the source attributes would 192 # Doing this twice because otherwise the source attributes would
180 # get added to target tags too and javadoc does not like target 193 # get added to target tags too and javadoc does not like target
181 xml-rewrite.py -f "${file}" -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } -a source -v ${want_source} || die "xml-rewrite failed: ${file}" 194 xml-rewrite.py -f "${file}" \
182 xml-rewrite.py -f "${file}" -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } -a target -v ${want_target} || die "xml-rewrite failed: ${file}" 195 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
196 -a source -v ${want_source} || _bsfix_die "xml-rewrite failed: ${file}"
197 xml-rewrite.py -f "${file}" \
198 -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
199 -a target -v ${want_target} || _bsfix_die "xml-rewrite failed: ${file}"
183 fi 200 fi
184 done 201 done
185 202
186 if [[ "${using_new}" ]]; then 203 if [[ "${using_new}" ]]; then
187 quiet_mode && local output=">/dev/null" 204 quiet_mode && local output=">/dev/null"
188 vecho "Rewriting source attributes" 205 vecho "Rewriting source attributes"
189 eval xml-rewrite-2.py ${files} \ 206 eval xml-rewrite-2.py ${files} \
190 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \ 207 -c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
191 -a source -v ${want_source} ${output} || die "xml-rewrite2 failed: ${file}" 208 -a source -v ${want_source} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
192 209
193 vecho "Rewriting target attributes" 210 vecho "Rewriting target attributes"
194 eval xml-rewrite-2.py ${files} \ 211 eval xml-rewrite-2.py ${files} \
195 -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \ 212 -c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
196 -a target -v ${want_target} ${output} || die "xml-rewrite2 failed: ${file}" 213 -a target -v ${want_target} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
197 fi 214 fi
198 215
199 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then 216 if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
200 for file in "${@}"; do 217 for file in "${@}"; do
201 diff -NurbB "${file}.orig" "${file}" 218 diff -NurbB "${file}.orig" "${file}"

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.20