* [gentoo-java] Support for relocating javatoolkit.
@ 2008-04-14 11:33 Alistair Bush
0 siblings, 0 replies; only message in thread
From: Alistair Bush @ 2008-04-14 11:33 UTC (permalink / raw
To: gentoo-java
Ok so I was mean't to apply a patch ages ago but it never happened. So
here is my second (and last) attempt.
Things to note:
* when calling xml-rewrite-2.py all calls are "routed" thru
java-ant_xml-rewrite()
* java-ant_xml-rewrite dies by calling _bsfix_die
* some calls to xml-rewriter-2.py have therefore lost a little bit of
flexibility wrt the error message they display.
Have tested, passes with old javatoolkit so no worry there. New layout
still requires work.
You have 24 hours to complain.
Alistair
diff -Naur /usr/portage/eclass/java-ant-2.eclass
~/gentoo/cvs/gentoo-x86/eclass/java-ant-2.eclass
--- /usr/portage/eclass/java-ant-2.eclass 2008-03-06
08:36:24.000000000 +1300
+++ /home/alistair/gentoo/cvs/gentoo-x86/eclass/java-ant-2.eclass
2008-04-13 19:13:36.000000000 +1200
@@ -240,29 +240,33 @@
# for javadoc target and all in one pass, we need the
new rewriter.
local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py"
+ # xml-rewrite will be moving.
+ if [[ ! -f ${rewriter3} ]]; then
+
rewriter3="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-3.py"
+ fi
+
if [[ ! -f ${rewriter3} ]]; then
debug-print "Using second generation rewriter"
eval echo "Rewriting source attributes" ${output}
- eval xml-rewrite-2.py ${files} \
+ java-ant_xml-rewrite ${files} \
-c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// /
-e } \
- -a source -v ${want_source} ${output} ||
_bsfix_die "xml-rewrite2 failed: ${file}"
+ -a source -v ${want_source} ${output}
eval echo "Rewriting target attributes" ${output}
- eval xml-rewrite-2.py ${files} \
+ java-ant_xml-rewrite ${files} \
-c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// /
-e } \
- -a target -v ${want_target} ${output} ||
_bsfix_die "xml-rewrite2 failed: ${file}"
+ -a target -v ${want_target} ${output}
eval echo "Rewriting nowarn attributes" ${output}
- eval xml-rewrite-2.py ${files} \
+ java-ant_xml-rewrite ${files} \
-c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// /
-e } \
- -a nowarn -v yes ${output} || _bsfix_die
"xml-rewrite2 failed: ${file}"
+ -a nowarn -v yes ${output}
if [[ ${JAVA_ANT_REWRITE_CLASSPATH} ]]; then
eval echo "Adding gentoo.classpath to
javac tasks" ${output}
- eval xml-rewrite-2.py ${files} \
+ java-ant_xml-rewrite ${files} \
-c -e javac -e xjavac -a
classpath -v \
- '\${gentoo.classpath}' \
- || _bsfix_die "xml-rewrite2 failed"
+ '\${gentoo.classpath}'
fi
else
debug-print "Using third generation rewriter"
@@ -399,10 +403,14 @@
# Run the right xml-rewrite binary with the given arguments
#
------------------------------------------------------------------------------
java-ant_xml-rewrite() {
- local gen2="/usr/bin/xml-rewrite-2.py"
# gen1 is deprecated
+ local gen2="/usr/bin/xml-rewrite-2.py"
+ #gen2 xml-rewrite will be moving.
+ if [[ ! -x "${gen2}" ]]; then
+ gen2="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
+ fi
if [[ -x "${gen2}" ]]; then
- ${gen2} "${@}" || die "${gen2} failed"
+ ${gen2} "${@}" || _bsfix_die "xml-rewrite2 failed : ${@}"
else
eerror "No binary for rewriting found."
eerror "Do you have dev-java/javatoolkit installed?"
--
gentoo-java@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-14 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 11:33 [gentoo-java] Support for relocating javatoolkit Alistair Bush
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox