From dd728df385266ff61d03324dac44adc5792e279d Mon Sep 17 00:00:00 2001
From: Samay Sharma <smilingsamay@gmail.com>
Date: Mon, 13 Feb 2023 16:57:07 -0800
Subject: [PATCH v9 4/5] Remove Miscellaneous section

After some reorganization, only 2 options remain in the
Miscellaneous section. This commit removes that section and
moves the options to the PostgreSQL features section.
---
 doc/src/sgml/installation.sgml | 141 ++++++++++++++-------------------
 meson_options.txt              |  15 ++--
 2 files changed, 66 insertions(+), 90 deletions(-)

diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index d7ab0c205e..0efbb1c2a3 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1061,6 +1061,20 @@ build-postgresql:
        </listitem>
       </varlistentry>
 
+      <varlistentry id="configure-option-with-krb-srvnam">
+       <term><option>--with-krb-srvnam=<replaceable>NAME</replaceable></option></term>
+       <listitem>
+        <para>
+         The default name of the Kerberos service principal used
+         by GSSAPI.
+         <literal>postgres</literal> is the default. There's usually no
+         reason to change this unless you are building for a Windows
+         environment, in which case it must be set to upper case
+         <literal>POSTGRES</literal>.
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry id="configure-option-with-ldap">
        <term><option>--with-ldap</option></term>
        <listitem>
@@ -1253,6 +1267,21 @@ build-postgresql:
        </listitem>
       </varlistentry>
 
+      <varlistentry id="configure-option-with-pgport">
+       <term><option>--with-pgport=<replaceable>NUMBER</replaceable></option></term>
+       <listitem>
+        <para>
+         Set <replaceable>NUMBER</replaceable> as the default port number for
+         server and clients. The default is 5432. The port can always
+         be changed later on, but if you specify it here then both
+         server and clients will have the same default compiled in,
+         which can be very convenient.  Usually the only good reason
+         to select a non-default value is if you intend to run multiple
+         <productname>PostgreSQL</productname> servers on the same machine.
+        </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry id="configure-option-disable-thread-safety">
        <term><option>--disable-thread-safety</option></term>
        <listitem>
@@ -1384,51 +1413,6 @@ build-postgresql:
 
    </sect3>
 
-   <sect3 id="configure-options-misc">
-    <title>Miscellaneous</title>
-
-    <para>
-     It's fairly common, particularly for test builds, to adjust the
-     default port number with <option>--with-pgport</option>.
-     The other options in this section are recommended only for advanced
-     users.
-    </para>
-
-     <variablelist>
-
-      <varlistentry id="configure-option-with-pgport">
-       <term><option>--with-pgport=<replaceable>NUMBER</replaceable></option></term>
-       <listitem>
-        <para>
-         Set <replaceable>NUMBER</replaceable> as the default port number for
-         server and clients. The default is 5432. The port can always
-         be changed later on, but if you specify it here then both
-         server and clients will have the same default compiled in,
-         which can be very convenient.  Usually the only good reason
-         to select a non-default value is if you intend to run multiple
-         <productname>PostgreSQL</productname> servers on the same machine.
-        </para>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry id="configure-option-with-krb-srvnam">
-       <term><option>--with-krb-srvnam=<replaceable>NAME</replaceable></option></term>
-       <listitem>
-        <para>
-         The default name of the Kerberos service principal used
-         by GSSAPI.
-         <literal>postgres</literal> is the default. There's usually no
-         reason to change this unless you are building for a Windows
-         environment, in which case it must be set to upper case
-         <literal>POSTGRES</literal>.
-        </para>
-       </listitem>
-      </varlistentry>
-
-     </variablelist>
-
-   </sect3>
-
    <sect3 id="configure-options-data-layout">
     <title>Data Layout</title>
 
@@ -2506,6 +2490,20 @@ ninja install
       </listitem>
      </varlistentry>
 
+     <varlistentry id="configure-krb-srvnam-meson">
+      <term><option>-Dkrb_srvnam=<replaceable>NAME</replaceable></option></term>
+      <listitem>
+       <para>
+        The default name of the Kerberos service principal used
+        by GSSAPI.
+        <literal>postgres</literal> is the default. There's usually no
+        reason to change this unless you are building for a Windows
+        environment, in which case it must be set to upper case
+        <literal>POSTGRES</literal>.
+       </para>
+      </listitem>
+     </varlistentry>
+
      <varlistentry id="configure-with-ldap-meson">
       <term><option>-Dldap={ auto | enabled | disabled }</option></term>
       <listitem>
@@ -2679,6 +2677,22 @@ ninja install
        </para>
       </listitem>
      </varlistentry>
+
+     <varlistentry id="configure-pgport-meson">
+      <term><option>-Dpgport=<replaceable>NUMBER</replaceable></option></term>
+      <listitem>
+       <para>
+        Set <replaceable>NUMBER</replaceable> as the default port number for
+        server and clients. The default is 5432. The port can always
+        be changed later on, but if you specify it here then both
+        server and clients will have the same default compiled in,
+        which can be very convenient.  Usually the only good reason
+        to select a non-default value is if you intend to run multiple
+        <productname>PostgreSQL</productname> servers on the same machine.
+       </para>
+      </listitem>
+     </varlistentry>
+
     </variablelist>
    </sect3>
 
@@ -2852,42 +2866,6 @@ ninja install
     </variablelist>
    </sect3>
 
-   <sect3 id="meson-options-misc">
-    <title>Miscellaneous</title>
-
-    <variablelist>
-     <varlistentry id="configure-pgport-meson">
-      <term><option>-Dpgport=<replaceable>NUMBER</replaceable></option></term>
-      <listitem>
-       <para>
-        Set <replaceable>NUMBER</replaceable> as the default port number for
-        server and clients. The default is 5432. The port can always
-        be changed later on, but if you specify it here then both
-        server and clients will have the same default compiled in,
-        which can be very convenient.  Usually the only good reason
-        to select a non-default value is if you intend to run multiple
-        <productname>PostgreSQL</productname> servers on the same machine.
-       </para>
-      </listitem>
-     </varlistentry>
-
-     <varlistentry id="configure-krb-srvnam-meson">
-      <term><option>-Dkrb_srvnam=<replaceable>NAME</replaceable></option></term>
-      <listitem>
-       <para>
-        The default name of the Kerberos service principal used
-        by GSSAPI.
-        <literal>postgres</literal> is the default. There's usually no
-        reason to change this unless you are building for a Windows
-        environment, in which case it must be set to upper case
-        <literal>POSTGRES</literal>.
-       </para>
-      </listitem>
-     </varlistentry>
-
-    </variablelist>
-   </sect3>
-
    <sect3 id="meson-options-data-layout">
     <title>Data Layout</title>
 
@@ -3152,6 +3130,7 @@ ninja install
       </varlistentry>
      </variablelist>
    </sect3>
+
   </sect2>
  </sect1>
 
diff --git a/meson_options.txt b/meson_options.txt
index 4402dd4299..afa7fc7056 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,15 +19,6 @@ option('segsize_blocks', type : 'integer', value: 0,
   description : '''Segment size, in blocks''')
 
 
-# Miscellaneous options
-
-option('krb_srvnam', type : 'string', value : 'postgres',
-  description : '''Default Kerberos service principal for GSSAPI''')
-
-option('system_tzdata', type: 'string', value: '',
-  description: 'use system time zone data in specified directory')
-
-
 # Defaults
 
 option('pgport', type : 'integer', value : 5432,
@@ -70,6 +61,9 @@ option('darwin_sysroot', type : 'string', value: '',
 option('rpath', type : 'boolean', value: true,
   description: 'whether to embed shared library search path in executables')
 
+option('system_tzdata', type: 'string', value: '',
+  description: 'use system time zone data in specified directory')
+
 
 # External dependencies
 
@@ -106,6 +100,9 @@ option('llvm', type : 'feature', value: 'disabled',
 option('lz4', type : 'feature', value: 'auto',
   description: 'LZ4 support')
 
+option('krb_srvnam', type : 'string', value : 'postgres',
+  description : '''Default Kerberos service principal for GSSAPI''')
+
 option('nls', type: 'feature', value: 'auto',
   description: 'native language support')
 
-- 
2.38.1

