dev-lang/go: Unpack bootstrap archive for current platform only
authorMichał Górny <mgorny@gentoo.org>
Tue, 16 Apr 2019 06:25:39 +0000 (08:25 +0200)
committerWilliam Hubbs <williamh@gentoo.org>
Wed, 24 Apr 2019 18:04:56 +0000 (13:04 -0500)
Unpack the bootstrap archive for the current platform rather than
all bootstrap tarballs in SRC_URI.  This provides significant space
savings during build.

Closes: https://bugs.gentoo.org/680860
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: William Hubbs <williamh@gentoo.org>
dev-lang/go/go-1.12.4.ebuild
dev-lang/go/go-9999.ebuild

index 7e249d23dab460d33db271a6cacce120a169b375..cda631645e86b782a627781ae95db15d003a7398 100644 (file)
@@ -157,8 +157,11 @@ src_unpack()
 {
        if [[ ${PV} = 9999 ]]; then
                git-r3_src_unpack
+       else
+               unpack "go${MY_PV}.src.tar.gz"
        fi
-       default
+       use gccgo ||
+               unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
 }
 
 src_compile()
index 4cb21b53d1931f4a8d4975a046a8c665caf15f70..deea6d5a588f2ae617d826e910782e8386358693 100644 (file)
@@ -157,8 +157,11 @@ src_unpack()
 {
        if [[ ${PV} = 9999 ]]; then
                git-r3_src_unpack
+       else
+               unpack "go${MY_PV}.src.tar.gz"
        fi
-       default
+       use gccgo ||
+               unpack "go-$(go_os ${CBUILD})-$(go_arch ${CBUILD})-${BOOTSTRAP_VERSION}.tbz"
 }
 
 src_compile()