summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <william.hubbs@sony.com>2019-07-31 12:52:20 -0500
committerWilliam Hubbs <williamh@gentoo.org>2019-07-31 12:53:05 -0500
commit93dbdde85ba497a34e3f5673b5e3193e25d427e3 (patch)
tree040678847eafb8bae5c4c9217881c00d16655f08 /dev-lang/go/go-9999.ebuild
parentmedia-plugins/alsa-plugins: stable 1.1.8 for hppa/sparc, bug #681368 (diff)
downloadgentoo-93dbdde85ba497a34e3f5673b5e3193e25d427e3.tar.gz
gentoo-93dbdde85ba497a34e3f5673b5e3193e25d427e3.tar.bz2
gentoo-93dbdde85ba497a34e3f5673b5e3193e25d427e3.zip
dev-lang/go: sync live
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: William Hubbs <williamh@gentoo.org>
Diffstat (limited to 'dev-lang/go/go-9999.ebuild')
-rw-r--r--dev-lang/go/go-9999.ebuild19
1 files changed, 12 insertions, 7 deletions
diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
index 8c8928317700..a6151a8c829b 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-9999.ebuild
@@ -48,20 +48,20 @@ case ${PV} in
esac
esac
-# If gccgo is not being used to build Go, there is no way to know the
-# architecture or operating system of the build machine, so we need to
-# download all of our bootstrap archives to allow this ebuild to work
-# under crossdev.
+# If gccgo or a previously installed version of dev-lang/go is not being
+# used to build Go, there is no way to know the architecture or operating system
+# of the build machine, so we need to download all of our bootstrap
+# archives to allow this ebuild to work under crossdev.
#
# https://bugs.gentoo.org/671394
-SRC_URI+="!gccgo? ( ${BOOTSTRAP_URI} )"
+SRC_URI+="!gccgo? ( !system-bootstrap? ( ${BOOTSTRAP_URI} ) )"
DESCRIPTION="A concurrent garbage collected and typesafe programming language"
HOMEPAGE="https://golang.org"
LICENSE="BSD"
SLOT="0/${PV}"
-IUSE="gccgo"
+IUSE="gccgo system-bootstrap"
BDEPEND="gccgo? ( >=sys-devel/gcc-5[go] )"
RDEPEND="!<dev-go/go-tools-0_pre20150902"
@@ -151,6 +151,9 @@ pkg_pretend()
if [[ $(go_tuple) != $(go_tuple ${CTARGET}) ]]; then
die "CHOST CTARGET pair unsupported: CHOST=${CHOST} CTARGET=${CTARGET}"
fi
+ [[ ${MERGE_TYPE} != binary ]] &&
+ use system-bootstrap && ! has_version "dev-lang/go" &&
+ die "dev-lang/go must be installed to use the system-bootstrap use flag"
}
src_unpack()
@@ -160,7 +163,7 @@ src_unpack()
else
unpack "go${MY_PV}.src.tar.gz"
fi
- use gccgo ||
+ use gccgo || use system-bootstrap ||
unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
}
@@ -176,6 +179,8 @@ src_compile()
[[ -x ${go_binary} ]] ||
die "go-$(gcc-major-version): command not found"
ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+ elif use system-bootstrap; then
+ export GOROOT_BOOTSTRAP="${EPREFIX}"/usr/lib/go
fi
export GOROOT_FINAL="${EPREFIX}"/usr/lib/go
export GOROOT="$(pwd)"