Gentoo Archives: gentoo-commits

From: "Vlastimil Babka (caster)" <caster@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog java-ant-2.eclass
Date: Sat, 05 Oct 2013 13:41:03
Message-Id: 20131005134057.BE3342004C@flycatcher.gentoo.org
1 caster 13/10/05 13:40:57
2
3 Modified: ChangeLog java-ant-2.eclass
4 Log:
5 Convert comments for eclass manpages. Heavily based on work from ercpe, bug #476946.
6
7 Revision Changes Path
8 1.1008 eclass/ChangeLog
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1008&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1008&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1007&r2=1.1008
13
14 Index: ChangeLog
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
17 retrieving revision 1.1007
18 retrieving revision 1.1008
19 diff -u -r1.1007 -r1.1008
20 --- ChangeLog 5 Oct 2013 12:07:01 -0000 1.1007
21 +++ ChangeLog 5 Oct 2013 13:40:57 -0000 1.1008
22 @@ -1,6 +1,10 @@
23 # ChangeLog for eclass directory
24 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1007 2013/10/05 12:07:01 caster Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1008 2013/10/05 13:40:57 caster Exp $
27 +
28 + 05 Oct 2013; Vlastimil Babka <caster@g.o> java-ant-2.eclass:
29 + Convert comments for eclass manpages. Heavily based on work from ercpe, bug
30 + #476946.
31
32 05 Oct 2013; Vlastimil Babka <caster@g.o> ant-tasks.eclass:
33 Convert comments for eclass manpages. Almost completely based on work from
34
35
36
37 1.57 eclass/java-ant-2.eclass
38
39 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-ant-2.eclass?rev=1.57&view=markup
40 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-ant-2.eclass?rev=1.57&content-type=text/plain
41 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/java-ant-2.eclass?r1=1.56&r2=1.57
42
43 Index: java-ant-2.eclass
44 ===================================================================
45 RCS file: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v
46 retrieving revision 1.56
47 retrieving revision 1.57
48 diff -u -r1.56 -r1.57
49 --- java-ant-2.eclass 20 Apr 2013 18:23:57 -0000 1.56
50 +++ java-ant-2.eclass 5 Oct 2013 13:40:57 -0000 1.57
51 @@ -14,7 +14,18 @@
52 #
53 # Licensed under the GNU General Public License, v2
54 #
55 -# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.56 2013/04/20 18:23:57 sera Exp $
56 +# $Header: /var/cvsroot/gentoo-x86/eclass/java-ant-2.eclass,v 1.57 2013/10/05 13:40:57 caster Exp $
57 +
58 +# @ECLASS: java-ant-2.eclass
59 +# @MAINTAINER:
60 +# java@g.o
61 +# @AUTHOR:
62 +# kiorky (kiorky@××××××××××.net), Petteri Räty (betelgeuse@g.o)
63 +# @BLURB: eclass for ant based Java packages
64 +# @DESCRIPTION:
65 +# Eclass for Ant-based Java packages. Provides support for both automatic and
66 +# manual manipulation of build.xml files. Should be inherited after java-pkg-2
67 +# or java-pkg-opt-2 eclass.
68
69 inherit java-utils-2 multilib
70
71 @@ -22,22 +33,30 @@
72 # ant to build. In particular, it will attempt to fix build.xml files, so that
73 # they use the appropriate 'target' and 'source' attributes.
74
75 -# -----------------------------------------------------------------------------
76 -# @variable-preinherit WANT_ANT_TASKS
77 -# @variable-default ""
78 -#
79 -# Please see the description in java-utils-2.eclass.
80 +# @ECLASS-VARIABLE: WANT_ANT_TASKS
81 +# @DEFAULT_UNSET
82 +# @DESCRIPTION:
83 +# An $IFS separated list of ant tasks.
84 +# Ebuild can specify this variable before inheriting java-ant-2 eclass to
85 +# determine ANT_TASKS it needs. They will be automatically translated to
86 +# DEPEND variable and ANT_TASKS variable. JAVA_PKG_FORCE_ANT_TASKS can override
87 +# ANT_TASKS set by WANT_ANT_TASKS, but not the DEPEND due to caching.
88 +# Ebuilds that need to depend conditionally on certain tasks and specify them
89 +# differently for different eant calls can't use this simplified approach.
90 +# You also cannot specify version or anything else than ant-*.
91 +#
92 +# @CODE
93 +# WANT_ANT_TASKS="ant-junit ant-trax"
94 +# @CODE
95 +
96 +#The implementation of dependencies is handled by java-utils-2.eclass
97 #WANT_ANT_TASKS
98
99 -# -----------------------------------------------------------------------------
100 -# @variable-preinherit JAVA_ANT_DISABLE_ANT_CORE_DEP
101 -# @variable-default unset for java-pkg-2, true for java-pkg-opt-2
102 -#
103 +# @ECLASS-VARIABLE: JAVA_ANT_DISABLE_ANT_CORE_DEP
104 +# @DEFAULT_UNSET
105 +# @DESCRIPTION:
106 # Setting this variable non-empty before inheriting java-ant-2 disables adding
107 # dev-java/ant-core into DEPEND.
108 -
109 -# construct ant-speficic DEPEND
110 -# add ant-core into DEPEND, unless disabled
111 if [[ -z "${JAVA_ANT_DISABLE_ANT_CORE_DEP}" ]]; then
112 JAVA_ANT_E_DEPEND="${JAVA_ANT_E_DEPEND} >=dev-java/ant-core-1.8.2"
113 fi
114 @@ -70,79 +89,50 @@
115
116 DEPEND="${JAVA_ANT_E_DEPEND}"
117
118 -# ------------------------------------------------------------------------------
119 -# @global JAVA_PKG_BSFIX
120 -#
121 +# @ECLASS-VARIABLE: JAVA_PKG_BSFIX
122 +# @DESCRIPTION:
123 # Should we attempt to 'fix' ant build files to include the source/target
124 # attributes when calling javac?
125 -#
126 -# default: on
127 -# ------------------------------------------------------------------------------
128 JAVA_PKG_BSFIX=${JAVA_PKG_BSFIX:-"on"}
129
130 -# ------------------------------------------------------------------------------
131 -# @global JAVA_PKG_BSFIX_ALL
132 -#
133 +# @ECLASS-VARIABLE: JAVA_PKG_BSFIX_ALL
134 +# @DESCRIPTION:
135 # If we're fixing build files, should we try to fix all the ones we can find?
136 -#
137 -# default: yes
138 -# ------------------------------------------------------------------------------
139 JAVA_PKG_BSFIX_ALL=${JAVA_PKG_BSFIX_ALL:-"yes"}
140
141 -# ------------------------------------------------------------------------------
142 -# @global JAVA_PKG_BSFIX_NAME
143 -#
144 +# @ECLASS-VARIABLE: JAVA_PKG_BSFIX_NAME
145 +# @DESCRIPTION:
146 # Filename of build files to fix/search for
147 -#
148 -# default: build.xml
149 -# ------------------------------------------------------------------------------
150 JAVA_PKG_BSFIX_NAME=${JAVA_PKG_BSFIX_NAME:-"build.xml"}
151
152 -# ------------------------------------------------------------------------------
153 -# @global JAVA_PKG_BSFIX_TARGETS_TAGS
154 -#
155 +# @ECLASS-VARIABLE: JAVA_PKG_BSFIX_TARGET_TAGS
156 +# @DESCRIPTION:
157 # Targets to fix the 'source' attribute in
158 -#
159 -# default: javac xjavac javac.preset
160 -# ------------------------------------------------------------------------------
161 JAVA_PKG_BSFIX_TARGET_TAGS=${JAVA_PKG_BSFIX_TARGET_TAGS:-"javac xjavac javac.preset"}
162
163 -# ------------------------------------------------------------------------------
164 -# @global JAVA_PKG_BSFIX_SOURCE_TAGS
165 -#
166 +# @ECLASS-VARIABLE: JAVA_PKG_BSFIX_SOURCE_TAGS
167 +# @DESCRIPTION:
168 # Targets to fix the 'target' attribute in
169 -#
170 -# default: javacdoc javac xjavac javac.preset
171 -# ------------------------------------------------------------------------------
172 JAVA_PKG_BSFIX_SOURCE_TAGS=${JAVA_PKG_BSFIX_SOURCE_TAGS:-"javadoc javac xjavac javac.preset"}
173
174 -# ------------------------------------------------------------------------------
175 -# @global JAVA_ANT_CLASSPATH_TAGS
176 -#
177 +# @ECLASS-VARIABLE: JAVA_ANT_CLASSPATH_TAGS
178 +# @DESCRIPTION:
179 # Targets to add the classpath attribute to
180 -#
181 -# default: javac xjavac
182 -# ------------------------------------------------------------------------------
183 JAVA_ANT_CLASSPATH_TAGS="javac xjavac"
184
185 -# ------------------------------------------------------------------------------
186 -# @global JAVA_ANT_IGNORE_SYSTEM_CLASSES
187 -#
188 -# Rewrites available tasks to ignore ant classpath.
189 -#
190 -# default: off
191 -# ------------------------------------------------------------------------------
192 +# @ECLASS-VARIABLE: JAVA_ANT_IGNORE_SYSTEM_CLASSES
193 +# @DEFAULT_UNSET
194 +# @DESCRIPTION:
195 +# When set, <available> Ant tasks are rewritten to ignore Ant's runtime classpath.
196
197 case "${EAPI:-0}" in
198 0|1) : ;;
199 *) EXPORT_FUNCTIONS src_configure ;;
200 esac
201
202 -# ------------------------------------------------------------------------------
203 -# @eclass-src_configure
204 -#
205 -# src_configure rewrites the build.xml files
206 -# ------------------------------------------------------------------------------
207 +# @FUNCTION: java-ant-2_src_configure
208 +# @DESCRIPTION:
209 +# src_configure rewrites the build.xml files automatically, unless EAPI is undefined, 0 or 1.
210 java-ant-2_src_configure() {
211 # if java support is optional, don't perform this when the USE flag is off
212 if has java-pkg-opt-2 ${INHERITED}; then
213 @@ -159,15 +149,17 @@
214 touch "${T}/java-ant-2_src_configure-run"
215 }
216
217 -# ------------------------------------------------------------------------------
218 -# @private java-ant_bsfix
219 +# @FUNCTION: java-ant_bsfix
220 +# @INTERNAL
221 +# @DESCRIPTION:
222 +# Attempts to fix build files.
223 #
224 -# Attempts to fix build files. The following variables will affect its behavior
225 -# as listed above:
226 +# @CODE
227 +# Affected by variables:
228 # JAVA_PKG_BSFIX
229 # JAVA_PKG_BSFIX_ALL
230 # JAVA_PKG_BSFIX_NAME,
231 -# ------------------------------------------------------------------------------
232 +# @CODE
233 java-ant_bsfix() {
234 debug-print-function ${FUNCNAME} $*
235
236 @@ -210,11 +202,13 @@
237 fi
238 }
239
240 -# ------------------------------------------------------------------------------
241 -# @public java-ant_bsfix_files
242 +# @FUNCTION: java-ant_bsfix_files
243 +# @USAGE: <path/to/first/build.xml> [path/to/second.build.xml ...]
244 +# @DESCRIPTION:
245 +# Attempts to fix named build files.
246 #
247 -# Attempts to fix named build files. The following variables will affect its behavior
248 -# as listed above:
249 +# @CODE
250 +# Affected by variables:
251 # JAVA_PKG_BSFIX_SOURCE_TAGS
252 # JAVA_PKG_BSFIX_TARGET_TAGS
253 # JAVA_ANT_REWRITE_CLASSPATH
254 @@ -223,6 +217,7 @@
255 # directories
256 # JAVA_ANT_BSFIX_EXTRA_ARGS: You can use this to pass extra variables to the
257 # rewriter if you know what you are doing.
258 +# @CODE
259 #
260 # If JAVA_ANT_JAVADOC_INPUT_DIRS is set, we will turn on the adding of a basic
261 # javadoc target to the ant's build.xml with the javadoc xml-rewriter feature.
262 @@ -232,7 +227,6 @@
263
264 # When changing this function, make sure that it works with paths with spaces in
265 # them.
266 -# ------------------------------------------------------------------------------
267 java-ant_bsfix_files() {
268 debug-print-function ${FUNCNAME} $*
269
270 @@ -374,14 +368,16 @@
271 }
272
273
274 -# ------------------------------------------------------------------------------
275 -# @public java-ant_bsfix_one
276 -#
277 -# Attempts to fix named build file. The following variables will affect its behavior
278 -# as listed above:
279 +# @FUNCTION: java-ant_bsfix_one
280 +# @USAGE: <path/to/build.xml>
281 +# @DESCRIPTION:
282 +# Attempts to fix named build file.
283 +#
284 +# @CODE
285 +# Affected by variables:
286 # JAVA_PKG_BSFIX_SOURCE_TAGS
287 # JAVA_PKG_BSFIX_TARGET_TAGS
288 -# ------------------------------------------------------------------------------
289 +# @CODE
290 java-ant_bsfix_one() {
291 debug-print-function ${FUNCNAME} $*
292
293 @@ -393,14 +389,15 @@
294 java-ant_bsfix_files "${1}"
295 }
296
297 -# ------------------------------------------------------------------------------
298 -# @public java-ant_rewrite-classpath
299 -#
300 +# @FUNCTION: java-ant_rewrite-classpath
301 +# @USAGE: [path/to/build.xml]
302 +# @DESCRIPTION:
303 # Adds 'classpath="${gentoo.classpath}"' to specified build file.
304 +#
305 # Affected by:
306 # JAVA_ANT_CLASSPATH_TAGS
307 -# @param $1 - the file to rewrite (defaults to build.xml)
308 -# ------------------------------------------------------------------------------
309 +#
310 +# Parameter defaults to build.xml when not specified
311 java-ant_rewrite-classpath() {
312 debug-print-function ${FUNCNAME} $*
313
314 @@ -423,14 +420,13 @@
315 fi
316 }
317
318 -# ------------------------------------------------------------------------------
319 -# @public java-ant_remove-taskdefs
320 -#
321 -# Removes (named) taskdef elements from the file.
322 -# Options:
323 -# --name NAME : only remove taskdef with name NAME.
324 -# @param $1 - the file to rewrite (defaults to build.xml)
325 -# ------------------------------------------------------------------------------
326 +# @FUNCTION: java-ant_remove-taskdefs
327 +# @USAGE: [--name NAME] [path/to/build.xml]
328 +# @DESCRIPTION:
329 +# Removes (named) taskdef elements from the build.xml file.
330 +# When --name NAME is specified, only remove taskdef with name NAME. Otherwise,
331 +# all taskdefs are removed.
332 +# The file to rewrite defaults to build.xml when not specified.
333 java-ant_remove-taskdefs() {
334 debug-print-function ${FUNCNAME} $*
335 local task_name
336 @@ -455,12 +451,11 @@
337 [[ $? != 0 ]] && die "Removing taskdefs failed"
338 }
339
340 -# ------------------------------------------------------------------------------
341 -# @public java-ant_ignore-system-classes
342 -#
343 +# @FUNCTION: java-ant_ignore-system-classes
344 +# @USAGE: [path/to/build.xml]
345 +# @DESCRIPTION:
346 # Makes the available task ignore classes in the system classpath
347 -# @param $1 - the file to rewrite (defaults to build.xml)
348 -# ------------------------------------------------------------------------------
349 +# Parameter defaults to build.xml when not specified
350 java-ant_ignore-system-classes() {
351 debug-print-function ${FUNCNAME} $*
352 local file=${1:-build.xml}
353 @@ -469,10 +464,10 @@
354 -e available -a ignoresystemclasses -v "true"
355 }
356
357 -# ------------------------------------------------------------------------------
358 -# @public java-ant_xml-rewrite
359 +# @FUNCTION: java-ant_xml-rewrite
360 +# @USAGE: <xml rewriter arguments>
361 +# @DESCRIPTION:
362 # Run the right xml-rewrite binary with the given arguments
363 -# ------------------------------------------------------------------------------
364 java-ant_xml-rewrite() {
365 local gen2="/usr/bin/xml-rewrite-2.py"
366 local gen2_1="/usr/$(get_libdir)/javatoolkit/bin/xml-rewrite-2.py"
367 @@ -488,22 +483,23 @@
368 fi
369 }
370
371 -# ------------------------------------------------------------------------------
372 -# @public java-ant_rewrite-bootclasspath
373 -#
374 +# @FUNCTION: java-ant_rewrite-bootclasspath
375 +# @USAGE: <version> [path/to/build.xml] [prepend] [append]
376 +# @DESCRIPTION:
377 # Adds bootclasspath to javac-like tasks in build.xml filled with jars of a
378 # bootclasspath package of given version.
379 #
380 +# @CODE
381 # Affected by:
382 # JAVA_PKG_BSFIX_TARGET_TAGS - the tags of javac tasks
383 #
384 -# @param $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath
385 -# of the current JDK
386 -# @param $2 - path to desired build.xml file, defaults to 'build.xml'
387 -# @param $3 - (optional) what to prepend the bootclasspath with (to override)
388 -# @param $4 - (optional) what to append to the bootclasspath
389 -# ------------------------------------------------------------------------------
390 -
391 +# Parameters:
392 +# $1 - the version of bootclasspath (e.g. 1.5), 'auto' for bootclasspath
393 +# of the current JDK
394 +# $2 - path to desired build.xml file, defaults to 'build.xml'
395 +# $3 - (optional) what to prepend the bootclasspath with (to override)
396 +# $4 - (optional) what to append to the bootclasspath
397 +# @CODE
398 java-ant_rewrite-bootclasspath() {
399 local version="${1}"
400 local file="${2-build.xml}"