Permalink
Cannot retrieve contributors at this time
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?
bee-files/go.be0
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
80 lines (56 sloc)
1.96 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env beesh | |
# BEE_VERSION go-1.10.2-0 | |
SRCURL[0]="https://storage.googleapis.com/golang/go1.4-bootstrap-20171003.tar.gz" | |
SRCURL[1]="https://redirector.gvt1.com/edgedl/go/go${PKGVERSION}.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 -p ${D}${BINDIR} | |
cp -r ${S}/../bin/. ${D}${BINDIR} | |
mkdir -p ${D}${LIBDIR}/go | |
# strace -s 200 -e file ${S}/../bin/go install -buildmode=shared std | |
# Install standardlibs https://golang.org/pkg/#stdlib | |
LIBS="builtin context debug expvar go image io math \ | |
path runtime strings testing unicode bufio bytes \ | |
compress crypto encoding flag hash index mime net plugin reflect \ | |
sort sync text unsafe archive cmd container database errors \ | |
fmt html internal log os regexp strconv syscall time vendor" | |
echo "LIBS=${LIBS}" | |
mkdir -p ${D}${LIBDIR}/go/src | |
for i in $LIBS; do | |
cp -r ${S}/${i} ${D}${LIBDIR}/go/src | |
done | |
#Install tools for go | |
mkdir -p ${D}${LIBDIR}/go/pkg | |
cp -r ${S}/../pkg/tool ${D}${LIBDIR}/go/pkg | |
cp -r ${S}/../pkg/include ${D}${LIBDIR}/go/pkg | |
cp -r ${S}/../pkg/linux_amd64 ${D}${LIBDIR}/go/pkg | |
} |