aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/macros.meson1
-rw-r--r--mesonbuild/coredata.py13
-rw-r--r--mesonbuild/mconf.py1
-rw-r--r--mesonbuild/mesonmain.py1
4 files changed, 10 insertions, 6 deletions
diff --git a/data/macros.meson b/data/macros.meson
index 66c452c..b72bb85 100644
--- a/data/macros.meson
+++ b/data/macros.meson
@@ -20,6 +20,7 @@
--localedir=%{_datadir}/locale \\\
--sysconfdir=%{_sysconfdir} \\\
--localstatedir=%{_localstatedir} \\\
+ --sharedstatedir=%{_sharedstatedir} \\\
%{_vpath_srcdir} %{_vpath_builddir} \\\
%{nil}
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 22e5729..8db82fd 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -214,17 +214,18 @@ builtin_options = {
'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
index e57480f..2db4d37 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -177,6 +177,7 @@ class Conf:
'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
index 2311187..3c644a8 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -49,6 +49,7 @@ 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')