Gentoo Archives: gentoo-dev

From: "Tomáš Chvátal" <tomas.chvatal@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do:
Date: Tue, 27 Nov 2012 20:33:10
Message-Id: CA+Nrkpf8XaV+g_G6y+2_PojnRxtLKK39QXpBV8VpFHGVUkhjvg@mail.gmail.com
In Reply to: [gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do: by Sergei Trofimovich
1 Why not use tools already in the eclass? The egit_sourcedir is exactly for
2 this... also you can just define s after the inherit...
3 Dne 27.11.2012 20:27 "Sergei Trofimovich" <slyfox@g.o> napsal(a):
4
5 > Before the patch I had to move subdir(not very reliable):
6 > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
7 > src_prepare() {
8 > mv EHC/* ./ || die
9 > }
10 >
11 > After the patch i can define it the usual way:
12 > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
13 > S="${WORKDIR}/${P}/EHC
14 >
15 > Original ebuild:
16 > https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-9999.ebuild#L27
17 >
18 > Signed-off-by: Sergei Trofimovich <slyfox@g.o>
19 > ---
20 > git-2.eclass | 4 ++--
21 > 1 file changed, 2 insertions(+), 2 deletions(-)
22 >
23 > diff --git a/git-2.eclass b/git-2.eclass
24 > index 1ecc633..1a96978 100644
25 > --- a/git-2.eclass
26 > +++ b/git-2.eclass
27 > @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
28 > # This variable specifies destination where the cloned
29 > # data are copied to.
30 > #
31 > -# EGIT_SOURCEDIR="${S}"
32 > +# EGIT_SOURCEDIR="${WORKDIR}/${P}"
33 >
34 > # @ECLASS-VARIABLE: EGIT_STORE_DIR
35 > # @DESCRIPTION:
36 > @@ -132,7 +132,7 @@ git-2_init_variables() {
37 > local esc_pn liverepo livebranch livecommit
38 > esc_pn=${PN//[-+]/_}
39 >
40 > - : ${EGIT_SOURCEDIR="${S}"}
41 > + : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
42 >
43 > :
44 > ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
45 >
46 > --
47 > 1.8.0
48 >
49 >
50 >