* [gentoo-java] JAVA_ANT_ENCODING
@ 2008-07-01 19:02 Petteri Räty
0 siblings, 0 replies; only message in thread
From: Petteri Räty @ 2008-07-01 19:02 UTC (permalink / raw
To: Gentoo Java
[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]
Most of the time when Java files have !ascii characters they don't
specify the used encoding in build.xml (usually ISO-8859-1) and
javac/javadoc split out warnings about this (Many Gentoo machines are
probably running with UTF8 locales). For this reason you can add
JAVA_ANT_ENCODING="ISO-8859-1" to the ebuild and with the latest
javatoolkit the build.xml will get modified to specify the proper encoding.
Regards,
Petteri
[-- Attachment #1.2: java-ant-encoding.patch --]
[-- Type: text/plain, Size: 1877 bytes --]
Index: java-ant-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
retrieving revision 1.35
diff -u -r1.35 java-ant-2.eclass
--- java-ant-2.eclass 20 Jun 2008 10:32:15 -0000 1.35
+++ java-ant-2.eclass 1 Jul 2008 18:56:49 -0000
@@ -240,12 +245,22 @@
# 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 +431,8 @@
# ------------------------------------------------------------------------------
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"
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-01 19:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 19:02 [gentoo-java] JAVA_ANT_ENCODING Petteri Räty
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox