Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mrueg:master commit in: eclass/
Date: Thu, 25 Jun 2015 11:38:54
Message-Id: 1435232318.257871ffc14ffe4b8b72ef2df315f3f82ef96e9b.mrueg@gentoo
1 commit: 257871ffc14ffe4b8b72ef2df315f3f82ef96e9b
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 25 11:38:38 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 25 11:38:38 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=257871ff
7
8 [eclass] Add support for pull requests.
9
10 eclass/github.eclass | 16 ++++++++++++++++
11 1 file changed, 16 insertions(+)
12
13 diff --git a/eclass/github.eclass b/eclass/github.eclass
14 index 1099bf0..3885e18 100644
15 --- a/eclass/github.eclass
16 +++ b/eclass/github.eclass
17 @@ -45,6 +45,16 @@ esac
18 # GH_PATCHES=( "b02c39fb8dec9043b0ac9d23d5caec19b8b0c337" )
19 # @CODE
20
21 +# @ECLASS-VARIABLE: GH_PULLREQ
22 +# @DEFAULT_UNSET
23 +# @DESCRIPTION:
24 +# Pull requests to be fetched and applied from Github by its id.
25 +# Example:
26 +# @CODE
27 +# GH_PULLREQ=( 17 19 )
28 +# @CODE
29 +
30 +
31 # @ECLASS-VARIABLE: GH_TAG
32 # @DESCRIPTION:
33 # Tag/commit that is fetched from Github.
34 @@ -84,6 +94,12 @@ _calculate_patches_uri() {
35 _GH_PATCHES+=("${DISTDIR}"/${PN}-${gh_commit}.patch)
36 done
37 fi
38 + if [[ -n $GH_PULLREQ ]]; then
39 + for gh_commit in "${GH_PULLREQ[@]}"; do
40 + SRC_URI+=" https://github.com/${GH_USER}/${GH_REPO}/pull//${gh_commit}.patch -> ${PN}-pr-${gh_commit}.patch"
41 + _GH_PATCHES+=("${DISTDIR}"/${PN}-pr-${gh_commit}.patch)
42 + done
43 + fi
44 }