HomeFreeBSD

Mk/Uses: go.mk can not load a go.mod from other locations

Description

Mk/Uses: go.mk can not load a go.mod from other locations

Not all projects are providing there go.mod file to the go proxy.
If the go.mod is not available on the go proxies it is not possible
to build the port with the go module approach.

This modification make a new variable GO_MOD_DIST availble.
With the values:

  • gitlab (to download the go.mod from gitlab)
  • github (to download the go.mod from github)
  • https://.... (a custom URI without the go.mod in it)
  • not defined (will download as now from go proxy)

This make it now possible to also easily package go based ports that
are only hosted on some sites but not published to the go proxy.

Differential Revision: https://reviews.freebsd.org/D45631

(cherry picked from commit 52b385abc68053471e9713a6ef9c81a8ce74910d)

Details