From 8cc6ae445b3bec6b7a4c7e153ee74ed56eb91ee9 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 2 Sep 2017 00:49:36 +0200 Subject: [PATCH] go: Update from 1.8.3 to 1.9 --- packages/golang/build.sh | 4 +- packages/golang/src-cmd-go-build.go.patch | 39 ------- .../golang/src-os-user-lookup_stubs.go.patch | 12 -- packages/golang/src-os-user.patch | 106 ------------------ 4 files changed, 2 insertions(+), 159 deletions(-) delete mode 100644 packages/golang/src-cmd-go-build.go.patch delete mode 100644 packages/golang/src-os-user-lookup_stubs.go.patch delete mode 100644 packages/golang/src-os-user.patch diff --git a/packages/golang/build.sh b/packages/golang/build.sh index f689f9326..d467b3cb7 100644 --- a/packages/golang/build.sh +++ b/packages/golang/build.sh @@ -1,10 +1,10 @@ TERMUX_PKG_HOMEPAGE=https://golang.org/ TERMUX_PKG_DESCRIPTION="Go programming language compiler" -_MAJOR_VERSION=1.8.3 +local _MAJOR_VERSION=1.9 # Use the ~ deb versioning construct in the future: TERMUX_PKG_VERSION=2:${_MAJOR_VERSION} TERMUX_PKG_SRCURL=https://storage.googleapis.com/golang/go${_MAJOR_VERSION}.src.tar.gz -TERMUX_PKG_SHA256=5f5dea2447e7dcfdc50fa6b94c512e58bfba5673c039259fd843f68829d99fa6 +TERMUX_PKG_SHA256=a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993 TERMUX_PKG_FOLDERNAME=go TERMUX_PKG_KEEP_STATIC_LIBRARIES=true TERMUX_PKG_DEPENDS="clang" diff --git a/packages/golang/src-cmd-go-build.go.patch b/packages/golang/src-cmd-go-build.go.patch deleted file mode 100644 index eb8eb4017..000000000 --- a/packages/golang/src-cmd-go-build.go.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -u -r ../go/src/cmd/go/build.go ./src/cmd/go/build.go ---- ../go/src/cmd/go/build.go 2016-08-15 18:47:58.000000000 -0400 -+++ ./src/cmd/go/build.go 2016-08-18 18:05:18.471655968 -0400 -@@ -2846,7 +2846,7 @@ - ldflags = append(ldflags, "-Wl,-r", "-nostdlib", "-Wl,--whole-archive", "-lgolibbegin", "-Wl,--no-whole-archive") - - if b.gccSupportsNoPie() { -- ldflags = append(ldflags, "-no-pie") -+ ldflags = append(ldflags, "-nopie") - } - - // We are creating an object file, so we don't want a build ID. -@@ -3029,7 +3029,7 @@ - } - } - -- if strings.Contains(a[0], "clang") { -+ if runtime.GOOS == "android" { - // disable ASCII art in clang errors, if possible - a = append(a, "-fno-caret-diagnostics") - // clang is too smart about command-line arguments -@@ -3064,7 +3064,7 @@ - // -no-pie must be passed when doing a partial link with -Wl,-r. But -no-pie is - // not supported by all compilers. - func (b *builder) gccSupportsNoPie() bool { -- return b.gccSupportsFlag("-no-pie") -+ return b.gccSupportsFlag("-nopie") - } - - // gccSupportsFlag checks to see if the compiler supports a flag. -@@ -3383,7 +3383,7 @@ - ldflags := stringList(bareLDFLAGS, "-Wl,-r", "-nostdlib", staticLibs) - - if b.gccSupportsNoPie() { -- ldflags = append(ldflags, "-no-pie") -+ ldflags = append(ldflags, "-nopie") - } - - // We are creating an object file, so we don't want a build ID. diff --git a/packages/golang/src-os-user-lookup_stubs.go.patch b/packages/golang/src-os-user-lookup_stubs.go.patch deleted file mode 100644 index 32b179f51..000000000 --- a/packages/golang/src-os-user-lookup_stubs.go.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -u -r ../go/src/os/user/lookup_stubs.go ./src/os/user/lookup_stubs.go ---- ../go/src/os/user/lookup_stubs.go 2017-02-16 20:12:24.000000000 +0100 -+++ ./src/os/user/lookup_stubs.go 2017-03-18 01:30:48.037398455 +0100 -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build !cgo,!windows,!plan9,!android -+// +build !cgo,!windows,!plan9 - - package user - diff --git a/packages/golang/src-os-user.patch b/packages/golang/src-os-user.patch deleted file mode 100644 index 96271f5f5..000000000 --- a/packages/golang/src-os-user.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -N -u -r ../go/src/os/user/getgrouplist_unix.go ./src/os/user/getgrouplist_unix.go ---- ../go/src/os/user/getgrouplist_unix.go 2016-08-15 18:48:00.000000000 -0400 -+++ ./src/os/user/getgrouplist_unix.go 2016-08-17 10:33:10.485667876 -0400 -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build dragonfly freebsd !android,linux netbsd openbsd -+// +build dragonfly freebsd linux netbsd openbsd - - package user - -diff -N -u -r ../go/src/os/user/listgroups_unix.go ./src/os/user/listgroups_unix.go ---- ../go/src/os/user/listgroups_unix.go 2016-08-15 18:48:00.000000000 -0400 -+++ ./src/os/user/listgroups_unix.go 2016-08-17 10:33:10.485667876 -0400 -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build dragonfly darwin freebsd !android,linux netbsd openbsd -+// +build dragonfly darwin freebsd linux netbsd openbsd - - package user - -diff -N -u -r ../go/src/os/user/lookup_android.go ./src/os/user/lookup_android.go ---- ../go/src/os/user/lookup_android.go 2016-08-15 18:48:00.000000000 -0400 -+++ ./src/os/user/lookup_android.go 1969-12-31 19:00:00.000000000 -0500 -@@ -1,38 +0,0 @@ --// Copyright 2016 The Go Authors. All rights reserved. --// Use of this source code is governed by a BSD-style --// license that can be found in the LICENSE file. -- --// +build android -- --package user -- --import "errors" -- --func init() { -- userImplemented = false -- groupImplemented = false --} -- --func current() (*User, error) { -- return nil, errors.New("user: Current not implemented on android") --} -- --func lookupUser(string) (*User, error) { -- return nil, errors.New("user: Lookup not implemented on android") --} -- --func lookupUserId(string) (*User, error) { -- return nil, errors.New("user: LookupId not implemented on android") --} -- --func lookupGroup(string) (*Group, error) { -- return nil, errors.New("user: LookupGroup not implemented on android") --} -- --func lookupGroupId(string) (*Group, error) { -- return nil, errors.New("user: LookupGroupId not implemented on android") --} -- --func listGroups(*User) ([]string, error) { -- return nil, errors.New("user: GroupIds not implemented on android") --} -diff -N -u -r ../go/src/os/user/lookup_unix.go ./src/os/user/lookup_unix.go ---- ../go/src/os/user/lookup_unix.go 2016-08-15 18:48:00.000000000 -0400 -+++ ./src/os/user/lookup_unix.go 2016-08-17 10:42:53.604807242 -0400 -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build darwin dragonfly freebsd !android,linux netbsd openbsd solaris -+// +build darwin dragonfly freebsd linux netbsd openbsd solaris - // +build cgo - - package user -@@ -35,12 +35,14 @@ - - static int mygetgrgid_r(int gid, struct group *grp, - char *buf, size_t buflen, struct group **result) { -- return getgrgid_r(gid, grp, buf, buflen, result); -+ result = 0; -+ return 0; - } - - static int mygetgrnam_r(const char *name, struct group *grp, - char *buf, size_t buflen, struct group **result) { -- return getgrnam_r(name, grp, buf, buflen, result); -+ result = 0; -+ return 0; - } - */ - import "C" -@@ -117,8 +119,8 @@ - Uid: strconv.Itoa(int(pwd.pw_uid)), - Gid: strconv.Itoa(int(pwd.pw_gid)), - Username: C.GoString(pwd.pw_name), -- Name: C.GoString(pwd.pw_gecos), -- HomeDir: C.GoString(pwd.pw_dir), -+ Name: "", -+ HomeDir: "@TERMUX_HOME@", - } - // The pw_gecos field isn't quite standardized. Some docs - // say: "It is expected to be a comma separated list of