BSD: Run post-install script to use efficient engine.

FreeBSD needs sgid kmem in order to access KVM. If this isn't
set, we use a slow-assed fallback method.
This commit is contained in:
Alastair Poole 2020-04-16 15:34:39 +01:00
parent 05b59290b8
commit be08de2b1a
2 changed files with 10 additions and 0 deletions

View File

@ -17,3 +17,7 @@ executable('evisum', [
dependencies : [ deps, deps_os ],
gui_app : true,
install : true)
if host_os == 'freebsd' or host_os == 'dragonfly'
meson.add_install_script('perms.sh')
endif

6
src/bin/perms.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# We do this to allow us to poll for processes efficiently.
# Specifically for FreeBSD and DragonFlyBSD.
chown root:kmem "${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/evisum"
chmod g+s "${DESTDIR}/${MESON_INSTALL_PREFIX}/bin/evisum"