svn commit: r52938 - head/en_US.ISO8859-1/books/porters-handbook/uses

Tobias Kortkamp tobik at
Thu Apr 18 14:04:08 UTC 2019

Author: tobik (ports committer)
Date: Thu Apr 18 14:04:06 2019
New Revision: 52938

  Porter's Handbook: Update USES=go docs after ports r498386
  Submitted by:	Dmitri Goutnik <dg at>
  Approved by:	jlaffaye, mat
  Differential Revision:


Modified: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml	Thu Apr 18 12:05:46 2019	(r52937)
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml	Thu Apr 18 14:04:06 2019	(r52938)
@@ -1141,25 +1141,37 @@ USE_GNOME=	gnomemenus3:build intlhack</programlisting>
       <para>Ports should not be created for Go libs, see
-        <xref linkend="go-libs"/> for more information.</para>
+	<xref linkend="go-libs"/> for more information.</para>
-    <para>Possible arguments: (none)</para>
+    <para>Possible arguments: (none),
+      <literal>modules</literal></para>
     <para>Sets default values and targets used to build
       <application>Go</application> software.  A build-time dependency
-      on <package role="port">lang/go</package> is added.  The build
-      process is controlled by several variables:</para>
+      on <package role="port">lang/go</package> is added.  By default
+      the build is performed in GOPATH mode.  If Go software uses
+      modules, the modules-aware mode can be switched on with
+      <literal>modules</literal>.</para>
+    <para>The build process is controlled by several variables:</para>
 	  <para>The name of the <application>Go</application> package.
-	    This is the directory that will be created in
-	    <literal>GOPATH/src</literal>.  The default value is
-	    <varname>${PORTNAME}</varname>.</para>
+	    When building in GOPATH mode, this is the directory that
+	    will be created in <literal>${GOPATH}/src</literal> and
+	    seen by the <command>go</command>.  When building in
+	    modules-aware mode, no GOPATH directories will be created
+	    and <varname>GO_PKGNAME</varname> value will be only used
+	    as a default for <varname>GO_TARGET</varname>.  If not set
+	    explicitly and <varname>GH_SUBDIR</varname> is present,
+	    <varname>GO_PKGNAME</varname> value will be inferred from
+	    <varname>${GH_SUBDIR}</varname>, otherwise it will be set
+	    to  <varname>${PORTNAME}</varname>.</para>
@@ -1189,6 +1201,15 @@ USE_GNOME=	gnomemenus3:build intlhack</programlisting>
 	  <para>Additional <varname>LDFLAGS</varname> values to be
 	    passed to the <application>C</application> compiler by
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><varname>GO_BUILDFLAGS</varname></term>
+	<listitem>
+	  <para>Additional build arguments to be passed to
+	    <command>go install</command>.</para>

More information about the svn-doc-all mailing list