1 |
commit: ce9faeb87f6b0d117848b382fd8d7d1cfd70c568 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 2 19:26:28 2015 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 2 19:37:00 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce9faeb8 |
7 |
|
8 |
dev-lang/go: add patch for darwin by yegle in bug #558368 |
9 |
|
10 |
Package-Manager: portage-2.2.20-prefix |
11 |
|
12 |
dev-lang/go/files/go-1.5.1-darwin-sysctl.patch | 11 +++++++++++ |
13 |
dev-lang/go/go-1.5.1.ebuild | 2 ++ |
14 |
2 files changed, 13 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 0000000..5cec4b6 |
19 |
--- /dev/null |
20 |
+++ b/dev-lang/go/files/go-1.5.1-darwin-sysctl.patch |
21 |
@@ -0,0 +1,11 @@ |
22 |
+--- src/cmd/dist/util.go. |
23 |
++++ src/cmd/dist/util.go |
24 |
+@@ -404,7 +404,7 @@ |
25 |
+ switch gohostos { |
26 |
+ case "darwin": |
27 |
+ // Even on 64-bit platform, darwin uname -m prints i386. |
28 |
+- if strings.Contains(run("", CheckExit, "sysctl", "machdep.cpu.extfeatures"), "EM64T") { |
29 |
++ if strings.Contains(run("", CheckExit, "/usr/sbin/sysctl", "machdep.cpu.extfeatures"), "EM64T") { |
30 |
+ gohostarch = "amd64" |
31 |
+ } |
32 |
+ case "solaris": |
33 |
|
34 |
diff --git a/dev-lang/go/go-1.5.1.ebuild b/dev-lang/go/go-1.5.1.ebuild |
35 |
index 8d4c715..139b350 100644 |
36 |
--- a/dev-lang/go/go-1.5.1.ebuild |
37 |
+++ b/dev-lang/go/go-1.5.1.ebuild |
38 |
@@ -54,6 +54,7 @@ go_arch() |
39 |
local portage_arch=$(tc-arch $@) |
40 |
case "${portage_arch}" in |
41 |
x86) echo 386;; |
42 |
+ x64-*) echo amd64;; |
43 |
*) echo "${portage_arch}";; |
44 |
esac |
45 |
} |
46 |
@@ -112,6 +113,7 @@ src_prepare() |
47 |
sed -i -e 's/"-Werror",//g' src/cmd/dist/build.go || |
48 |
die 'sed failed' |
49 |
fi |
50 |
+ epatch "${FILESDIR}"/${P}-darwin-sysctl.patch |
51 |
epatch_user |
52 |
} |