@@ -1,11 +0,0 @@
|
||||
--- go.orig/src/cmd/dist/buildtool.go 2015-09-08 21:24:01.000000000 -0400
|
||||
+++ go/src/cmd/dist/buildtool.go 2015-09-12 11:34:53.808544100 -0400
|
||||
@@ -108,7 +108,7 @@
|
||||
os.Setenv("GOHOSTARCH", "")
|
||||
|
||||
// Run Go 1.4 to build binaries.
|
||||
- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-v", "bootstrap/...")
|
||||
+ run(workspace, ShowOutput|CheckExit, "go", "install", "-v", "bootstrap/...")
|
||||
|
||||
// Copy binaries into tool binary directory.
|
||||
for _, name := range bootstrapDirs {
|
||||
@@ -1,28 +0,0 @@
|
||||
--- go.org/src/make.bat 2015-09-08 21:24:02.000000000 -0400
|
||||
+++ go/src/make.bat 2015-09-12 14:22:08.562197600 -0400
|
||||
@@ -59,13 +59,13 @@
|
||||
echo ##### Building Go bootstrap tool.
|
||||
echo cmd/dist
|
||||
if not exist ..\bin\tool mkdir ..\bin\tool
|
||||
-if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4
|
||||
-if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
|
||||
+
|
||||
+if not exist "%GOROOT_BOOTSTRAP%\..\..\bin\go.exe" goto bootstrapfail
|
||||
setlocal
|
||||
set GOROOT=%GOROOT_BOOTSTRAP%
|
||||
set GOOS=
|
||||
set GOARCH=
|
||||
-"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist
|
||||
+go build -o cmd\dist\dist.exe .\cmd\dist
|
||||
endlocal
|
||||
if errorlevel 1 goto fail
|
||||
.\cmd\dist\dist env -w -p >env.bat
|
||||
@@ -123,7 +123,7 @@
|
||||
goto end
|
||||
|
||||
:bootstrapfail
|
||||
-echo ERROR: Cannot find %GOROOT_BOOTSTRAP%\bin\go.exe
|
||||
+echo ERROR: Cannot find go.exe
|
||||
echo "Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4."
|
||||
|
||||
:fail
|
||||
43
mingw-w64-go/0010-go1.7-proper-go-binary-path.patch
Normal file
43
mingw-w64-go/0010-go1.7-proper-go-binary-path.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
|
||||
index a535316..b218c6a 100644
|
||||
--- a/src/cmd/dist/buildtool.go
|
||||
+++ b/src/cmd/dist/buildtool.go
|
||||
@@ -119,7 +119,7 @@ func bootstrapBuildTools() {
|
||||
// Run Go 1.4 to build binaries. Use -gcflags=-l to disable inlining to
|
||||
// workaround bugs in Go 1.4's compiler. See discussion thread:
|
||||
// https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ
|
||||
- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-gcflags=-l", "-v", "bootstrap/...")
|
||||
+ run(workspace, ShowOutput|CheckExit, "go", "install", "-gcflags=-l", "-v", "bootstrap/...")
|
||||
|
||||
// Copy binaries into tool binary directory.
|
||||
for _, name := range bootstrapDirs {
|
||||
diff --git a/src/make.bat b/src/make.bat
|
||||
index bf25b95..a4e3bf1 100644
|
||||
--- a/src/make.bat
|
||||
+++ b/src/make.bat
|
||||
@@ -62,14 +62,13 @@ cd src
|
||||
echo ##### Building Go bootstrap tool.
|
||||
echo cmd/dist
|
||||
if not exist ..\bin\tool mkdir ..\bin\tool
|
||||
-if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4
|
||||
-if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
|
||||
+if not exist "%GOROOT_BOOTSTRAP%\..\..\bin\go.exe" goto bootstrapfail
|
||||
setlocal
|
||||
set GOROOT=%GOROOT_BOOTSTRAP%
|
||||
set GOOS=
|
||||
set GOARCH=
|
||||
set GOBIN=
|
||||
-"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist
|
||||
+go build -o cmd\dist\dist.exe .\cmd\dist
|
||||
endlocal
|
||||
if errorlevel 1 goto fail
|
||||
.\cmd\dist\dist env -w -p >env.bat
|
||||
@@ -127,7 +126,7 @@ copy cmd\dist\dist.exe "%GOTOOLDIR%\"
|
||||
goto end
|
||||
|
||||
:bootstrapfail
|
||||
-echo ERROR: Cannot find %GOROOT_BOOTSTRAP%\bin\go.exe
|
||||
+echo ERROR: Cannot find go.exe
|
||||
echo "Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4."
|
||||
|
||||
:fail
|
||||
@@ -3,7 +3,7 @@
|
||||
_realname=go
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=1.6.2
|
||||
pkgver=1.7
|
||||
pkgrel=1
|
||||
pkgdesc="Go Lang (mingw-w64)"
|
||||
arch=('any')
|
||||
@@ -14,19 +14,16 @@ depends=()
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
options=('!strip')
|
||||
source=("https://golang.org/dl/go${pkgver}.src.tar.gz"
|
||||
0001-run-proper-go.path
|
||||
0002-run-proper-go.path)
|
||||
sha256sums=('787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc'
|
||||
'535fd6c2bffed5a7c117065b066029f8eebf02ef4deffbf0a398a1b3d2e707f9'
|
||||
'32827d77b497c75043e721911fdf5be4639d887336107756098ab3d76cfcafde')
|
||||
0010-go1.7-proper-go-binary-path.patch)
|
||||
sha256sums=('72680c16ba0891fcf2ccf46d0f809e4ecf47bbf889f5d884ccb54c5e9a17e1c0'
|
||||
'feccfe481221f063acef00f7d9daf33ce0f369b2a065513067d8308d56258cc5')
|
||||
|
||||
prepare() {
|
||||
[[ -d "${srcdir}"/${_realname}-${pkgver} ]] && rm -rf "${srcdir}"/${_realname}-${pkgver}
|
||||
mv "${srcdir}"/${_realname} "${srcdir}"/${_realname}-${pkgver}
|
||||
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
patch -p1 -i ${srcdir}/0001-run-proper-go.path
|
||||
patch -p1 -i ${srcdir}/0002-run-proper-go.path
|
||||
patch -p1 -i ${srcdir}/0010-go1.7-proper-go-binary-path.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user