Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2019 14:04:06 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r52938 - head/en_US.ISO8859-1/books/porters-handbook/uses
Message-ID:  <201904181404.x3IE46r3052527@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik (ports committer)
Date: Thu Apr 18 14:04:06 2019
New Revision: 52938
URL: https://svnweb.freebsd.org/changeset/doc/52938

Log:
  Porter's Handbook: Update USES=go docs after ports r498386
  
  Submitted by:	Dmitri Goutnik <dg@syrec.org>
  Approved by:	jlaffaye, mat
  Differential Revision:	https://reviews.freebsd.org/D19812

Modified:
  head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml

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>
 
     <important>
       <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>
     </important>
 
-    <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>
+
     <variablelist>
       <varlistentry>
 	<term><varname>GO_PKGNAME</varname></term>
 
 	<listitem>
 	  <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>
 	</listitem>
       </varlistentry>
 
@@ -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
 	    <command>go</command>.</para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><varname>GO_BUILDFLAGS</varname></term>
+
+	<listitem>
+	  <para>Additional build arguments to be passed to
+	    <command>go install</command>.</para>
 	</listitem>
       </varlistentry>
     </variablelist>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904181404.x3IE46r3052527>