commit: ce9faeb87f6b0d117848b382fd8d7d1cfd70c568
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 2 19:26:28 2015 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Mon Nov 2 19:37:00 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce9faeb8
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(+)
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 0000000..5cec4b6
--- /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 8d4c715..139b350 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
}