chiark / gitweb /
Prep v236: Adapt elogind parts in the build system to upstream changes.
authorSven Eden <yamakuzure@gmx.net>
Mon, 26 Mar 2018 16:22:06 +0000 (18:22 +0200)
committerSven Eden <yamakuzure@gmx.net>
Mon, 26 Mar 2018 16:26:12 +0000 (18:26 +0200)
man/meson.build
meson.build
meson_options.txt
pwx/rebuild_all.sh

index b40a97dba48e3e5bf84c157ce49283f44966482a..32bd1b814760ac65a19a2101f0a18e372820c6b7 100644 (file)
@@ -91,7 +91,12 @@ foreach tuple : xsltproc.found() ? manpages : []
                                 output : htmlalias,
                                 command : ['ln', '-fs', html, '@OUTPUT@'])
                         if want_html
-                                dst = join_paths(docdir, 'html', htmlalias)
+#if 0 /// This must be configurable in elogind
+#                                 dst = join_paths(docdir, 'html', htmlalias)
+#else
+                                  dst = get_option('htmldir')
+                                  dst = dst != '' ? dst: join_paths(docdir, 'html', htmlalias)
+#endif // 0
                                 cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
                                 meson.add_install_script('sh', '-c', cmd)
                                 p2 += [link]
index 38ae4e087de88110bf42ebdda5a85b9644998e08..f6c81c1a84198f2b10b560d0a8462b8003a6d5f3 100644 (file)
@@ -175,15 +175,16 @@ pkgincludedir = join_paths(includedir, 'elogind/systemd')
 systemshutdowndir = join_paths(rootlibexecdir, 'system-shutdown')
 systemsleepdir = join_paths(rootlibexecdir, 'system-sleep')
 
-# in elogind, udev is external and hus configurable
+# in elogind, udev is external and thus configurable
 udevlibexecdir = get_option('udevbindir')
 udevlibexecdir = udevlibexecdir != '' ? udevlibexecdir : join_paths(rootprefixdir, 'lib/udev')
 udevrulesdir = get_option('udevrulesdir')
 udevrulesdir = udevrulesdir != '' ? udevrulesdir : join_paths(udevlibexecdir, 'rules.d')
 udevhomedir = udevlibexecdir
 factorydir = join_paths(datadir, 'factory')
-docdir = '-'.join([join_paths(datadir, 'doc/elogind'),
-                             meson.project_version()])
+docdir = get_option('docdir')
+docdir = docdir != '' ? docdir: '-'.join([join_paths(datadir, 'doc/elogind'),
+                                          meson.project_version()])
 testsdir = join_paths(prefixdir, 'lib/elogind/tests')
 randomseeddir = join_paths(localstatedir, 'lib/elogind')
 #endif // 0
@@ -384,7 +385,7 @@ foreach arg : ['unused-parameter',
         endif
 endforeach
 
-if cc.compiles('
+if cc.compiles('''
    #include <time.h>
    #include <inttypes.h>
    typedef uint64_t usec_t;
@@ -393,7 +394,7 @@ if cc.compiles('
            struct timespec now;
            return 0;
    }
-', name : '-Werror=shadow with local shadowing')
+''', name : '-Werror=shadow with local shadowing')
         add_project_arguments('-Werror=shadow', language : 'c')
 endif
 
@@ -846,16 +847,19 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 debug = get_option('debug')
 enable_debug_hashmap = false
 enable_debug_mmap_cache = false
+#if 1 /// additional elogind debug mode
+enable_debug_elogind = false
+#endif // 1
 if debug != ''
         foreach name : debug.split(',')
                 if name == 'hashmap'
                         enable_debug_hashmap = true
                 elif name == 'mmap-cache'
+                        enable_debug_mmap_cache = true
 #if 1 /// additional elogind debug mode
-                        elif name == 'elogind'
-                        conf.set('ENABLE_DEBUG_ELOGIND', true)
+                elif name == 'elogind'
+                        enable_debug_elogind = true
 #endif // 1
-                        enable_debug_mmap_cache = true
                 else
                         message('unknown debug option "@0@", ignoring'.format(name))
                 endif
@@ -863,6 +867,9 @@ if debug != ''
 endif
 conf.set10('ENABLE_DEBUG_HASHMAP', enable_debug_hashmap)
 conf.set10('ENABLE_DEBUG_MMAP_CACHE', enable_debug_mmap_cache)
+#if 1 /// additional elogind debug mode
+conf.set10('ENABLE_DEBUG_ELOGIND', enable_debug_elogind)
+#endif // 1
 
 #####################################################################
 
@@ -946,7 +953,7 @@ if want_polkit != 'false'
                 install_polkit_pkla = true
         endif
 endif
-conf.set10('ENABLE_POLKIT', install_polkit)
+conf.set10('ENABLE_POLKIT', install_polkit ? '1' : '0')
 
 want_acl = get_option('acl')
 if want_acl != 'false'
@@ -2832,12 +2839,14 @@ if git.found()
                 command : ['env', 'ctags', '-o', '@0@/tags'.format(meson.current_source_dir())] + all_files)
 endif
 
-if git.found()
-        meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
-        run_target(
-                'git-contrib',
-                command : [meson_git_contrib_sh])
-endif
+#if 0 /// UNNEEDED by elogind
+# if git.found()
+#         meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
+#         run_target(
+#                 'git-contrib',
+#                 command : [meson_git_contrib_sh])
+# endif
+#endif // 0
 
 if git.found()
         git_head = run_command(
@@ -3046,12 +3055,13 @@ foreach tuple : [
         ['debug mmap cache'],
 ]
 
-        cond = tuple.get(1, '')
-        if cond == ''
+        cond = tuple.get(1, false)
+        if not cond
                 ident1 = 'HAVE_' + tuple[0].underscorify().to_upper()
                 ident2 = 'ENABLE_' + tuple[0].underscorify().to_upper()
                 cond = conf.get(ident1, 0) == 1 or conf.get(ident2, 0) == 1
         endif
+
         if cond
                 found += [tuple[0]]
         else
index ac18363f4cb38d06bdee1bc9c9dad2078aad0ec2..4e2f472d6a13fdde53573bb450406f0d8ae084c4 100644 (file)
@@ -53,6 +53,10 @@ option('udevrulesdir', type : 'string',
 option('udevbindir', type : 'string',
        description : '''directory for udev binary files''')
 
+# We are nice and make the documentation paths configurable
+option('docdir', type : 'string', description : 'path where to install the documentation.')
+option('htmldir', type : 'string', description : 'path where to install the HTML documentation.')
+
 # We have no systemd-shutdown binary, so we need 'halt' and 'reboot'
 option('halt-path', type : 'string', description : 'path to halt')
 option('reboot-path', type : 'string', description : 'path to reboot')
@@ -176,11 +180,11 @@ option('default-hierarchy', type : 'combo',
 # option('time-epoch', type : 'string',
 #        description : 'time epoch for time clients')
 #else
-       description : 'Wanted cgroup hierarchy if elogind has to be a cgroup controller:
+       description : '''Wanted cgroup hierarchy if elogind has to be a cgroup controller:
                 "legacy"  assumes cgroups version 1 mounted on /sys/fs/cgroup
                 "hybrid"  assumes cgroups version 2 mounted on /sys/fs/cgroup/unified and
                                   cgroups version 1 mounted on /sys/fs/cgroup.
-                "unified" assumes cgroups version 2 on /sys/fs/cgroup')
+                "unified" assumes cgroups version 2 on /sys/fs/cgroup''')
 option('cgroup-controller', type : 'string',
        description : 'Name of the cgroup controller to use')
 #endif // 0
index b90b97ac836828524846d89b71c01e4f88f472a8..a77ec9c401c10d1c32d98edd8285a3ed31f2cc53 100755 (executable)
@@ -40,7 +40,7 @@ if [[ $minVers -gt 234 ]]; then
 
        debug_opt="-Ddebug=\"\" --buildtype release"
        if [[ "x$xType" = "xdebug" ]]; then
-               debug_opt="-Ddebug=elogind -Dtest=unsafe --buildtype debug"
+               debug_opt="-Ddebug=elogind -Dtests=unsafe --buildtype debug"
        fi
 
        set -x
@@ -80,7 +80,7 @@ if [[ $minVers -gt 234 ]]; then
                         -Dcgroup-controller=openrc -Ddefault-hierarchy=$cgdefault \
                         -Dacl=true -Dpam=true -Dselinux=false \
                         -Dbashcompletiondir=$PREFIX/usr/share/bash-completion/completions \
-                        -Dzsh-completion=$PREFIX/usr/share/zsh/site-functions \
+                        -Dzshcompletiondir=$PREFIX/usr/share/zsh/site-functions \
                         $extra_opts $(pwd -P) $(pwd -P)/build
 
        set +x