Date: Sat, 6 Jul 2019 17:10:01 -0500 From: Dmitri Goutnik <dg@syrec.org> To: freebsd-ports@freebsd.org Subject: Re: How to handle go dependencies Message-ID: <20190706221001.GB86243@xombo.localdomain> In-Reply-To: <52f3b04f-bf8d-0ec3-e3de-32c6d3a39485@fechner.net> References: <5d0e8e03.1c69fb81.5e249.9640@mx.google.com> <CAP7rwchtYTf5XPoTgk6B2drdPjzP%2B5opq-sN=kGsTJei6dT_Dg@mail.gmail.com> <20190622205205.GB40599@xombo.localdomain> <4de2a97c-8c41-74e4-cda1-4fdec9554e8f@fechner.net> <20190623095737.GA89814@urd.tobik.me> <d033ae4e-0d9c-183e-bd59-58117dde9460@fechner.net> <20190623214048.GE40599@xombo.localdomain> <07e99b4c-cf7e-49bb-d0a0-66a24c3a563f@fechner.net> <20190706194835.GA86243@xombo.localdomain> <52f3b04f-bf8d-0ec3-e3de-32c6d3a39485@fechner.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 dependencies are already in vendor directory. > > hm, it does not seems to have any impact it does not stop to complain: > # go install > go: finding github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 > 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 statFileSystemType func definition for freebsd: # gitlab.com/gitlab-org/gitaly/internal/helper/fstype internal/helper/fstype/fstype.go:7:15: undefined: statFileSystemType 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} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample + ${CP} ${WRKSRC}/internal/helper/fstype/detect_linux.go ${WRKSRC}/internal/helper/fstype/detect_freebsd.go Best regards, -- Dmitri Goutnik dg@syrec.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190706221001.GB86243>