Porter's Handbook: Document new GO_TARGET syntax

Submitted by:	dmgk
Approved by:	bcr
Differential Revision:	https://reviews.freebsd.org/D21609
This commit is contained in:
Tobias Kortkamp 2019-09-16 11:32:38 +00:00
parent e399dedefd
commit 178ffea011
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=53409
2 changed files with 32 additions and 13 deletions

View file

@ -1313,6 +1313,24 @@ daviddengcn-go-colortext-186a3d44e920_GH0.tar. 4534 B 1098 kBps 00s
like with <application>Poudriere</application>, remember to like with <application>Poudriere</application>, remember to
run <command>make clean</command> before any testing.</para> run <command>make clean</command> before any testing.</para>
</example> </example>
<example xml:id="go-ex2">
<title>Setting Output Binary Name or Installation Path</title>
<para>Some ports need to install the resulting binary under a
different name or to a path other than
the default <literal>${PREFIX}/bin</literal>. This can be
done by using <varname>GO_TARGET</varname> tuple syntax,
for example:</para>
<programlisting>GO_TARGET= ./cmd/ipfs:ipfs-go</programlisting>
<para>will install <literal>ipfs</literal> binary as
<literal>${PREFIX}/bin/ipfs-go</literal> and</para>
<programlisting>GO_TARGET= ./dnscrypt-proxy:${PREFIX}/sbin/dnscrypt-proxy</programlisting>
<para>will install <literal>dnscrypt-proxy</literal> to
<literal>${PREFIX}/sbin</literal>.</para>
</example>
</sect2> </sect2>
</sect1> </sect1>

View file

@ -1168,17 +1168,14 @@ USE_GNOME= gnomemenus3:build intlhack</programlisting>
<term><varname>GO_PKGNAME</varname></term> <term><varname>GO_PKGNAME</varname></term>
<listitem> <listitem>
<para>The name of the <application>Go</application> package. <para>The name of the <application>Go</application> package
When building in GOPATH mode, this is the directory that when building in GOPATH mode. This is the directory that
will be created in <literal>${GOPATH}/src</literal> and will be created in <literal>${GOPATH}/src</literal>. If
seen by the <command>go</command>. When building in not set explicitly and <varname>GH_SUBDIR</varname> or
modules-aware mode, no GOPATH directories will be created <varname>GL_SUBDIR</varname> is present,
and <varname>GO_PKGNAME</varname> value will be only used <varname>GO_PKGNAME</varname> will be inferred from it.
as a default for <varname>GO_TARGET</varname>. If not set It is not needed when building in modules-aware
explicitly and <varname>GH_SUBDIR</varname> is present, mode.</para>
<varname>GO_PKGNAME</varname> value will be inferred from
<varname>${GH_SUBDIR}</varname>, otherwise it will be set
to <varname>${PORTNAME}</varname>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -1186,8 +1183,12 @@ USE_GNOME= gnomemenus3:build intlhack</programlisting>
<term><varname>GO_TARGET</varname></term> <term><varname>GO_TARGET</varname></term>
<listitem> <listitem>
<para>The name of the packages to build. The default <para>The packages to build. The default
value is <varname>${GO_PKGNAME}</varname>.</para> value is <varname>${GO_PKGNAME}</varname>.
<varname>GO_TARGET</varname> can also be a tuple in the
form <literal>package:path</literal> where path can be
either a simple filename or a full path starting with
<literal>${PREFIX}</literal>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>