Skip to content
Permalink
077d6ef2a4
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
@wwwutz
Latest commit 4022b54 Sep 8, 2020 History
- go!
2 contributors

Users who have contributed to this file

@wwwutz @david
executable file 84 lines (58 sloc) 1.92 KB
#!/usr/bin/env beesh
# BEE_VERSION go-1.15.1-0
# see also: https://golang.org/doc/install/source
# SRCURL[0]="https://dl.google.com/go/go1.4-bootstrap-20171003.tar.gz"
# SRCURL[1]="https://redirector.gvt1.com/edgedl/go/go${PKGVERSION}.src.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/dbf727a4b0e365bf88d97cbfde590016/go1.4-bootstrap-20171003.tar.gz"
SRCURL[1]="https://beehive.molgen.mpg.de/d11afbf19a1d9bf6fc7dc337f39b474d/go1.15.1.src.tar.gz"
# PATCHURL+=()
# EXCLUDE+=()
build_in_sourcedir
sourcesubdir_append src
mee_extract() {
# extract bootstrap version of go-1.4 to arbitrary location
mkdir ${S}/bootstrap
bee_extract_do_tar "${1}" ${S}/bootstrap --strip-components 1
shift
bee_extract "${@}"
}
#mee_patch() {
# bee_patch "${@}"
#}
#mee_configure() {
# bee_configure
#}mee_install()
mee_build() {
cd ${S}/../bootstrap/src
# https://github.com/golang/go/issues/16906 "cannot load DWARF output ..."
CGO_ENABLED=0 \
CFLAGS='-Wno-implicit-fallthrough -Wno-shift-negative-value' \
./make.bash
echo "---- bootstrap built ----"
cd ${S}
export GOROOT_BOOTSTRAP=${S}/../bootstrap
export GOROOT_FINAL=${LIBDIR}/go
./make.bash --no-clean
}
mee_install() {
# The binaries expect /scratch/local/bee-root/go/go-1.10-0/source to be copied or moved to /usr/lib/go
mkdir -pv ${D}${BINDIR}
cp -rv ${S}/../bin/. ${D}${BINDIR}
# strace -s 200 -e file ${S}/../bin/go install -buildmode=shared std
# Install standardlibs https://golang.org/pkg/#stdlib
mkdir -pv ${D}${LIBDIR}/go/src
cd ${S}
for i in *; do
if [ -d "${i}" ]; then
cp -rv ${i} ${D}${LIBDIR}/go/src
fi
done
#Install tools for go
mkdir -pv ${D}${LIBDIR}/go/pkg
cp -rv ${S}/../pkg/tool ${D}${LIBDIR}/go/pkg
cp -rv ${S}/../pkg/include ${D}${LIBDIR}/go/pkg
cp -rv ${S}/../pkg/linux_amd64 ${D}${LIBDIR}/go/pkg
}
#mee_install_post() {
# exit
#}