From nobody Thu Mar 5 21:11:23 2026 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fRhzb4CYHz6TgSj for ; Thu, 05 Mar 2026 21:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fRhzb3XDPz4MYj for ; Thu, 05 Mar 2026 21:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772745083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3I1LI6hRridGhnRpu2kl+dD1nwwCy8fKuclDwQeiD4=; b=VoqB6hYwzWxFwkkfX9myO2jc47U8u626jYwbp2pP9Wf+jr8mFf6epbxbkzMJqCV27sBVhB VEAod4b6jVgTIZl05lEED7dwSZry5md/LWau/UQOHoWTcSud4AqGK+oS8J6qnyLtjp3q3c 5otjf6To3EhZHL03olvFIdGSm+bARiEwHO5wiuINimVWjiH1jWxEeBrSN8MnR0SQ5jbcWh ZY93yezGjLiE/nuHZPP6/EuT65HDQL8EpeJJ8iO8tYFCORqo6I57ZryJIZjcHC1FS1y4c7 culljIk5VvHPNbXaz01dNRh+ZP2yQxewUUySwFbfT8mcep2zu59zkYsFxUqw6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772745083; a=rsa-sha256; cv=none; b=J+moTvXauoBY+dqNTV5XtJb1OXPtsmX2O5+TVZqA7K+lpCoHa56ytYlTszVO3FRs1aiy4S jT+0L7mtGTMmwsadVE9o/Dwqi238GJ0UgxVgPx3HQSvNKwOxmfaZ3FsBNQ4zNGjT1+m8UU A9LPxTSpuH00rguUH1mIcjAaOAF3abRMBtxgHjcsdBJtUStLL1P6B7bktnnCtCWVnhlkyv Z3uOLwhsdJEQa0679+hVyrhavmnwd4qB6oa9iE1P4nmHk83N/QzkeGYdjWOlvFLOlbQ2aS Dib6tFDvsQ8gVIdnSeHXKi+yO8e/6bMS/I9QYoWE7uTPNolviOmgOvJIUl9XJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772745083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K3I1LI6hRridGhnRpu2kl+dD1nwwCy8fKuclDwQeiD4=; b=qavapSxekwl0nrM+5JQ8nqp7i16qqwnFMkB167ExHUrR9NIL0NPCI1KvNYfQrykWiGi3E3 f0IM/EVuSs7iab866xB8BXumWbsZA9zKif7KIcQygfE/PExjGacrAPeewwe4rg3D8wO0RY MFN0UodH5xA6KGzcAZYB9DSmBe/98U3OaCLHzHui0aWKHZsbK1sRFCLG+zybtkzSLhVaUh GSIkzSxXpXZ6NSXwRKnvG+gsL6QYllzGqa668Us3u1B7Te3516cRJXBd+G0BQaRsnLO7b6 cM8KSCndXTjMaZ3tm/jkLPuPdg5cPUK8wO2ezqPg2w+ih47hIMbp7GfdHx6cgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fRhzb30gWztdP for ; Thu, 05 Mar 2026 21:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 05 Mar 2026 21:11:23 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Adam Weinberger Subject: git: 5640cefb03ff - main - Mk/Uses/go.mk: Minor documentation improvements List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adamw X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5640cefb03ffdc19a7e8989509c66059236209ec Auto-Submitted: auto-generated Date: Thu, 05 Mar 2026 21:11:23 +0000 Message-Id: <69a9f17b.275ac.40dad2c8@gitrepo.freebsd.org> The branch main has been updated by adamw: URL: https://cgit.FreeBSD.org/ports/commit/?id=5640cefb03ffdc19a7e8989509c66059236209ec commit 5640cefb03ffdc19a7e8989509c66059236209ec Author: Adam Weinberger AuthorDate: 2026-03-05 21:06:05 +0000 Commit: Adam Weinberger CommitDate: 2026-03-05 21:06:05 +0000 Mk/Uses/go.mk: Minor documentation improvements - Add links to PHB sections on porting Go apps - Reword the descriptions of most args to put the verb first (my theory is that this makes it easier to comprehend at a glance?) - Use "set up" for verb form and "setup" for noun form (my own pet peeve) - Consistently use tabs for leading whitespace --- Mk/Uses/go.mk | 53 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 18 deletions(-) diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk index 4693d55f44c4..6286aa15add0 100644 --- a/Mk/Uses/go.mk +++ b/Mk/Uses/go.mk @@ -2,20 +2,19 @@ # `go` command. # # Feature: go -# Usage: USES=go +# Usage: USES=go or USES=go:[,,...] # Valid ARGS: (none), N.NN+, N.NN, modules, no_targets, run # -# (none) Setup GOPATH and build in GOPATH mode using default Go version. +# (none) Build in GOPATH mode using default Go version. # N.NN+ Specify minimum Go version # N.NN Specify exact Go version (should be avoided) -# modules If the upstream uses Go modules, this can be set to build -# in modules-aware mode. -# no_targets Indicates that Go is needed at build time as a part of -# make/CMake build. This will setup build environment like -# GO_ENV, GO_BUILDFLAGS but will not create post-extract and -# do-{build,install,test} targets. -# run Indicates that Go is needed at run time and adds it to -# RUN_DEPENDS. +# modules Build in native, modules-aware mode (most Go ports use this) +# no_targets Use this when an app has its own make/cmake files that call Go. +# Sets up the build environment (GO_ENV, GO_BUILDFLAGS, etc.) but +# does not create make(1) targets (post-extract, do-build, +# do-install, do-test, etc.). +# run Adds the Go compiler to RUN_DEPENDS. Rarely needed; Go-based +# applications are compiled and only need Go at build time. # # Note about Go version specifiers (i.e. USES=go:1.20+): # Try to use a range (USES=go:1.20+) rather than a single-version pin @@ -29,6 +28,24 @@ # # When go.mod says "go 1.20", it's usually fine to say USES=go:1.20+. # +# === RESOURCES === +# Further documentation about porting Go-based applications: +# - https://docs.freebsd.org/en/books/porters-handbook/special/#using-go +# - https://docs.freebsd.org/en/books/porters-handbook/uses/#uses-go +# An explanation of why we accept ports only for Go-based applications, not +# libraries: +# - https://docs.freebsd.org/en/books/porters-handbook/special/#go-libs +# +# === REACHING OUT === +# For questions or assistance, reach out on mailing lists. The Go team +# monitors the FreeBSD-Go mailing list, but the FreeBSD-Ports list is far +# more active. +# - For help with porting, including Go apps (freebsd-ports@FreeBSD.org): +# https://lists.freebsd.org/subscription/freebsd-ports +# - For questions about the Go framework itself (freebsd-go@FreeBSD.org): +# https://lists.freebsd.org/subscription/freebsd-go +# +# === DOCUMENTATION ON USES=go === # You can set the following variables to control the process. # # GO_MODULE @@ -37,14 +54,14 @@ # use Go modules. # # GO_MOD_DIST -# The location to download the go.mod file if GO_MODULE is used. -# The default is empty, so it is loaded from GO_PROXY. -# Set it to "gitlab" and make sure GL_PROJECT is defined to download -# the "go.mod" from gitlab. -# Set it to "github" and make sure GH_PROJECT is defined to download -# the "go.mod" from github. -# You can also set it completely manually a URI without go.mod in it, -# is attached automatically to the URI. +# The location to download the go.mod file if GO_MODULE is used. +# The default is empty, so it is loaded from GO_PROXY. +# Set it to "gitlab" and make sure GL_PROJECT is defined to download +# the "go.mod" from gitlab. +# Set it to "github" and make sure GH_PROJECT is defined to download +# the "go.mod" from github. +# You can also set it completely manually a URI without go.mod in it, +# is attached automatically to the URI. # # GO_PKGNAME # The name of the package when building in GOPATH mode. This