Page MenuHomeFreeBSD

Convert all Go ports to USES=go
ClosedPublic

Authored by dmgk on Jun 24 2019, 5:51 PM.

Details

Summary

This is a followup to https://reviews.freebsd.org/D20570 and depends on https://reviews.freebsd.org/D20735

Convert remaining 110 ports that use explicit BUILD_DEPENDS/RUN_DEPENDS on lang/go to USES=go.

The proposed change is deliberately minimal and only affects _DEPENDS/USES declarations, leaving all build/install targets in place (even if they are now redundant with USES=go).

Tested with poudiere bulk of 258 Go ports that are currently in the ports tree.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The proposed change is deliberately minimal and only affects _DEPENDS/USES declarations, leaving all build/install targets in place (even if they are now redundant with USES=go).

After this review I hope we can eventually convert every port with custom build/install targets to USES=go

lang/go-devel/Makefile
5 ↗(On Diff #58959)

This seems to not belong in this review ;)

net/wireguard-go/Makefile
22 ↗(On Diff #58959)

Maybe we can use USES=go:modules,build here and

MAKE_ENV=	GOFLAGS="${GO_BUILDFLAGS}"
print/cloud-print-connector/Makefile
38–49 ↗(On Diff #58959)

(This looks like it could trivially be converted to GO_TARGET by more or less dropping do-build, do-install and renaming BIN_FILES to GO_TARGET.)

59–63 ↗(On Diff #58959)

I wonder if all of these are really still needed?

This probably needs an exp-run to make sure nothing breaks.

Rename build to no_targets, address tobik@ feedback.

dmgk marked 3 inline comments as done.Jun 26 2019, 1:10 PM

The proposed change is deliberately minimal and only affects _DEPENDS/USES declarations, leaving all build/install targets in place (even if they are now redundant with USES=go).

After this review I hope we can eventually convert every port with custom build/install targets to USES=go

My plan is to do another run over Go ports after this gets merged, to fix build failures with lang/go-devel (currently about 45) and do more cleanup along the way.

devel/grumpy/Makefile
12–18 ↗(On Diff #59050)

This is buggy, RUN_DEPENDS now gets a value you cannot guess. Best remove it and add run to USES=go.

Fix devel/grumpy RUN_DEPENDS; add missed ports:

  • databases/cockroach
  • devel/gitlab-shell
  • devel/gvp
  • devel/gpm
dmgk marked an inline comment as done.Jun 26 2019, 5:14 PM

Ok, so, I am not going to go through the whole patch again. Only use USES=go:no_targets when the targets are added by the framework, like with cmake.
If the port has a do-build and a do-install target use USES=go, do not add the :no_targets.

databases/cockroach/Makefile
23 ↗(On Diff #59067)

USES=go is enough.

devel/gitlab-shell/Makefile
15 ↗(On Diff #59067)

USES=go is enough.

Remove unnecessary :no_targets (databases/cockroach, devel/gitlab-shell, sysutils/docker-freebsd)

dmgk marked 2 inline comments as done.Jun 26 2019, 7:58 PM
This revision is now accepted and ready to land.Jun 29 2019, 3:50 AM
This revision was automatically updated to reflect the committed changes.