summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2015-06-26 22:54:48 +0000
committerWilliam Hubbs <williamh@gentoo.org>2015-06-26 22:54:48 +0000
commitc7f6333fdd8e05825f9dd0f794c6d67e38fd65a7 (patch)
tree59aec2575947178fd3227bf5cb0479cee8229878 /dev-go
parentAdd the option to include the kdbus patchset into gentoo-sources. Default is ... (diff)
downloadgentoo-2-c7f6333fdd8e05825f9dd0f794c6d67e38fd65a7.tar.gz
gentoo-2-c7f6333fdd8e05825f9dd0f794c6d67e38fd65a7.tar.bz2
gentoo-2-c7f6333fdd8e05825f9dd0f794c6d67e38fd65a7.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-text/ChangeLog5
-rw-r--r--dev-go/go-text/go-text-9999.ebuild41
2 files changed, 43 insertions, 3 deletions
diff --git a/dev-go/go-text/ChangeLog b/dev-go/go-text/ChangeLog
index 177ddcebd64b..d56618ca1a76 100644
--- a/dev-go/go-text/ChangeLog
+++ b/dev-go/go-text/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-go/go-text
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/ChangeLog,v 1.7 2015/06/09 03:07:26 zmedico Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/ChangeLog,v 1.8 2015/06/26 22:54:48 williamh Exp $
+
+ 26 Jun 2015; William Hubbs <williamh@gentoo.org> go-text-9999.ebuild:
+ make live ebuild copyable
*go-text-1.4.2_p20150604 (09 Jun 2015)
diff --git a/dev-go/go-text/go-text-9999.ebuild b/dev-go/go-text/go-text-9999.ebuild
index fc209d33d62b..bcd3c6617ea8 100644
--- a/dev-go/go-text/go-text-9999.ebuild
+++ b/dev-go/go-text/go-text-9999.ebuild
@@ -1,13 +1,21 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.6 2015/06/25 17:43:02 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-go/go-text/go-text-9999.ebuild,v 1.7 2015/06/26 22:54:48 williamh Exp $
EAPI=5
-inherit golang-build golang-vcs
EGO_PN=golang.org/x/text/...
EGO_SRC=golang.org/x/text
+if [[ ${PV} = *9999* ]]; then
+ inherit golang-vcs
+else
+ KEYWORDS="~amd64"
+ EGIT_COMMIT="df923bbb63f8ea3a26bb743e2a497abd0ab585f7"
+ SRC_URI="https://github.com/golang/text/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+fi
+inherit golang-build
+
DESCRIPTION="Go text processing support"
HOMEPAGE="https://godoc.org/golang.org/x/text"
LICENSE="BSD"
@@ -16,6 +24,35 @@ IUSE=""
DEPEND=""
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
+
src_test() {
# Create a writable GOROOT in order to avoid sandbox violations.
cp -sR "$(go env GOROOT)" "${T}/goroot" || die