From: Alistair Bush <ali_bush@gentoo.org>
To: gentoo-java@lists.gentoo.org
Subject: [gentoo-java] Support for relocating javatoolkit.
Date: Mon, 14 Apr 2008 23:33:34 +1200 [thread overview]
Message-ID: <4803410E.6040708@gentoo.org> (raw)
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
reply other threads:[~2008-04-14 11:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4803410E.6040708@gentoo.org \
--to=ali_bush@gentoo.org \
--cc=gentoo-java@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox