From ce9faeb87f6b0d117848b382fd8d7d1cfd70c568 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 2 Nov 2015 20:26:28 +0100 Subject: [PATCH] dev-lang/go: add patch for darwin by yegle in bug #558368 Package-Manager: portage-2.2.20-prefix --- dev-lang/go/files/go-1.5.1-darwin-sysctl.patch | 11 +++++++++++ dev-lang/go/go-1.5.1.ebuild | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 dev-lang/go/files/go-1.5.1-darwin-sysctl.patch diff --git a/dev-lang/go/files/go-1.5.1-darwin-sysctl.patch b/dev-lang/go/files/go-1.5.1-darwin-sysctl.patch new file mode 100644 index 000000000000..5cec4b608286 --- /dev/null +++ b/dev-lang/go/files/go-1.5.1-darwin-sysctl.patch @@ -0,0 +1,11 @@ +--- src/cmd/dist/util.go. ++++ src/cmd/dist/util.go +@@ -404,7 +404,7 @@ + switch gohostos { + case "darwin": + // Even on 64-bit platform, darwin uname -m prints i386. +- if strings.Contains(run("", CheckExit, "sysctl", "machdep.cpu.extfeatures"), "EM64T") { ++ if strings.Contains(run("", CheckExit, "/usr/sbin/sysctl", "machdep.cpu.extfeatures"), "EM64T") { + gohostarch = "amd64" + } + case "solaris": diff --git a/dev-lang/go/go-1.5.1.ebuild b/dev-lang/go/go-1.5.1.ebuild index 8d4c7158d828..139b35042ebe 100644 --- a/dev-lang/go/go-1.5.1.ebuild +++ b/dev-lang/go/go-1.5.1.ebuild @@ -54,6 +54,7 @@ go_arch() local portage_arch=$(tc-arch $@) case "${portage_arch}" in x86) echo 386;; + x64-*) echo amd64;; *) echo "${portage_arch}";; esac } @@ -112,6 +113,7 @@ src_prepare() sed -i -e 's/"-Werror",//g' src/cmd/dist/build.go || die 'sed failed' fi + epatch "${FILESDIR}"/${P}-darwin-sysctl.patch epatch_user } -- 2.26.2