Added support to control rewritten tags to java-ant_rewrite-classpath
Petteri Räty <[email protected]> Wed, 05 Mar 2008 21:29:52 +0200
| Newsgroups | gmane.linux.gentoo.java |
|---|---|
| Message-ID | <[email protected]> |
See attached patch. Regards, Petteri
classpath-tags.patch
(text/plain, 1.6 KB)
Index: java-ant-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
retrieving revision 1.29
diff -u -r1.29 java-ant-2.eclass
--- java-ant-2.eclass 13 Feb 2008 19:44:15 -0000 1.29
+++ java-ant-2.eclass 5 Mar 2008 19:29:17 -0000
@@ -112,6 +112,15 @@
JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"}
# ------------------------------------------------------------------------------
+# @global JAVA_ANT_CLASSPATH_TAGS
+#
+# Targets to add the classpath attribute to
+#
+# default: javac xjavac
+# ------------------------------------------------------------------------------
+JAVA_ANT_CLASSPATH_TAGS="javac xjavac"
+
+# ------------------------------------------------------------------------------
# @global JAVA_ANT_IGNORE_SYSTEM_CLASSES
#
# Rewrites available tasks to ignore ant classpath.
@@ -344,6 +353,8 @@
# @public java-ant_rewrite-classpath
#
# Adds 'classpath="${gentoo.classpath}"' to specified build file.
+# Affected by:
+# JAVA_ANT_CLASSPATH_TAGS
# @param $1 - the file to rewrite (defaults to build.xml)
# ------------------------------------------------------------------------------
java-ant_rewrite-classpath() {
@@ -360,7 +371,8 @@
chmod u+w "${file}"
- java-ant_xml-rewrite -f "${file}" --change -e javac -e xjavac -a classpath -v '${gentoo.classpath}'
+ java-ant_xml-rewrite -f "${file}" --change \
+ -e ${JAVA_ANT_CLASSPATH_TAGS// / -e } -a classpath -v '${gentoo.classpath}'
if [[ -n "${JAVA_PKG_DEBUG}" ]]; then
diff -NurbB "${file}.orig" "${file}"
signature.asc
(application/pgp-signature, 252 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHzvSzcxLzpIGCsLQRAuV9AJ9FsyMZBqD5pSaeOCNcLcHCi32bYQCfWDfJ wnAltMC6Gapae/VyKU/pVg4= =zO2j -----END PGP SIGNATURE-----