Repository: mesonbuild/meson

Issue:
add remaining --sbindir & Co.
I think we still miss:
* sbindir (/usr/sbin)
* sharedstatedir (/var/lib)
* infodir (/usr/share/info)


Discussion:
GNU coding standards says that sharedstatedir should be $prefix/com. However, no one uses it.
I didn't even know that. I think no distro or package in the entire world uses `$prefix/com`.
I think also will be useful to add runstatedir (which is $localstatedir/run, i.e. /var/run)
`docdir` too please (#825).
@QuLogic for $docdir hopefully we will have something like `--nodocs` or something like this. Because when upstream thinks that they know which docs to install, it's usually not true.

But yeah, will add it.

Resolving patch:
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -208,21 +208,24 @@ def get_builtin_option_default(optname):
         'libdir'            : [ UserStringOption, 'Library directory.', default_libdir() ],
         'libexecdir'        : [ UserStringOption, 'Library executable directory.', default_libexecdir() ],
         'bindir'            : [ UserStringOption, 'Executable directory.', 'bin' ],
+        'sbindir'           : [ UserStringOption, 'System executable directory.', 'sbin' ],
         'includedir'        : [ UserStringOption, 'Header file directory.', 'include' ],
         'datadir'           : [ UserStringOption, 'Data file directory.', 'share' ],
         'mandir'            : [ UserStringOption, 'Manual page directory.', 'share/man' ],
+        'infodir'           : [ UserStringOption, 'Info page directory.', 'share/info' ],
         'localedir'         : [ UserStringOption, 'Locale data directory.', 'share/locale' ],
-    # sysconfdir and localstatedir are a bit special. These defaults to ${prefix}/etc and
-    # ${prefix}/var but nobody uses that. Instead they always set it manually to /etc and /var.
-    # This default values is thus pointless and not really used but we set it to this
-    # for consistency with other systems.
+    # sysconfdir, localstatedir and sharedstatedir are a bit special. These defaults to ${prefix}/etc,
+    # ${prefix}/var and ${prefix}/com but nobody uses that. Instead they always set it
+    # manually to /etc, /var and /var/lib. This default values is thus pointless and not really used
+    # but we set it to this for consistency with other systems.
     #
-    # Projects installing to sysconfdir and/or localstatedir probably want
+    # Projects installing to sysconfdir, localstatedir or sharedstatedir probably want
     # to set the following in project():
     #
-    # default_options : ['sysconfdir=/etc', 'localstatedir=/var']
+    # default_options : ['sysconfdir=/etc', 'localstatedir=/var', 'sharedstatedir=/var/lib']
         'sysconfdir'        : [ UserStringOption, 'Sysconf data directory.', 'etc' ],
         'localstatedir'     : [ UserStringOption, 'Localstate data directory.', 'var' ],
+        'sharedstatedir'    : [ UserStringOption, 'Architecture-independent data directory.', 'com' ],
         'werror'            : [ UserBooleanOption, 'Treat warnings as errors.', False ],
         'warning_level'     : [ UserComboOption, 'Compiler warning level to use.', [ '1', '2', '3' ], '1'],
         'layout'            : [ UserComboOption, 'Build directory layout.', ['mirror', 'flat' ], 'mirror' ],
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -169,12 +169,15 @@ def print_conf(self):
                     'libdir',
                     'libexecdir',
                     'bindir',
+                    'sbindir',
                     'includedir',
                     'datadir',
                     'mandir',
+                    'infodir',
                     'localedir',
                     'sysconfdir',
                     'localstatedir',
+                    'sharedstatedir',
                 ]:
             parr.append([key, coredata.get_builtin_option_description(key),
                 self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -41,12 +41,15 @@ def add_builtin_argument(name, **kwargs):
 add_builtin_argument('libdir')
 add_builtin_argument('libexecdir')
 add_builtin_argument('bindir')
+add_builtin_argument('sbindir')
 add_builtin_argument('includedir')
 add_builtin_argument('datadir')
 add_builtin_argument('mandir')
+add_builtin_argument('infodir')
 add_builtin_argument('localedir')
 add_builtin_argument('sysconfdir')
 add_builtin_argument('localstatedir')
+add_builtin_argument('sharedstatedir')
 add_builtin_argument('backend')
 add_builtin_argument('buildtype')
 add_builtin_argument('strip', action='store_true')


Test patch: