golang: Download bootstrap source directly, use golang-specific mirrors

These changes are a result of this conversation:
1929265024 (r29531922)

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
Jeffery To 2018-06-29 14:57:50 +08:00
parent 665f3d2bbc
commit 5d289ccd6a

View file

@ -10,15 +10,14 @@ include ../golang-version.mk
PKG_NAME:=golang PKG_NAME:=golang
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH)) PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
PKG_RELEASE:=1 PKG_RELEASE:=2
GO_SOURCE_URLS:=https://dl.google.com/go/ \
https://mirrors.ustc.edu.cn/golang/ \
https://mirrors.nju.edu.cn/golang/
PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=https://golang.org/dl/ \ PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
https://dl.google.com/go/ \
https://fossies.org/linux/misc/ \
http://distfiles.gentoo.org/distfiles/ \
https://ftp.netbsd.org/pub/pkgsrc/distfiles/ \
https://distfiles.macports.org/go/
PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2 PKG_HASH:=567b1cc66c9704d1c019c50bef946272e911ec6baf244310f87f4e678be155f2
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
@ -56,15 +55,9 @@ HOST_GO_VALID_OS_ARCH:= \
\ \
linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le linux_ppc64 linux_ppc64le linux_mips linux_mipsle linux_mips64 linux_mips64le
BOOTSTRAP_SOURCE_PROTO:=git BOOTSTRAP_SOURCE:=go1.4-bootstrap-20171003.tar.gz
BOOTSTRAP_SOURCE_URL:=https://github.com/golang/go.git BOOTSTRAP_SOURCE_URL:=$(GO_SOURCE_URLS)
BOOTSTRAP_SOURCE_VERSION:=4d5426a570c2820c5894a61b52e3dc147e4e7925 BOOTSTRAP_HASH:=f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52
BOOTSTRAP_SOURCE_DATE:=20170926
BOOTSTRAP_MIRROR_HASH:=a3e26ee7c96486c841d29cbea3bf548ce2d999b9235275091cbe60ae6efa4cb1
BOOTSTRAP_VERSION:=$(BOOTSTRAP_SOURCE_DATE)-$(call version_abbrev,$(BOOTSTRAP_SOURCE_VERSION))
BOOTSTRAP_SOURCE_SUBDIR:=golang-bootstrap-$(BOOTSTRAP_VERSION)
BOOTSTRAP_SOURCE:=$(BOOTSTRAP_SOURCE_SUBDIR).tar.xz
BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap BOOTSTRAP_BUILD_DIR:=$(HOST_BUILD_DIR)/.go_bootstrap
@ -86,7 +79,7 @@ include ../golang-package.mk
PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE) HOST_UNPACK:=$(HOST_TAR) -C $(HOST_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xJf $(DL_DIR)/$(BOOTSTRAP_SOURCE) BOOTSTRAP_UNPACK:=$(HOST_TAR) -C $(BOOTSTRAP_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(BOOTSTRAP_SOURCE)
# don't strip ELF executables in test data (and go itself) # don't strip ELF executables in test data (and go itself)
RSTRIP:=: RSTRIP:=:
@ -153,10 +146,7 @@ endef
define Download/golang-bootstrap define Download/golang-bootstrap
FILE:=$(BOOTSTRAP_SOURCE) FILE:=$(BOOTSTRAP_SOURCE)
URL:=$(BOOTSTRAP_SOURCE_URL) URL:=$(BOOTSTRAP_SOURCE_URL)
SUBDIR:=$(BOOTSTRAP_SOURCE_SUBDIR) HASH:=$(BOOTSTRAP_HASH)
PROTO:=$(BOOTSTRAP_SOURCE_PROTO)
MIRROR_HASH:=$(BOOTSTRAP_MIRROR_HASH)
VERSION:=$(BOOTSTRAP_SOURCE_VERSION)
endef endef
$(eval $(call Download,golang-bootstrap)) $(eval $(call Download,golang-bootstrap))