CVSROOT:        /cvs
Module name:    ports
Changes by:     js...@cvs.openbsd.org   2016/01/14 08:03:08

Modified files:
        lang/go        : go.port.mk 

Log message:
Rework go.port.mk to install packages in /usr/local/go-pkg and build
without -a, -work and without running things through sed and piping to
shell:

- Install additional packages under /usr/local/go-pkg and include this in
GOPATH when building. Go considers anything under the GOROOT to be part
of the standard library, which introduces various problems. In particular
they do not get rebuilt without the -a flag.

- Using 'go build -a' is unnecessary (at least now that we're not
installing in GOROOT). Furthermore, the semantics of -a have changed
between go1.4 and go1.5. In go1.4 the standard library was excluded from
the -a flag whereas for go1.5 it does mean all dependencies including the
standard library (this was the same for go1.3). However, there is
already blanket 'do not rebuild standard library packages' in place when
the -a flag is NOT specified.

- Avoid -work since it leaves the work directory behind and nothing is
currently cleaning it up.

- Overall, avoid running 'go install -x' and piping the results through
sed and sh. Firstly, 'go install -x' is already running those commands,
then they're being run a second time around via sh. Secondly, there are
cases where replacing GOROOT is incorrect.

ok jasper@ sthen@ kspillner@ czarkoff@

Reply via email to