eclass: install pkg/linux_{amd64,arm64} only for 1.19 or older

Since Go 1.20 stopped shipping pre-compiled package archives for the
standard library in $GOROOT/pkg, it became impossible to install
pkg/linux_{amd64,arm64} for every version. To avoid build failure,
install the library if the Go slot number is 1.19 or older.

Also depend on go-bootstrap 1.17.13 or newer.

See also https://go.dev/doc/go1.20.
This commit is contained in:
Dongsu Park 2023-05-25 13:07:17 +02:00 committed by Sayan Chowdhury
parent 886cdf4485
commit 1d2ea91f6a

View File

@ -32,7 +32,7 @@ IUSE=""
RDEPEND="app-eselect/eselect-go" RDEPEND="app-eselect/eselect-go"
DEPEND="${RDEPEND} DEPEND="${RDEPEND}
>=dev-lang/go-bootstrap-1.5.3" >=dev-lang/go-bootstrap-1.17.13"
# These test data objects have writable/executable stacks. # These test data objects have writable/executable stacks.
QA_EXECSTACK="usr/lib/go${GOSLOT}/src/debug/elf/testdata/*.obj" QA_EXECSTACK="usr/lib/go${GOSLOT}/src/debug/elf/testdata/*.obj"
@ -100,7 +100,12 @@ coreos-go-lang_src_install() {
insinto "/usr/lib/go${GOSLOT}" insinto "/usr/lib/go${GOSLOT}"
doins -r doc lib src doins -r doc lib src
insinto "/usr/lib/go${GOSLOT}/pkg" insinto "/usr/lib/go${GOSLOT}/pkg"
doins -r "pkg/include" "pkg/$(go_tuple)" doins -r "pkg/include"
# Install pkg/linux_{amd64,arm64} only for Go <= 1.19, as Go 1.20+
# does not ship pre-compiled package archives for the standard library
# in $GOROOT/pkg. See https://go.dev/doc/go1.20.
ver_test "${GOSLOT}" -lt 1.20 && doins -r "pkg/$(go_tuple)"
dodoc CONTRIBUTING.md PATENTS README.md dodoc CONTRIBUTING.md PATENTS README.md
} }