Gentoo Archives: gentoo-dev

From: "Marty E. Plummer" <hanetzer@×××××××××.com>
To: gentoo-dev@l.g.o
Cc: gentoo-java@l.g.o
Subject: Re: [gentoo-dev] Re: [PATCH] ant-tasks.eclass: use eapi7-ver
Date: Tue, 22 May 2018 04:01:50
Message-Id: 20180522040110.a65ihwfwpljw34mt@proprietary-killer
In Reply to: Re: [gentoo-dev] Re: [PATCH] ant-tasks.eclass: use eapi7-ver by "Michał Górny"
1 On Tue, May 22, 2018 at 05:57:35AM +0200, Micha?? G??rny wrote:
2 > W dniu pon, 21.05.2018 o godzinie 17???03???-0500, u??ytkownik Marty E.
3 > Plummer napisa??:
4 > > Actually I just noticed that eapi7-ver can now be used for EAPI 0-6, so
5 > > just unconditionally use it if EAPI != 7
6 > >
7 > > Package-Manager: Portage-2.3.36, Repoman-2.3.9
8 > > ---
9 > > eclass/ant-tasks.eclass | 11 ++++++-----
10 > > 1 file changed, 6 insertions(+), 5 deletions(-)
11 > >
12 > > diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
13 > > index e008e6eaea8..110344f712d 100644
14 > > --- a/eclass/ant-tasks.eclass
15 > > +++ b/eclass/ant-tasks.eclass
16 > > @@ -16,7 +16,8 @@
17 > > JAVA_ANT_DISABLE_ANT_CORE_DEP=true
18 > > # rewriting build.xml for are the testcases has no reason atm
19 > > JAVA_PKG_BSFIX_ALL=no
20 > > -inherit versionator java-pkg-2 java-ant-2
21 > > +inherit java-pkg-2 java-ant-2
22 > > +[[ ${EAPI} == 7 ]] || inherit eapi7-ver
23 >
24 > Always check for old EAPIs, instead of expecting people to keep updating
25 > this forever.
26 >
27 Would you prefer something like
28 [[ ${EAPI} ~= [0-6] ]] && inherit eapi7-ver, then?
29 The way I see it, every consumer of ant-tasks is eapi 5 right now, 5 and
30 6 if my pull request is accepted. Once every consumer is eapi 7 or greater,
31 this line can be removed entirely and it won't be needing updates
32 'forever'.
33 > >
34 > > EXPORT_FUNCTIONS src_unpack src_compile src_install
35 > >
36 > > @@ -60,12 +61,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 +102,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 +168,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 > --
71 > Best regards,
72 > Micha?? G??rny
73 >
74 >

Replies