diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-02-23 16:45:51 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-02-23 16:46:14 +0200 |
commit | 0030ca9f7771c9094f8a4383254ae0e52f15e864 (patch) | |
tree | 5bc7d41b2ae7228976c77cd6e6d242b7fffd0266 /community/go | |
parent | b6efdc05ed61dd4c6324852bc67f412cd27fdb61 (diff) | |
download | aports-0030ca9f7771c9094f8a4383254ae0e52f15e864.tar.bz2 aports-0030ca9f7771c9094f8a4383254ae0e52f15e864.tar.xz |
community/go: use any go-bootstrap, add s390x
Now that go-bootstrap can be the bootstrap package (for x86*) or
the real go package, search for the right bootstrap go directory
to use. This also adds s390x arch mapping.
Diffstat (limited to 'community/go')
-rw-r--r-- | community/go/APKBUILD | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD index 59ecceb0da..5de082af39 100644 --- a/community/go/APKBUILD +++ b/community/go/APKBUILD @@ -11,7 +11,7 @@ arch="all" license="BSD" depends="binutils gcc" depends_dev="" -makedepends="bash" +makedepends="bash go-bootstrap" options="!strip" provides="go-bootstrap=$pkgver-r$pkgrel" install="" @@ -19,23 +19,11 @@ subpackages="$pkgname-doc $pkgname-tools" source="http://golang.org/dl/go${pkgver/_/}.src.tar.gz $pkgname-tools-${pkgver/_/}.tar.gz::https://github.com/golang/tools/archive/${_toolsver}.tar.gz default-buildmode-pie.patch - http://dev.alpinelinux.org/bootstrap/go/go-linux-musl-arm64-bootstrap.tar.bz2 " # NOTE: building go for x86 with grsec kernel requires: # sysctl -w kernel.modify_ldt=1 -# use go-bootstrap for archs that are supported -case "$CARCH" in -aarch64) - _goroot_bootstrap="$srcdir"/go-linux-arm64-bootstrap - ;; -*) - makedepends="$makedepends go-bootstrap" - _goroot_bootstrap=/usr/lib/go-bootstrap - ;; -esac - _gotools="cover godoc stringer" _tooldir="$srcdir"/tools-${_toolsver} @@ -48,20 +36,26 @@ builddir="$srcdir"/$pkgname build() { cd "$builddir/src" + case "$CTARGET_ARCH" in + aarch64)export GOARCH="arm64" ;; + armhf) export GOARCH="arm" GOARM=6 ;; + armv7) export GOARCH="arm" GOARM=7 ;; + s390x) export GOARCH="s390x" ;; + x86) export GOARCH="386" GO386=387 ;; + x86_64) export GOARCH="amd64" ;; + *) die "Unsupported arch" ;; + esac + export GOPATH="$srcdir" export GOROOT="$builddir" export GOBIN="$GOROOT"/bin export GOROOT_FINAL=/usr/lib/go - export GOROOT_BOOTSTRAP="$_goroot_bootstrap" - - case "$CARCH" in - aarch64)export GOARCH="arm64" ;; - armhf) export GOARCH="arm" GOARM=6 ;; - armv7) export GOARCH="arm" GOARM=7 ;; - x86) export GOARCH="386" GO386=387 ;; - x86_64) export GOARCH="amd64" ;; - *) return 1 ;; - esac + local p; for p in /usr/lib/go-bootstrap /usr/lib/go-linux-$GOARCH-bootstrap /usr/lib/go; do + if [ -d "$p" ]; then + export GOROOT_BOOTSTRAP="$p" + break + fi + done ./make.bash --no-clean || return 1 for os in $_gocross; do @@ -146,15 +140,6 @@ _crosspkg() { "$subpkgdir"/usr/lib/go/pkg/ || return 1 } -md5sums="49c1076428a5d3b5ad7ac65233fcca2f go1.7.4.src.tar.gz -9e14a20ca24062e0855293bc8d38c00b go-tools-1.7.4.tar.gz -1e3ad4f657ac6c22a92e8fc907893e4f default-buildmode-pie.patch -3bda1b07117ed599a991877465eaffdd go-linux-musl-arm64-bootstrap.tar.bz2" -sha256sums="4c189111e9ba651a2bb3ee868aa881fab36b2f2da3409e80885ca758a6b614cc go1.7.4.src.tar.gz -b796a67a568ca0df5a5a9a1870703db281b17907f812b9cf6ff42568f6764275 go-tools-1.7.4.tar.gz -f3e5a8e0c1c05c34f489ccbfb65291ab2265fa0ef04b8b501e5c98b17547c4b9 default-buildmode-pie.patch -a1d870570317f5e87c606d6bad0d435a594fed802c99475ab306768dc853a029 go-linux-musl-arm64-bootstrap.tar.bz2" sha512sums="dc9950c3ea7100e536ad58fd93505d584276b7c50d4b8fe2ba7f20fd043dcf0d315b735c48945302055e91517594cc2b0061ccec9478a8ab48f1f2836c20afb3 go1.7.4.src.tar.gz 553be713d03f1a53605c41f67822c75d86dacf9ccba9f2329e111b4178287aee1ddccd3ccc4ab76b9dbcff34f11aeddebce5deac47e715ea75d032bc9ab0355c go-tools-1.7.4.tar.gz -13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch -da2a33c7bafe11bdad12e755bfe19c9f8ab34ae14899712a0e10da202d5457af419a920be5ffa19cc03d2351194b5c02f1edb595201f81dfb8a51f34b42a8162 go-linux-musl-arm64-bootstrap.tar.bz2" +13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch" |