Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>, Donnie Berkholz <dberkholz@g.o>, Sergei Trofimovich <slyfox@g.o>
Subject: [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 19:24:15
Message-Id: 1354044140-27037-1-git-send-email-slyfox@gentoo.org
1 Before the patch I had to move subdir(not very reliable):
2 EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
3 src_prepare() {
4 mv EHC/* ./ || die
5 }
6
7 After the patch i can define it the usual way:
8 EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
9 S="${WORKDIR}/${P}/EHC
10
11 Original ebuild: https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-9999.ebuild#L27
12
13 Signed-off-by: Sergei Trofimovich <slyfox@g.o>
14 ---
15 git-2.eclass | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18 diff --git a/git-2.eclass b/git-2.eclass
19 index 1ecc633..1a96978 100644
20 --- a/git-2.eclass
21 +++ b/git-2.eclass
22 @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
23 # This variable specifies destination where the cloned
24 # data are copied to.
25 #
26 -# EGIT_SOURCEDIR="${S}"
27 +# EGIT_SOURCEDIR="${WORKDIR}/${P}"
28
29 # @ECLASS-VARIABLE: EGIT_STORE_DIR
30 # @DESCRIPTION:
31 @@ -132,7 +132,7 @@ git-2_init_variables() {
32 local esc_pn liverepo livebranch livecommit
33 esc_pn=${PN//[-+]/_}
34
35 - : ${EGIT_SOURCEDIR="${S}"}
36 + : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
37
38 : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
39
40 --
41 1.8.0

Replies