Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 27 Sep 2019 09:47:24
Message-Id: 1569577629.9b4dab751e60b6d9e85d683f4f344194e0cd70b7.fordfrog@gentoo
1 commit: 9b4dab751e60b6d9e85d683f4f344194e0cd70b7
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 27 09:41:30 2019 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 27 09:47:09 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b4dab75
7
8 eclass/ant-tasks.eclass: added support for multiple deps
9
10 Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
11
12 eclass/ant-tasks.eclass | 12 ++++++++----
13 1 file changed, 8 insertions(+), 4 deletions(-)
14
15 diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
16 index 309df084d15..04c6fb5b7d6 100644
17 --- a/eclass/ant-tasks.eclass
18 +++ b/eclass/ant-tasks.eclass
19 @@ -54,7 +54,9 @@ ANT_TASK_NAME="${PN#ant-}"
20 # @DESCRIPTION:
21 # Specifies JAVA_PKG_NAME (PN{-SLOT} used with java-pkg_jar-from) of the package
22 # that this one depends on. Defaults to the name of ant task, ebuild can
23 -# override it before inheriting this eclass.
24 +# override it before inheriting this eclass. In case there is more than one
25 +# dependency, the variable can be specified as bash array with multiple strings,
26 +# one for each dependency.
27 ANT_TASK_DEPNAME=${ANT_TASK_DEPNAME-${ANT_TASK_NAME}}
28
29 # @ECLASS-VARIABLE: ANT_TASK_DISABLE_VM_DEPS
30 @@ -105,7 +107,7 @@ S="${WORKDIR}/${MY_P}"
31 # base: performs the unpack, build.xml replacement and symlinks ant.jar from
32 # ant-core
33 #
34 -# jar-dep: symlinks the jar file(s) from dependency package
35 +# jar-dep: symlinks the jar file(s) from dependency package(s)
36 ant-tasks_src_unpack() {
37 [[ -z "${1}" ]] && ant-tasks_src_unpack all
38
39 @@ -129,9 +131,11 @@ ant-tasks_src_unpack() {
40 # ant.jar to build against
41 java-pkg_jar-from --build-only ant-core ant.jar;;
42 jar-dep)
43 - # get jar from the dependency package
44 + # get jar from the dependency package(s)
45 if [[ -n "${ANT_TASK_DEPNAME}" ]]; then
46 - java-pkg_jar-from ${ANT_TASK_DEPNAME}
47 + for depname in "${ANT_TASK_DEPNAME[@]}"; do
48 + java-pkg_jar-from ${depname}
49 + done
50 fi;;
51 all)
52 ant-tasks_src_unpack base jar-dep;;