From 510ef578c0b7b386f70b9a006eed4c9f2de9332a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Fri, 19 Feb 2021 17:24:28 -0300 Subject: [PATCH] common/build-style: remove go_get from Go style. Fix Manual accordingly, and also fix indentation to be compatible with nearby items. The two packages which set this variable set it explicitly to "no", so it wasn't relied upon. From its description, it was recommended only for git packages, which by default don't fit Void's packaging guidelines. Removing to avoid anyone coming to rely on it. --- Manual.md | 15 +++++---------- common/build-style/go.sh | 2 +- srcpkgs/doctl/template | 1 - srcpkgs/goimapnotify/template | 1 - 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/Manual.md b/Manual.md index 86dfeff6103..ddb9bec934c 100644 --- a/Manual.md +++ b/Manual.md @@ -914,12 +914,11 @@ that do such things as append (`+=`) to variables, should have `make_use_env` set in the body of the template. - `go` For programs written in Go that follow the standard package - structure. The variable `go_import_path` must be set to the package's - import path, e.g. `github.com/github/hub` for the `hub` program. If - the variable `go_get` is set to `yes`, the package will be - downloaded with `go get`. Otherwise (the default) it's expected that - the distfile contains the package. In both cases, dependencies will - be downloaded with `go get`. +structure. The variable `go_import_path` must be set to the package's +import path, e.g. `github.com/github/hub` for the `hub` program. This +information can be found in the `go.mod` file for modern Go projects. +It's expected that the distfile contains the package, but dependencies +will be downloaded with `go get`. - `meta` For `meta-packages`, i.e packages that only install local files or simply depend on additional packages. This build style does not install @@ -1585,10 +1584,6 @@ The following template variables influence how Go packages are built: variable is required. - `go_package`: A space-separated list of import paths of the packages that should be built. Defaults to `go_import_path`. -- `go_get`: If set to yes, the package specified via `go_import_path` - will be downloaded with `go get`. Otherwise, a distfile has to be - provided. This option should only be used with `-git` (or similar) - packages; using a versioned distfile is preferred. - `go_build_tags`: An optional, space-separated list of build tags to pass to Go. - `go_mod_mode`: The module download mode to use. May be `off` to ignore diff --git a/common/build-style/go.sh b/common/build-style/go.sh index c9f476b95c7..d18116ee963 100644 --- a/common/build-style/go.sh +++ b/common/build-style/go.sh @@ -15,7 +15,7 @@ do_configure() { if [ "${go_mod_mode}" != "off" ] && [ -f go.mod ]; then # Skip GOPATH symlink for Go modules msg_normal "Building $pkgname using Go modules.\n" - elif [ "${go_get}" != "yes" ]; then + else mkdir -p ${GOSRCPATH%/*}/ ln -fs "$PWD" "${GOSRCPATH}" fi diff --git a/srcpkgs/doctl/template b/srcpkgs/doctl/template index 926126ac0e2..a8bff28abc2 100644 --- a/srcpkgs/doctl/template +++ b/srcpkgs/doctl/template @@ -5,7 +5,6 @@ revision=1 build_style=go go_import_path="github.com/digitalocean/doctl/cmd/doctl" go_build_tags="v${version}" -go_get="no" short_desc="Command line tool for DigitalOcean services" maintainer="Benjamín Albiñana " license="Apache-2.0" diff --git a/srcpkgs/goimapnotify/template b/srcpkgs/goimapnotify/template index 3e4bd5edfca..2c045c337fd 100644 --- a/srcpkgs/goimapnotify/template +++ b/srcpkgs/goimapnotify/template @@ -4,7 +4,6 @@ version=2.0 revision=1 build_style=go go_import_path="gitlab.com/shackra/goimapnotify" -go_get="no" hostmakedepends="git" short_desc="Execute scripts on IMAP idle notifications (Go version)" maintainer="Andrew J. Hesford "