go: update to 1.5

This commit is contained in:
Dominik Honnef 2015-08-19 23:54:26 +02:00
parent acf4c35c26
commit e770bd5ccf
2 changed files with 23 additions and 30 deletions

View file

@ -1,12 +0,0 @@
--- include/libc.h.orig
+++ include/libc.h
@@ -102,7 +102,10 @@ extern void sysfatal(char*, ...);
#define atoll p9atoll
#define getenv p9getenv
#define getwd p9getwd
+#ifdef longjmp
+#undef longjmp
+#endif
#define longjmp p9longjmp
#undef setjmp
#define setjmp p9setjmp

View file

@ -1,15 +1,18 @@
# Template file for 'go'
pkgname=go
version=1.4.2
revision=2
_bootstrap_version=1.4.2
version=1.5
revision=1
wrksrc=go
hostmakedepends="git ca-certificates"
short_desc="The Go Programming Language"
maintainer="Dominik Honnef <dominik@honnef.co>"
homepage="http://golang.org/"
license="BSD"
distfiles="http://golang.org/dl/go${version}.src.tar.gz"
checksum=299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b
distfiles="http://golang.org/dl/go${_bootstrap_version}.src.tar.gz
http://golang.org/dl/go${version}.src.tar.gz"
checksum="299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b
be81abec996d5126c05f2d36facc8e58a94d9183a56f026fc9441401d80062db"
nostrip=yes
noverifyrdeps=yes
@ -31,6 +34,15 @@ _go_targetarch() {
echo $targetarch
}
do_extract() {
mkdir "${XBPS_BUILDDIR}/go_bootstrap"
tar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/go${_bootstrap_version}.src.tar.gz" \
-C "${XBPS_BUILDDIR}/go_bootstrap" --strip-components=1
tar -xf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/go${version}.src.tar.gz" \
-C "${XBPS_BUILDDIR}/go" --strip-components=1
}
do_build() {
unset GCC CC CXX LD CFLAGS
@ -40,9 +52,13 @@ do_build() {
export GOOS=
export GOARCH=
export GOPATH=/tmp
export GOROOT_BOOTSTRAP="${XBPS_BUILDDIR}/go_bootstrap"
mkdir -p $GOPATH/src
cd src
cd "${XBPS_BUILDDIR}/go_bootstrap/src"
./make.bash
cd "${XBPS_BUILDDIR}/go/src"
GOOS=linux
GOARCH=arm
@ -62,7 +78,7 @@ do_build() {
-b release-branch.go$(echo "$version" | cut -d "." -f "1-2") \
$GOPATH/src/golang.org/x/tools
for tool in godoc vet cover; do
for tool in godoc cover; do
$GOROOT/bin/go install golang.org/x/tools/cmd/${tool}
done
}
@ -84,7 +100,7 @@ do_install() {
vmkdir usr/lib/go
vmkdir usr/share/go
cp -d --preserve=all ${bindir}/* ${DESTDIR}/usr/bin || true
cp -a pkg src lib include ${DESTDIR}/usr/lib/go
cp -a pkg src lib ${DESTDIR}/usr/lib/go
cp -r doc misc -t ${DESTDIR}/usr/share/go
ln -s /usr/share/go/doc ${DESTDIR}/usr/lib/go/doc
vlicense LICENSE
@ -126,14 +142,6 @@ go-cross-linux_package() {
mv "$i" $PKGDESTDIR/usr/lib/go/pkg/
fi
done
mkdir -p $PKGDESTDIR/usr/lib/go/src/runtime/
cd ${DESTDIR}/usr/lib/go/src/runtime/
for i in zasm_linux_*.h; do
if [ "$i" != "zasm_linux_${targetarch}.h" ]; then
mv "$i" $PKGDESTDIR/usr/lib/go/src/runtime/
fi
done
}
}
@ -145,7 +153,6 @@ go-cross-darwin_package() {
pkg_install() {
vmove "usr/lib/go/pkg/tool/darwin_*"
vmove "usr/lib/go/pkg/darwin_*"
vmove "usr/lib/go/src/runtime/zasm_darwin_*.h"
}
}
@ -157,7 +164,6 @@ go-cross-freebsd_package() {
pkg_install() {
vmove "usr/lib/go/pkg/tool/freebsd_*"
vmove "usr/lib/go/pkg/freebsd_*"
vmove "usr/lib/go/src/runtime/zasm_freebsd_*.h"
}
}
@ -170,6 +176,5 @@ go-cross-windows_package() {
pkg_install() {
vmove "usr/lib/go/pkg/tool/windows_*"
vmove "usr/lib/go/pkg/windows_*"
vmove "usr/lib/go/src/runtime/zasm_windows_*.h"
}
}