commit:     d4eb70324020f6bd8e735e08a7d2a89e06393a9d
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 23 15:41:51 2020 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Jan 23 15:43:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4eb7032

dev-lang/go: add back the bdepend for dev-lang/go

It should be safe to use go to build itself.
Also, this cleans up the has_version testing to select the bootstrap
implementation.

Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 dev-lang/go/go-9999.ebuild |  7 ++++++-
 dev-lang/go/x              | 28 ++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
index 635b905c4d9..82c9facbd67 100644
--- a/dev-lang/go/go-9999.ebuild
+++ b/dev-lang/go/go-9999.ebuild
@@ -40,7 +40,9 @@ SLOT="0/${PV}"
 IUSE="gccgo"
 
 BDEPEND="gccgo? ( >=sys-devel/gcc-5[go(-)] )
-       !gccgo? ( >=dev-lang/go-bootstrap-1.13.6 )"
+       !gccgo? ( || (
+               dev-lang/go
+               dev-lang/go-bootstrap ) )"
 RDEPEND="!<dev-go/go-tools-0_pre20150902"
 
 # These test data objects have writable/executable stacks.
@@ -145,7 +147,10 @@ src_compile()
                ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
        elif has_version -b dev-lang/go-bootstrap; then
                export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
+       elif has_version -b dev-lang/go; then
+               export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
        else
+               eerror "Go cannot be built without go or go-bootstrap installed"
                die "Should not be here, please report a bug"
        fi
 

diff --git a/dev-lang/go/x b/dev-lang/go/x
new file mode 100644
index 00000000000..14d7827f06b
--- /dev/null
+++ b/dev-lang/go/x
@@ -0,0 +1,28 @@
+diff --git a/dev-lang/go/go-9999.ebuild b/dev-lang/go/go-9999.ebuild
+index 635b905c4d9..eb74459d848 100644
+--- a/dev-lang/go/go-9999.ebuild
++++ b/dev-lang/go/go-9999.ebuild
+@@ -40,7 +40,9 @@ SLOT="0/${PV}"
+ IUSE="gccgo"
+ 
+ BDEPEND="gccgo? ( >=sys-devel/gcc-5[go(-)] )
+-      !gccgo? ( >=dev-lang/go-bootstrap-1.13.6 )"
++      !gccgo? ( ||(
++              dev-lang/go
++              dev-lang/go-bootstrap-1.13.6 ) )"
+ RDEPEND="!<dev-go/go-tools-0_pre20150902"
+ 
+ # These test data objects have writable/executable stacks.
+@@ -145,8 +147,11 @@ src_compile()
+               ln -s "${go_binary}" "${GOROOT_BOOTSTRAP}/bin/go" || die
+       elif has_version -b dev-lang/go-bootstrap; then
+               export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap"
++      elif has_version -b dev-lang/go; then
++              export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go"
+       else
+-              die "Should not be here, please report a bug"
++              eerror "Go cannot be built without go or go-bootstrap installed"
++              die "Should not be here, please report a bug.
+       fi
+ 
+       export GOROOT_FINAL="${EPREFIX}"/usr/lib/go

Reply via email to