On Monday 07 December 2015 14:18:52 Kent R. Spillner wrote: > On Tue, Dec 08, 2015 at 02:29:03AM +1100, Joel Sing wrote: > > This brings me to the next issue/topic - installing additional packages > > under /usr/local/go is probably a bad idea. > > My recollection is that the other issues you mentioned were necessary in > order to make this work. So if everyone agrees to a fix for this then I > believe the others just go away. > > > There are likely two options - we could install packages in a separate > > location (e.g. /usr/local/go-pkg) and then when code is built it is added > > to GOPATH. Alternatively, the code is fetched and built when the binary > > is built > > I think option #1 (install packages in a separate location and then add it > to GOPATH) is our only choice because ports shouldn't fetch anything during > builds.
I was moreso thinking along the lines of using 'go get -d' to fetch the sources, then you can build as per normal. Obviously that means building all dependencies for each OpenBSD package build (which has both pros and cons). > Is it possible to just add /usr/local/go-pkg to GOPATH and then > have Go automatically pick up anything installed correctly under that > directory? Or would we add each dependency installed under > /usr/local/go-pkg to GOPATH separately? Alternatively, we could just roll > & host our own distfiles that include all of the dependencies. I thought > about doing that for > net/websocketd, but ultimately decided it would be ok to install a library > from the golang.org/x/net package in /usr/local/go. Sorry! :) Using /usr/local/go-pkg would be no different to using a GOPATH and local workspace - you can install multiple packages into that location and they will be picked up during a go build/install. If this is they preferred option then I'll draft some diffs.