mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
community/go to 1.15.5-2
This commit is contained in:
parent
af06c805f7
commit
02cea542d4
2 changed files with 32 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
pkgname=go
|
pkgname=go
|
||||||
epoch=2
|
epoch=2
|
||||||
pkgver=1.15.5
|
pkgver=1.15.5
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc='Core compiler tools for the Go programming language'
|
pkgdesc='Core compiler tools for the Go programming language'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
url='https://golang.org/'
|
url='https://golang.org/'
|
||||||
|
@ -28,15 +28,18 @@ replaces=(go-pie)
|
||||||
provides=(go-pie)
|
provides=(go-pie)
|
||||||
options=(!strip staticlibs)
|
options=(!strip staticlibs)
|
||||||
source=(https://storage.googleapis.com/golang/go$pkgver.src.tar.gz{,.asc}
|
source=(https://storage.googleapis.com/golang/go$pkgver.src.tar.gz{,.asc}
|
||||||
"fix-color.patch::https://github.com/golang/go/commit/29634436fd741a7c685bf8f242b6fd62f093d1ad.patch")
|
"fix-color.patch::https://github.com/golang/go/commit/29634436fd741a7c685bf8f242b6fd62f093d1ad.patch"
|
||||||
|
"fix-ldflags.patch")
|
||||||
validpgpkeys=('EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796')
|
validpgpkeys=('EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796')
|
||||||
sha256sums=('c1076b90cf94b73ebed62a81d802cd84d43d02dea8c07abdc922c57a071c84f1'
|
sha256sums=('c1076b90cf94b73ebed62a81d802cd84d43d02dea8c07abdc922c57a071c84f1'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'f6bf4c18e4395bdd4925b1f15a713fa3daca0a28123d6c20d51234d7ce2d3357')
|
'f6bf4c18e4395bdd4925b1f15a713fa3daca0a28123d6c20d51234d7ce2d3357'
|
||||||
|
'57793df3095606f930b95c8b40deca6a0c9dbc3b3fcc491ad77a91c01f67c12e')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${pkgname}"
|
cd "${pkgname}"
|
||||||
patch -Np1 < "$srcdir/fix-color.patch"
|
patch -Np1 < "$srcdir/fix-color.patch"
|
||||||
|
patch -Np1 < "$srcdir/fix-ldflags.patch"
|
||||||
}
|
}
|
||||||
|
|
||||||
case "$CARCH" in
|
case "$CARCH" in
|
||||||
|
|
26
community/go/fix-ldflags.patch
Normal file
26
community/go/fix-ldflags.patch
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
|
||||||
|
index 2c40a4b..157ac4c 100644
|
||||||
|
--- a/src/cmd/go/internal/work/exec.go
|
||||||
|
+++ b/src/cmd/go/internal/work/exec.go
|
||||||
|
@@ -2883,6 +2883,21 @@
|
||||||
|
idx = bytes.Index(src, []byte(cgoLdflag))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // We expect to find the contents of cgoLDFLAGS in flags.
|
||||||
|
+ if len(cgoLDFLAGS) > 0 {
|
||||||
|
+ outer:
|
||||||
|
+ for i := range flags {
|
||||||
|
+ for j, f := range cgoLDFLAGS {
|
||||||
|
+ if f != flags[i+j] {
|
||||||
|
+ continue outer
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ flags = append(flags[:i], flags[i+len(cgoLDFLAGS):]...)
|
||||||
|
+ break
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if err := checkLinkerFlags("LDFLAGS", "go:cgo_ldflag", flags); err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}
|
Loading…
Reference in a new issue