aboutsummaryrefslogtreecommitdiffstats
path: root/community/go/APKBUILD
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2016-08-15 23:15:34 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2016-08-15 23:15:42 +0000
commitf2fb2eadf2de77c004d01a181928541597b23312 (patch)
treeb83690e833c05e79970eafa6aa55b23e851eb21b /community/go/APKBUILD
parent2276d9bd7b52ecd9b1697105f2cac9f746c72ba5 (diff)
downloadaports-f2fb2eadf2de77c004d01a181928541597b23312.tar.bz2
aports-f2fb2eadf2de77c004d01a181928541597b23312.tar.xz
community/go: add support for aarch64
Diffstat (limited to 'community/go/APKBUILD')
-rw-r--r--community/go/APKBUILD25
1 files changed, 20 insertions, 5 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD
index 82d3269706..89f986a046 100644
--- a/community/go/APKBUILD
+++ b/community/go/APKBUILD
@@ -11,7 +11,7 @@ arch="all"
license="BSD"
depends=""
depends_dev=""
-makedepends="bash go-bootstrap paxmark"
+makedepends="bash paxmark"
options="!strip"
install=""
subpackages="$pkgname-doc $pkgname-tools $pkgname-cross"
@@ -23,6 +23,18 @@ source="http://golang.org/dl/go${pkgver/_/}.src.tar.gz
# 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)
+source="$source http://dev.alpinelinux.org/bootstrap/go/go-linux-musl-arm64-bootstrap.tar.bz2"
+_goroot_bootstrap="$srcdir"/go-linux-arm64-bootstrap
+;;
+*)
+makedepends="$makedepends go-bootstrap"
+_goroot_bootstrap=/usr/lib/go-bootstrap
+;;
+esac
+
_gotools="cover godoc stringer"
_gocross="darwin freebsd openbsd windows"
_tooldir="$srcdir"/tools-${_toolsver}
@@ -35,7 +47,7 @@ build() {
export GOROOT="$builddir"
export GOBIN="$GOROOT"/bin
export GOROOT_FINAL=/usr/lib/go
- export GOROOT_BOOTSTRAP=/usr/lib/go-bootstrap
+ export GOROOT_BOOTSTRAP="$_goroot_bootstrap"
case "$CARCH" in
aarch64)export GOARCH="arm64" ;;
@@ -139,10 +151,13 @@ cross() {
md5sums="c55787c07d3fdc3eba0eae28c2f16ce7 go1.7rc4.src.tar.gz
24099025de8422aa8b50341ea71bad0e go-tools-1.7rc4.tar.gz
-1e3ad4f657ac6c22a92e8fc907893e4f default-buildmode-pie.patch"
+1e3ad4f657ac6c22a92e8fc907893e4f default-buildmode-pie.patch
+3bda1b07117ed599a991877465eaffdd go-linux-musl-arm64-bootstrap.tar.bz2"
sha256sums="f669d64cd28be4ecaa36d3a31c3060b4f6e3f801e2e37f91c3a896ce3d28f64d go1.7rc4.src.tar.gz
89819a5a457d1771bc5960079ed6f0e2870c81aafd3e0b13f0b82fc2427a1220 go-tools-1.7rc4.tar.gz
-f3e5a8e0c1c05c34f489ccbfb65291ab2265fa0ef04b8b501e5c98b17547c4b9 default-buildmode-pie.patch"
+f3e5a8e0c1c05c34f489ccbfb65291ab2265fa0ef04b8b501e5c98b17547c4b9 default-buildmode-pie.patch
+a1d870570317f5e87c606d6bad0d435a594fed802c99475ab306768dc853a029 go-linux-musl-arm64-bootstrap.tar.bz2"
sha512sums="496bc1e65dd9fed4fb3c5d5ef636e5559b03b991c04af9165069d63aab2fda36fcd4bcb63021a62601f2690558c9f3888f8d66e577212143831c9dc644ca0614 go1.7rc4.src.tar.gz
c298f821033f9db3cd100e38346474c3982417958f347078abfff895834964251269116535e46aa5c2a9e58c421928b874ea98e5c5cd65a83c0b64ae04029d3e go-tools-1.7rc4.tar.gz
-13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch"
+13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch
+da2a33c7bafe11bdad12e755bfe19c9f8ab34ae14899712a0e10da202d5457af419a920be5ffa19cc03d2351194b5c02f1edb595201f81dfb8a51f34b42a8162 go-linux-musl-arm64-bootstrap.tar.bz2"