Re: How to handle go dependencies

2019-07-09 Thread Matthias Fechner
Am 22.06.2019 um 11:58 schrieb Matthias Fechner: > What is the correct way to getting these dependencies fetched and > correctly included into the work-source in the fetch step using go? Here a short summary what I had to do to build the port successfully with go deps. Thanks a lot for all that

Re: How to handle go dependencies

2019-07-07 Thread Eugene Grosbein
07.07.2019 5:10, Dmitri Goutnik via freebsd-ports wrote: > Which can be fixed by just copying the linux version (this probably needs to > be upstreamed): > > post-patch: > ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" > ${WRKSRC}/config.toml.example > ${MV}

Re: How to handle go dependencies

2019-07-07 Thread Matthias Fechner
Dear Dmitri, Am 07.07.2019 um 00:10 schrieb Dmitri Goutnik via freebsd-ports: > It appears that Go build flags need to be passed down to `go build` > invocation > with MAKE_ENV: > > +MAKE_ENV= GOFLAGS="${GO_BUILDFLAGS}" > > With that change, the build then fails later due to missing >

Re: How to handle go dependencies

2019-07-06 Thread Dmitri Goutnik via freebsd-ports
Hi Matthias, On 19-07-06 23:30:33, Matthias Fechner wrote: > Am 06.07.2019 um 21:48 schrieb Dmitri Goutnik: > > -USES= gmake go:no_targets > > +USES= gmake go:modules,no_targets > > > > It adds -mod=vendor build flag that tells Go to not try to download > > anything and assume that all

Re: How to handle go dependencies

2019-07-06 Thread Matthias Fechner
Am 06.07.2019 um 21:48 schrieb Dmitri Goutnik: > -USES= gmake go:no_targets > +USES= gmake go:modules,no_targets > > It adds -mod=vendor build flag that tells Go to not try to download > anything and assume that all dependencies are already in vendor directory. hm, it does not seems to have any

Re: How to handle go dependencies

2019-07-06 Thread Dmitri Goutnik via freebsd-ports
Hi Matthias, On 19-07-06 19:52:04, Matthias Fechner wrote: > I used now USES= gmake |go:no_targets| In addition to `no_targets`, you'd also want a `modules` arg : -USES= gmake go:no_targets +USES= gmake go:modules,no_targets It adds -mod=vendor build flag that tells Go to not try to

Re: How to handle go dependencies

2019-07-06 Thread Matthias Fechner
Dear Dmitri, at first thanks a lot for your suggestions. The current version of the Makefile is always here: https://gitlab.fechner.net/mfechner/Gitlab/blob/12.0/devel/gitaly/Makefile Other answer under your suggestions. Am 23.06.2019 um 23:40 schrieb Dmitri Goutnik via freebsd-ports: > +USES=

Re: How to handle go dependencies

2019-06-23 Thread Dmitri Goutnik via freebsd-ports
On 19-06-23 22:21:44, Matthias Fechner wrote: > Am 23.06.2019 um 11:57 schrieb Tobias Kortkamp: > > Please do not use it. It is broken in many ways. Use Dimtri's > > devel/modules2tuple instead. Change to WRKSRC of your port and run > > `go mod vendor` then `modules2tuple vendor/modules.txt`

Re: How to handle go dependencies

2019-06-23 Thread Matthias Fechner
Am 23.06.2019 um 11:57 schrieb Tobias Kortkamp: > Please do not use it. It is broken in many ways. Use Dimtri's > devel/modules2tuple instead. Change to WRKSRC of your port and run > `go mod vendor` then `modules2tuple vendor/modules.txt` and it will > spit out an appropriate GH_TUPLE etc.

Re: How to handle go dependencies

2019-06-23 Thread Kurt Jaeger
Hi! Dimitri wrote: > It appears that upstream moved gobgp and gobgpd packages to ./cmd, so > GO_TARGET needs to be updated: > > -GO_TARGET= ${GO_PKGNAME}/gobgp \ > - ${GO_PKGNAME}/gobgpd > +GO_TARGET= ./cmd/gobgp \ > + ./cmd/gobgpd Thanks, it seems to build.

Re: How to handle go dependencies

2019-06-23 Thread Dmitri Goutnik via freebsd-ports
On 19-06-23 12:47:22, Kurt Jaeger wrote: > Hi! > > [...] > > > can't load package: package github.com/osrg/gobgp/gobgpd: cannot find > > > package "github.com/osrg/gobgp/gobgpd" in any of: > > > /usr/local/go/src/github.com/osrg/gobgp/gobgpd (from $GOROOT) > > >

Re: How to handle go dependencies

2019-06-23 Thread Kurt Jaeger
Hi! [...] > > can't load package: package github.com/osrg/gobgp/gobgpd: cannot find > > package "github.com/osrg/gobgp/gobgpd" in any of: > > /usr/local/go/src/github.com/osrg/gobgp/gobgpd (from $GOROOT) > > /home/pi/m/net/gobgp/work/src/github.com/osrg/gobgp/gobgpd (from > > $GOPATH) >

Re: How to handle go dependencies

2019-06-23 Thread Tobias Kortkamp
On Sun, Jun 23, 2019 at 12:30:00PM +0200, Kurt Jaeger wrote: > Hi! > > > Please do not use it. It is broken in many ways. Use Dimtri's > > devel/modules2tuple instead. Change to WRKSRC of your port and run > > `go mod vendor` then `modules2tuple vendor/modules.txt` and it will > > spit out an

Re: How to handle go dependencies

2019-06-23 Thread Kurt Jaeger
Hi! > Please do not use it. It is broken in many ways. Use Dimtri's > devel/modules2tuple instead. Change to WRKSRC of your port and run > `go mod vendor` then `modules2tuple vendor/modules.txt` and it will > spit out an appropriate GH_TUPLE etc. Thanks, I tested that approach with an updated

Re: How to handle go dependencies

2019-06-23 Thread Tobias Kortkamp
On Sun, Jun 23, 2019 at 11:47:41AM +0200, Matthias Fechner wrote: > Am 22.06.2019 um 22:52 schrieb Dmitri Goutnik: > > Can be further simplified by using USES=go:modules. This will remove the > > need > > to modify MAKE_ENV as go.mk will then add -mod=vendor flag automagically. > > very

Re: How to handle go dependencies

2019-06-23 Thread Matthias Fechner
Am 22.06.2019 um 22:52 schrieb Dmitri Goutnik: > Can be further simplified by using USES=go:modules. This will remove the need > to modify MAKE_ENV as go.mk will then add -mod=vendor flag automagically. very interesting. I also found a nice mechanism in devel/bingo. It has a very nice awk

Re: How to handle go dependencies

2019-06-22 Thread Dmitri Goutnik via freebsd-ports
On 19-06-22 14:31:24, Adam Weinberger wrote: > On Sat, Jun 22, 2019 at 2:22 PM Bernhard Froehlich wrote: > > > > > > Am 22.06.2019 19:47 schrieb Adam Weinberger : > > > > > > On Sat, Jun 22, 2019 at 11:10 AM Bernhard Froehlich > > > wrote: > > > > > > > > > > > > Am 22.06.2019 17:56 schrieb

Re: How to handle go dependencies

2019-06-22 Thread Adam Weinberger
On Sat, Jun 22, 2019 at 2:22 PM Bernhard Froehlich wrote: > > > Am 22.06.2019 19:47 schrieb Adam Weinberger : > > > > On Sat, Jun 22, 2019 at 11:10 AM Bernhard Froehlich > > wrote: > > > > > > > > > Am 22.06.2019 17:56 schrieb Adam Weinberger : > > > > > > > > On Sat, Jun 22, 2019 at 8:21 AM

Re: How to handle go dependencies

2019-06-22 Thread Adam Weinberger
On Sat, Jun 22, 2019 at 11:10 AM Bernhard Froehlich wrote: > > > Am 22.06.2019 17:56 schrieb Adam Weinberger : > > > > On Sat, Jun 22, 2019 at 8:21 AM Danilo G. Baio wrote: > > > > > > On Sat, Jun 22, 2019 at 11:58:49AM +0200, Matthias Fechner wrote: > > > > Dear all, > > > > > > > > I just

Re: How to handle go dependencies

2019-06-22 Thread Adam Weinberger
On Sat, Jun 22, 2019 at 8:21 AM Danilo G. Baio wrote: > > On Sat, Jun 22, 2019 at 11:58:49AM +0200, Matthias Fechner wrote: > > Dear all, > > > > I just prepare the gitlab-ce upgrade to version 12.0.0. > > But I have some problem with a package that uses go to compile. > > > > The new version of

Re: How to handle go dependencies

2019-06-22 Thread Danilo G. Baio
On Sat, Jun 22, 2019 at 11:58:49AM +0200, Matthias Fechner wrote: > Dear all, > > I just prepare the gitlab-ce upgrade to version 12.0.0. > But I have some problem with a package that uses go to compile. > > The new version of devel/gitaly has changed the way the package is defined. > They

Re: How to handle go dependencies

2019-06-22 Thread Eugene Grosbein
22.06.2019 16:58, Matthias Fechner wrote: > Dear all, > > I just prepare the gitlab-ce upgrade to version 12.0.0. > But I have some problem with a package that uses go to compile. > > The new version of devel/gitaly has changed the way the package is defined. > They removed now all files from

How to handle go dependencies

2019-06-22 Thread Matthias Fechner
Dear all, I just prepare the gitlab-ce upgrade to version 12.0.0. But I have some problem with a package that uses go to compile. The new version of devel/gitaly has changed the way the package is defined. They removed now all files from the vendor/ folder and add dependencies in a `go.mod`