pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc doc/pkgsrc.*: regen



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e9bd37d4cee2
branches:  trunk
changeset: 379661:e9bd37d4cee2
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat May 21 11:59:35 2022 +0000

description:
doc/pkgsrc.*: regen

diffstat:

 doc/pkgsrc.html |  1878 ++++++++++++++++++++++++++++++------------------------
 doc/pkgsrc.txt  |  1769 +++++++++++++++++++++++++++------------------------
 2 files changed, 1965 insertions(+), 1682 deletions(-)

diffs (truncated from 5075 to 300 lines):

diff -r b0096d95150c -r e9bd37d4cee2 doc/pkgsrc.html
--- a/doc/pkgsrc.html   Sat May 21 11:56:14 2022 +0000
+++ b/doc/pkgsrc.html   Sat May 21 11:59:35 2022 +0000
@@ -333,15 +333,17 @@
 <dt><span class="sect2"><a href="#fixes.libtool">21.3.1. Shared libraries - libtool</a></span></dt>
 <dt><span class="sect2"><a href="#using-libtool">21.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
 <dt><span class="sect2"><a href="#autoconf-automake">21.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#meson">21.3.4. Meson / ninja</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#programming-languages">21.4. Programming languages</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="#basic-programming-languages">21.4.1. C, C++, and Fortran</a></span></dt>
 <dt><span class="sect2"><a href="#java-programming-language">21.4.2. Java</a></span></dt>
 <dt><span class="sect2"><a href="#go-programming-language">21.4.3. Go</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">21.4.4. Packages containing Perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#shell-scripts">21.4.5. Packages containing shell scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">21.4.6. Other programming languages</a></span></dt>
+<dt><span class="sect2"><a href="#rust-programming-language">21.4.4. Rust</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">21.4.5. Packages containing Perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#shell-scripts">21.4.6. Packages containing shell scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">21.4.7. Other programming languages</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#fixes.build">21.5. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
 <dd><dl>
@@ -3302,15 +3304,17 @@
 <dt><span class="sect2"><a href="#fixes.libtool">21.3.1. Shared libraries - libtool</a></span></dt>
 <dt><span class="sect2"><a href="#using-libtool">21.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
 <dt><span class="sect2"><a href="#autoconf-automake">21.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#meson">21.3.4. Meson / ninja</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#programming-languages">21.4. Programming languages</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="#basic-programming-languages">21.4.1. C, C++, and Fortran</a></span></dt>
 <dt><span class="sect2"><a href="#java-programming-language">21.4.2. Java</a></span></dt>
 <dt><span class="sect2"><a href="#go-programming-language">21.4.3. Go</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">21.4.4. Packages containing Perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#shell-scripts">21.4.5. Packages containing shell scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">21.4.6. Other programming languages</a></span></dt>
+<dt><span class="sect2"><a href="#rust-programming-language">21.4.4. Rust</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">21.4.5. Packages containing Perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#shell-scripts">21.4.6. Packages containing shell scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">21.4.7. Other programming languages</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#fixes.build">21.5. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
 <dd><dl>
@@ -4121,10 +4125,10 @@
        where the current pkg will be installed.  When referring to a
        pkg's own installation path, use
        <span class="quote">&#8220;<span class="quote">${PREFIX}</span>&#8221;</span>.</p></li>
-<li class="listitem"><p><code class="varname">LOCALBASE</code> is where all non-X11 pkgs
+<li class="listitem"><p><code class="varname">LOCALBASE</code> is where all pkgs
        are installed.  If you need to construct a -I or -L argument
        to the compiler to find includes and libraries installed by
-       another non-X11 pkg, use <span class="quote">&#8220;<span class="quote">${LOCALBASE}</span>&#8221;</span>. The name
+       another pkg, use <span class="quote">&#8220;<span class="quote">${LOCALBASE}</span>&#8221;</span>. The name
        <code class="varname">LOCALBASE</code> stems from FreeBSD, which
        installed all packages in <code class="filename">/usr/local</code>. As
        pkgsrc leaves <code class="filename">/usr/local</code> for the system
@@ -7137,8 +7141,8 @@
 <div class="orderedlist"><ol class="orderedlist" type="1">
 <li class="listitem"><p>Store the script inside <code class="filename">${FILESDIR}</code>, with
     the <code class="literal">.sh</code> suffix appended.  Considering the
-    <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/print/cups/index.html"; target="_top"><code class="filename">print/cups</code></a> package as an example, it has a
-    <code class="filename">cupsd.sh</code> in its files directory.</p></li>
+    <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/print/cups-base/index.html"; target="_top"><code class="filename">print/cups-base</code></a> package as an example, it
+    has a <code class="filename">cupsd.sh</code> in its files directory.</p></li>
 <li class="listitem">
 <p>Tell pkginstall to handle it, appending the name of the script,
     without its extension, to the <code class="varname">RCD_SCRIPTS</code> variable.
@@ -7291,15 +7295,17 @@
 <dt><span class="sect2"><a href="#fixes.libtool">21.3.1. Shared libraries - libtool</a></span></dt>
 <dt><span class="sect2"><a href="#using-libtool">21.3.2. Using libtool on GNU packages that already support libtool</a></span></dt>
 <dt><span class="sect2"><a href="#autoconf-automake">21.3.3. GNU Autoconf/Automake</a></span></dt>
+<dt><span class="sect2"><a href="#meson">21.3.4. Meson / ninja</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#programming-languages">21.4. Programming languages</a></span></dt>
 <dd><dl>
 <dt><span class="sect2"><a href="#basic-programming-languages">21.4.1. C, C++, and Fortran</a></span></dt>
 <dt><span class="sect2"><a href="#java-programming-language">21.4.2. Java</a></span></dt>
 <dt><span class="sect2"><a href="#go-programming-language">21.4.3. Go</a></span></dt>
-<dt><span class="sect2"><a href="#perl-scripts">21.4.4. Packages containing Perl scripts</a></span></dt>
-<dt><span class="sect2"><a href="#shell-scripts">21.4.5. Packages containing shell scripts</a></span></dt>
-<dt><span class="sect2"><a href="#other-programming-languages">21.4.6. Other programming languages</a></span></dt>
+<dt><span class="sect2"><a href="#rust-programming-language">21.4.4. Rust</a></span></dt>
+<dt><span class="sect2"><a href="#perl-scripts">21.4.5. Packages containing Perl scripts</a></span></dt>
+<dt><span class="sect2"><a href="#shell-scripts">21.4.6. Packages containing shell scripts</a></span></dt>
+<dt><span class="sect2"><a href="#other-programming-languages">21.4.7. Other programming languages</a></span></dt>
 </dl></dd>
 <dt><span class="sect1"><a href="#fixes.build">21.5. The <span class="emphasis"><em>build</em></span> phase</a></span></dt>
 <dd><dl>
@@ -8422,34 +8428,28 @@
 <div class="titlepage"><div><div><h3 class="title">
 <a name="autoconf-automake"></a>21.3.3. GNU Autoconf/Automake</h3></div></div></div>
 <p>If a package needs GNU autoconf or automake to be executed
-    to regenerate the configure script and Makefile.in makefile
-    templates, then they should be executed in a pre-configure
-    target.</p>
-<p>For packages that need only autoconf:</p>
-<pre class="programlisting">
-AUTOCONF_REQD=  2.50            # if default version is not good enough
-USE_TOOLS+=     autoconf        # use "autoconf213" for autoconf-2.13
+    to regenerate the
+    <code class="filename">configure</code>
+    script and <code class="filename">Makefile.in</code> makefile
+    templates from <code class="filename">configure.ac</code> and
+    <code class="filename">Makefile.am</code>,
+    then they should be executed in a pre-configure target:</p>
+<pre class="programlisting">
+USE_TOOLS+=    autoconf automake autoreconf
+GNU_CONFIGURE= yes
 ...
 
 pre-configure:
-        cd ${WRKSRC} &amp;&amp; autoconf
-
-...
-</pre>
-<p>and for packages that need automake and autoconf:</p>
-<pre class="programlisting">
-AUTOMAKE_REQD=  1.7.1           # if default version is not good enough
-USE_TOOLS+=     automake        # use "automake14" for automake-1.4
+        set -e; cd ${WRKSRC} &amp;&amp; autoreconf -fi
 ...
-
-pre-configure:
-        set -e; cd ${WRKSRC}; \
-        aclocal; autoheader; automake -a --foreign -i; autoconf
-
-...
-</pre>
-<p>Packages which use GNU Automake will almost certainly
-    require GNU Make.</p>
+</pre>
+<p>Packages which use GNU Automake will sometimes
+    require GNU Make (<code class="literal">gmake</code> in
+    <code class="varname">USE_TOOLS</code>),
+    but not always.  Note that autoreconf
+    only needs to be executed if <code class="filename">configure.ac</code>
+    or Makefiles are modified, or <code class="filename">configure</code>
+    is not present.</p>
 <p>There are times when the configure process makes
     additional changes to the generated files, which then causes
     the build process to try to re-execute the automake sequence.
@@ -8458,6 +8458,34 @@
     <code class="varname">AUTOMAKE_OVERRIDE=NO</code> in the package
     Makefile.</p>
 </div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="meson"></a>21.3.4. Meson / ninja</h3></div></div></div>
+<p>Packages using Meson to configure need to include:
+
+</p>
+<pre class="programlisting">
+.include "../../devel/meson/build.mk"
+</pre>
+<p>In nearly all cases (any program with dependencies),
+    pkg-config needs to be added to
+    <code class="varname">USE_TOOLS</code>.  If the package installs
+    translation files for non-English languages, also
+    add msgfmt and xgettext:
+
+</p>
+<pre class="programlisting">
+USE_TOOLS+=    pkg-config msgfmt xgettext
+</pre>
+<p>If any options need to be passed to Meson, use
+    <code class="varname">MESON_ARGS</code> instead of
+    <code class="varname">CONFIGURE_ARGS</code>:
+
+</p>
+<pre class="programlisting">
+MESON_ARGS+=   -Dx11=false
+</pre>
+</div>
 </div>
 <div class="sect1">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -8465,7 +8493,7 @@
 <div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
 <a name="basic-programming-languages"></a>21.4.1. C, C++, and Fortran</h3></div></div></div>
-<p>Compilers for the C, C++, and Fortran languages comes with
+<p>Compilers for the C and C++ languages comes with
     the NetBSD base system.  By default, pkgsrc assumes that a package
     is written in C and will hide all other compilers (via the wrapper
     framework, see <a class="xref" href="#buildlink" title="Chapter 18. Buildlink methodology">Chapter 18, <i>Buildlink methodology</i></a>).</p>
@@ -8483,6 +8511,24 @@
     <span class="quote">&#8220;<span class="quote">c</span>&#8221;</span>.  Packages using GNU configure scripts, even if
     written in C++, usually need a C compiler for the configure
     phase.</p>
+<p>To express a general requirement on a specific C or C++
+    version, normally only <code class="varname">GCC_REQD</code> needs to be set.
+    For example, GCC 7 includes support for C++17, so if the package uses
+    C++17 it should specify:
+
+    </p>
+<pre class="programlisting">
+       GCC_REQD+=      7
+    </pre>
+<p>Language variants like <code class="literal">c++11</code> for
+    <code class="varname">USE_LANGUAGES</code> should only be specified
+    if the package does not explicitly set <code class="literal">-std=...</code>
+    when compiling (i.e. the package assumes the compiler defaults to
+    C++11 or some other standard).  This is usually a bug in the
+    upstream build system.</p>
+<p>GCC version 5 includes support for C++14, while GCC 4.7 includes
+    more-or-less complete support for C++11.  For more information, consult
+    <a class="ulink" href="https://gcc.gnu.org/projects/cxx-status.html"; target="_top">GCC's own documentation on programming language support.</a></p>
 </div>
 <div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
@@ -8523,15 +8569,9 @@
 <li class="listitem"><p>Generate a list of those dependencies with
       <span class="command"><strong>make clean &amp;&amp; make patch &amp;&amp; make show-go-modules &gt;
       go-modules.mk</strong></span>.</p></li>
-<li class="listitem">
-<p>Prepend </p>
-<pre class="programlisting">.include
-      "go-modules.mk"</pre>
-<p> to any other
-      </p>
-<pre class="programlisting">.include</pre>
-<p>s.</p>
-</li>
+<li class="listitem"><p>Prepend
+      <code class="literal">.include "go-modules.mk"</code> to any other
+      <code class="literal">.include</code>s.</p></li>
 <li class="listitem"><p>Incorporate these modules in
       <code class="filename">distinfo</code> with <span class="command"><strong>make
       makesum</strong></span>.</p></li>
@@ -8539,7 +8579,25 @@
 </div>
 <div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="perl-scripts"></a>21.4.4. Packages containing Perl scripts</h3></div></div></div>
+<a name="rust-programming-language"></a>21.4.4. Rust</h3></div></div></div>
+<p>If a program is written in Rust and uses Cargo to build,
+    have the package include
+    <code class="filename">../../lang/rust/cargo.mk</code>.</p>
+<div class="orderedlist"><ol class="orderedlist" type="1">
+<li class="listitem"><p>Generate a list of those dependencies with
+      <span class="command"><strong>make CARGO_ARGS="build --release" build &amp;&amp;
+      make print-cargo-depends &gt; cargo-depends.mk</strong></span>.</p></li>
+<li class="listitem"><p>Prepend
+      <code class="literal">.include "cargo-depends.mk"</code> to any other
+      <code class="literal">.include</code>s.</p></li>
+<li class="listitem"><p>Incorporate these modules in
+      <code class="filename">distinfo</code> with <span class="command"><strong>make
+      makesum</strong></span>.</p></li>
+</ol></div>
+</div>
+<div class="sect2">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="perl-scripts"></a>21.4.5. Packages containing Perl scripts</h3></div></div></div>
 <p>If your package contains interpreted Perl scripts, add
     <span class="quote">&#8220;<span class="quote">perl</span>&#8221;</span> to the <code class="varname">USE_TOOLS</code> variable
     and set <code class="varname">REPLACE_PERL</code> to ensure that the proper
@@ -8558,7 +8616,7 @@
 </div>
 <div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="shell-scripts"></a>21.4.5. Packages containing shell scripts</h3></div></div></div>
+<a name="shell-scripts"></a>21.4.6. Packages containing shell scripts</h3></div></div></div>
 <p><code class="varname">REPLACE_SH</code>,
     <code class="varname">REPLACE_BASH</code>, <code class="varname">REPLACE_CSH</code>,
     and <code class="varname">REPLACE_KSH</code> can be used to replace shell
@@ -8573,7 +8631,7 @@
 </div>
 <div class="sect2">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="other-programming-languages"></a>21.4.6. Other programming languages</h3></div></div></div>
+<a name="other-programming-languages"></a>21.4.7. Other programming languages</h3></div></div></div>
 <p>There are further similar REPLACE variables available, e.g.,
     <code class="varname">REPLACE_AWK</code> for packages containing awk scripts,
     and <code class="varname">REPLACE_R</code> for R. These two, like the others
@@ -8626,6 +8684,22 @@
 <div class="sect3">
 <div class="titlepage"><div><div><h4 class="title">
 <a name="fixes.build.cpp.os"></a>21.5.1.1. C preprocessor macros to identify the operating system</h4></div></div></div>
+<p>To distinguish between specific NetBSD versions,
+        you should use the following code.</p>
+<pre class="programlisting">
+#ifdef __NetBSD__
+#include &lt;sys/param.h&gt;
+#if __NetBSD_Prereq__(9,99,17)
+/* use a newer feature */
+#else
+/* older code */
+#endif
+#endif
+
+#ifndef _WIN32
+/* Unix-like specific code */
+#endif
+</pre>
 <p>To distinguish between 4.4 BSD-derived systems and the
         rest of the world, you should use the following code.</p>
 <pre class="programlisting">
@@ -8636,8 +8710,7 @@



Home | Main Index | Thread Index | Old Index