1 |
See also https://github.com/gentoo/gentoo/pull/8325 |
2 |
The above pr does a revbump and bumps EAPI to 6 for every ebuild which |
3 |
uses this eclass. If we were to instead just in-place bump EAPI to 6 we |
4 |
could do away with the conditional code entirely. |
5 |
|
6 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
7 |
--- |
8 |
eclass/ant-tasks.eclass | 22 +++++++++++++++++----- |
9 |
1 file changed, 17 insertions(+), 5 deletions(-) |
10 |
|
11 |
diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass |
12 |
index e008e6eaea8..193d6af0c04 100644 |
13 |
--- a/eclass/ant-tasks.eclass |
14 |
+++ b/eclass/ant-tasks.eclass |
15 |
@@ -16,7 +16,19 @@ |
16 |
JAVA_ANT_DISABLE_ANT_CORE_DEP=true |
17 |
# rewriting build.xml for are the testcases has no reason atm |
18 |
JAVA_PKG_BSFIX_ALL=no |
19 |
-inherit versionator java-pkg-2 java-ant-2 |
20 |
+inherit java-pkg-2 java-ant-2 |
21 |
+if [[ ${EAPI:-0} == 6 ]]; then |
22 |
+ inherit eapi7-ver |
23 |
+elif [[ ${EAPI:-0} =~ [0-5] ]]; then |
24 |
+ inherit versionator |
25 |
+ ver_cut() { |
26 |
+ get_version_component_range "$@" |
27 |
+ } |
28 |
+ |
29 |
+ ver_test() { |
30 |
+ version_is_at_least "$2" |
31 |
+ } |
32 |
+fi |
33 |
|
34 |
EXPORT_FUNCTIONS src_unpack src_compile src_install |
35 |
|
36 |
@@ -60,12 +72,12 @@ if [[ ${PV} == *beta2* ]]; then |
37 |
MY_PV=${PV/_beta2/beta} |
38 |
UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src" |
39 |
GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles" |
40 |
- ANT_TASK_PV=$(get_version_component_range 1-3) |
41 |
+ ANT_TASK_PV=$(ver_cut 1-3) |
42 |
elif [[ ${PV} == *_rc* ]]; then |
43 |
MY_PV=${PV/_rc/RC} |
44 |
UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles" |
45 |
GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles" |
46 |
- ANT_TASK_PV=$(get_version_component_range 1-3) |
47 |
+ ANT_TASK_PV=$(ver_cut 1-3) |
48 |
else |
49 |
# default for final releases |
50 |
MY_PV=${PV} |
51 |
@@ -101,7 +113,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then |
52 |
fi |
53 |
|
54 |
# we need direct blockers with old ant-tasks for file collisions - bug #252324 |
55 |
-if version_is_at_least 1.7.1 ; then |
56 |
+if ver_test -ge 1.7.1; then |
57 |
DEPEND+=" !dev-java/ant-tasks" |
58 |
fi |
59 |
|
60 |
@@ -167,7 +179,7 @@ ant-tasks_src_install() { |
61 |
java-pkg_register-ant-task --version "${ANT_TASK_PV}" |
62 |
|
63 |
# create the compatibility symlink |
64 |
- if version_is_at_least 1.7.1_beta2; then |
65 |
+ if ver_test -ge 1.7.1_beta2; then |
66 |
dodir /usr/share/ant/lib |
67 |
dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar |
68 |
fi |
69 |
-- |
70 |
2.17.0 |