mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-22 12:18:15 +02:00
Merge branch 'fix-building-on-alpine-linux' into 'master'
linux: fix building on Alpine Linux and many other distros See merge request upower/upower!317
This commit is contained in:
commit
e81ad8acd2
2 changed files with 29 additions and 8 deletions
32
meson.build
32
meson.build
|
|
@ -92,16 +92,27 @@ if os_backend == 'linux'
|
|||
cdata.set10('HAVE_IDEVICE', true)
|
||||
endif
|
||||
|
||||
init_system = get_option('init_system')
|
||||
udev_required = init_system == 'systemd'
|
||||
|
||||
udevrulesdir = get_option('udevrulesdir')
|
||||
if udevrulesdir == 'auto'
|
||||
udev_dep = dependency('udev', required: true)
|
||||
udevrulesdir = udev_dep.get_variable(pkgconfig: 'udev_dir') / 'rules.d'
|
||||
udev_dep = dependency('udev', required: udev_required)
|
||||
if udev_dep.found()
|
||||
udevrulesdir = udev_dep.get_variable(pkgconfig: 'udev_dir') / 'rules.d'
|
||||
else
|
||||
udevrulesdir = '/lib/udev/rules.d'
|
||||
endif
|
||||
endif
|
||||
|
||||
udevhwdbdir = get_option('udevhwdbdir')
|
||||
if udevhwdbdir == 'auto'
|
||||
udev_dep = dependency('udev', required: true)
|
||||
udevhwdbdir = udev_dep.get_variable(pkgconfig: 'udev_dir') / 'hwdb.d'
|
||||
udev_dep = dependency('udev', required: udev_required)
|
||||
if udev_dep.found()
|
||||
udevhwdbdir = udev_dep.get_variable(pkgconfig: 'udev_dir') / 'hwdb.d'
|
||||
else
|
||||
udevhwdbdir = '/lib/udev/hwdb.d'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
@ -116,10 +127,15 @@ if statedir == ''
|
|||
endif
|
||||
|
||||
dbusdir = get_option('datadir') / 'dbus-1'
|
||||
systemdsystemunitdir = get_option('systemdsystemunitdir')
|
||||
if systemdsystemunitdir == ''
|
||||
systemd_dep = dependency('systemd')
|
||||
systemdsystemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir')
|
||||
init_system = get_option('init_system')
|
||||
if init_system == 'systemd'
|
||||
systemdsystemunitdir = get_option('systemdsystemunitdir')
|
||||
if systemdsystemunitdir == ''
|
||||
systemd_dep = dependency('systemd')
|
||||
systemdsystemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir')
|
||||
endif
|
||||
else
|
||||
systemdsystemunitdir = ''
|
||||
endif
|
||||
|
||||
datadir = get_option('datadir')
|
||||
|
|
|
|||
|
|
@ -48,3 +48,8 @@ option('installed_tests',
|
|||
type : 'boolean',
|
||||
value : true,
|
||||
description : 'Install integration tests')
|
||||
option('init_system',
|
||||
type: 'combo',
|
||||
choices: ['systemd', 'other'],
|
||||
value: 'systemd',
|
||||
description: 'Select init system')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue