From: Alistair Bush <ali_bush@gentoo.org>
To: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] javatoolkit: new project layout
Date: Wed, 09 Jan 2008 22:04:02 +1300 [thread overview]
Message-ID: <47848E02.6030900@gentoo.org> (raw)
In-Reply-To: <47848A7E.50506@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 591 bytes --]
Even I can see the problem with the last java-ant-2.eclass patch....
no changes to java-utils-2 patch, just here for completeness.
Alistair Bush wrote:
> Ok here are 2 patches to support the moving of javatoolkit
>
> currently I have tested them on 1!! package!! so surely they are tree
> ready :)
>
> What do you think of them? Some parts are getting a bit messy but im
> unsure of how they could be cleaned up without breaking backwards comp.
>
> Alistair
>
> ps, im just about to do a re-emerge-everything-java.sh, we will see how
> it goes
>
> pss. Have I missed anything?
>
[-- Attachment #2: javatoolkit_java-ant-2.eclass.patch --]
[-- Type: text/plain, Size: 3381 bytes --]
--- java-ant-2.eclass.orig 2008-01-03 16:31:16.000000000 +1300
+++ java-ant-2.eclass 2008-01-09 22:01:53.000000000 +1300
@@ -224,7 +224,16 @@
else
local files
- [[ -x "/usr/bin/xml-rewrite-2.py" ]] && local using_new="true"
+ local using_new=""
+ local xml_rewrite_2="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
+ if [[ -x "${xml_rewrite_2}" ]]; then
+ using_new="true"
+ else
+ xml_rewrite_2="/usr/bin/xml-rewrite-2.py"
+ if [[ -x "${xml_rewrite_2}" ]]; then
+ using_new="true"
+ fi
+ fi
for file in "${@}"; do
debug-print "${FUNCNAME}: ${file}"
@@ -241,12 +250,17 @@
if [[ -z "${using_new}" ]]; then
echo "Rewriting $file (using xml-rewrite.py)"
+
+ local xml_rewrite="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite.py"
+ if [[ ! -x "${xml_rewrite}" ]]; then
+ xml_rewrite="/usr/bin/xml-rewrite.py"
+ fi
# Doing this twice because otherwise the source attributes would
# get added to target tags too and javadoc does not like target
- xml-rewrite.py -f "${file}" \
+ eval ${xml-rewrite} -f "${file}" \
-c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
-a source -v ${want_source} || _bsfix_die "xml-rewrite failed: ${file}"
- xml-rewrite.py -f "${file}" \
+ eval ${xml-rewrite} -f "${file}" \
-c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
-a target -v ${want_target} || _bsfix_die "xml-rewrite failed: ${file}"
fi
@@ -259,21 +273,25 @@
fi
# for javadoc target and all in one pass, we need the new rewriter.
- local rewriter3="/usr/share/javatoolkit/xml-rewrite-3.py"
+ local rewriter3="/usr/$(get_libdir)}/javatoolkit/bin/xml-rewrite-3.py"
+ if [[ ! -f ${rewriter3} ]]; then
+ rewriter3="/usr/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} \
+ eval ${xml_rewrite_2} ${files} \
-c -e ${JAVA_PKG_BSFIX_SOURCE_TAGS// / -e } \
-a source -v ${want_source} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
eval echo "Rewriting target attributes" ${output}
- eval xml-rewrite-2.py ${files} \
+ eval ${xml_rewrite_2} ${files} \
-c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
-a target -v ${want_target} ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
eval echo "Rewriting nowarn attributes" ${output}
- eval xml-rewrite-2.py ${files} \
+ eval ${xml_rewrite_2} ${files} \
-c -e ${JAVA_PKG_BSFIX_TARGET_TAGS// / -e } \
-a nowarn -v yes ${output} || _bsfix_die "xml-rewrite2 failed: ${file}"
else
@@ -410,10 +428,17 @@
# ------------------------------------------------------------------------------
java-ant_xml-rewrite() {
local bindir="${ROOT}/usr/bin/"
+ local newbindir="${ROOT}/usr/$(get_libdir)/javatoolkit/bin"
local gen2="${bindir}/xml-rewrite-2.py"
+ local gen2_1="${newbindir}/xml-rewrite-2.py"
local gen1="${bindir}/xml-rewrite.py"
- if [[ -x "${gen2}" ]]; then
+ local gen1_1="${newbindir}/xml-rewrite.py"
+ if [[ -x "${gen2_1}" ]]; then
+ ${gen2_1} "${@}" || die "${gen2_1} failed"
+ elif [[ -x "${gen2}" ]]; then
${gen2} "${@}" || die "${gen2} failed"
+ elif [[ -x "${gen1_1}" ]]; then
+ ${gen1_1} "${@}"
elif [[ -x "${gen1}" ]]; then
${gen1} "${@}" || die "${gen1} failed"
else
[-- Attachment #3: javatoolkit_java-utils-2.eclass.patch --]
[-- Type: text/plain, Size: 961 bytes --]
--- java-utils-2.eclass.orig 2008-01-09 21:34:56.000000000 +1300
+++ java-utils-2.eclass 2008-01-09 21:41:54.000000000 +1300
@@ -2606,15 +2606,19 @@
# ------------------------------------------------------------------------------
java-pkg_verify-classes() {
#$(find ${D} -type f -name '*.jar' -o -name '*.class')
+ local verifier="/usr/$(get_libdir)/javatoolkit/bin/class-version-verify.py"
+ if [[ ! -x "${verifier}" ]]; then
+ verifier="/usr/bin/class-version-verify.py"
+ fi
local target=$(java-pkg_get-target)
local result
local log="${T}/class-version-verify.log"
if [[ -n "${1}" ]]; then
- class-version-verify.py -v -t ${target} "${1}" > "${log}"
+ eval ${verifier} -v -t ${target} "${1}" > "${log}"
result=$?
else
ebegin "Verifying java class versions (target: ${target})"
- class-version-verify.py -v -t ${target} -r "${D}" > "${log}"
+ eval ${verifier} -v -t ${target} -r "${D}" > "${log}"
result=$?
eend ${result}
fi
next prev parent reply other threads:[~2008-01-09 9:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-05 12:16 [gentoo-java] javatoolkit: new project layout Alistair Bush
2008-01-05 12:31 ` Fabian Groffen
2008-01-05 21:29 ` Alistair Bush
2008-01-07 20:19 ` Fabian Groffen
2008-01-07 20:29 ` Petteri Räty
2008-01-07 20:42 ` Fabian Groffen
2008-01-07 23:33 ` Petteri Räty
2008-01-08 8:44 ` Fabian Groffen
2008-01-08 6:13 ` Alistair Bush
2008-01-08 8:47 ` Fabian Groffen
2008-01-09 8:49 ` Alistair Bush
2008-01-09 9:04 ` Alistair Bush [this message]
2008-01-10 5:46 ` Alistair Bush
2008-01-10 21:31 ` Vlastimil Babka
2008-01-10 23:51 ` Petteri Räty
2008-01-05 12:40 ` Vlastimil Babka
2008-01-05 21:46 ` Alistair Bush
2008-01-05 23:06 ` Alistair Bush
2008-01-05 23:21 ` Vlastimil Babka
2008-01-05 23:44 ` Petteri Räty
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=47848E02.6030900@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