summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2015-06-29 15:59:38 +0000
committerWilliam Hubbs <williamh@gentoo.org>2015-06-29 15:59:38 +0000
commit3c117bb0e57116fd875ac8d21d66c8a6c02d7288 (patch)
tree8c36f8c3264f95eceaef87b2086f901960db65da /dev-go
parentStable for sparc, wrt bug #551508 (diff)
downloadgentoo-2-3c117bb0e57116fd875ac8d21d66c8a6c02d7288.tar.gz
gentoo-2-3c117bb0e57116fd875ac8d21d66c8a6c02d7288.tar.bz2
gentoo-2-3c117bb0e57116fd875ac8d21d66c8a6c02d7288.zip
Make live ebuild copyable
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x30C46538)
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/go-oauth2/ChangeLog6
-rw-r--r--dev-go/go-oauth2/go-oauth2-9999.ebuild41
2 files changed, 44 insertions, 3 deletions
diff --git a/dev-go/go-oauth2/ChangeLog b/dev-go/go-oauth2/ChangeLog
index 0f6144fecd8d..b7d85312f4f7 100644
--- a/dev-go/go-oauth2/ChangeLog
+++ b/dev-go/go-oauth2/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-go/go-oauth2
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-go/go-oauth2/ChangeLog,v 1.5 2015/06/29 14:25:31 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-oauth2/ChangeLog,v 1.6 2015/06/29 15:59:38 williamh Exp $
+
+ 29 Jun 2015; William Hubbs <williamh@gentoo.org>
+ go-oauth2-1.4.2_p20150527.ebuild, go-oauth2-9999.ebuild:
+ Make live ebuild copyable
29 Jun 2015; William Hubbs <williamh@gentoo.org> go-oauth2-9999.ebuild:
drop keywords from live ebuild
diff --git a/dev-go/go-oauth2/go-oauth2-9999.ebuild b/dev-go/go-oauth2/go-oauth2-9999.ebuild
index c527f264df38..ef2f019ae133 100644
--- a/dev-go/go-oauth2/go-oauth2-9999.ebuild
+++ b/dev-go/go-oauth2/go-oauth2-9999.ebuild
@@ -1,11 +1,19 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-go/go-oauth2/go-oauth2-9999.ebuild,v 1.2 2015/06/29 14:25:31 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-oauth2/go-oauth2-9999.ebuild,v 1.3 2015/06/29 15:59:38 williamh Exp $
EAPI=5
-inherit golang-build golang-vcs
EGO_PN=golang.org/x/oauth2
+if [[ ${PV} = *9999* ]]; then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64"
+ EGIT_COMMIT="b5adcc2dcdf009d0391547edc6ecbaff889f5bb9"
+ SRC_URI="https://github.com/golang/oauth2/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+fi
+inherit golang-build
+
DESCRIPTION="Go client implementation for OAuth 2.0 spec"
HOMEPAGE="https://godoc.org/golang.org/x/oauth2"
LICENSE="BSD"
@@ -13,3 +21,32 @@ SLOT="0"
IUSE=""
DEPEND="dev-go/go-net"
RDEPEND=""
+
+if [[ ${PV} != *9999* ]]; then
+src_unpack() {
+ local f
+
+ for f in ${A}
+ do
+ case "${f}" in
+ *.tar|*.tar.gz|*.tar.bz2|*.tar.xz)
+ local destdir=${WORKDIR}/${P}/src/${EGO_SRC}
+
+ debug-print "${FUNCNAME}: unpacking ${f} to ${destdir}"
+
+ # XXX: check whether the directory structure inside is
+ # fine? i.e. if the tarball has actually a parent dir.
+ mkdir -p "${destdir}" || die
+ tar -C "${destdir}" -x --strip-components 1 \
+ -f "${DISTDIR}/${f}" || die
+ ;;
+ *)
+ debug-print "${FUNCNAME}: falling back to unpack for ${f}"
+
+ # fall back to the default method
+ unpack "${f}"
+ ;;
+ esac
+ done
+}
+fi