build: set rootprefix_default to /usr if on a /usr merged system
This requires at leaste meson 0.53.0 since it uses the fs module. This is for #474.
This commit is contained in:
parent
2ba16135cb
commit
cc0037e9ca
@ -6,9 +6,10 @@ project('OpenRC', 'c',
|
|||||||
'prefix=/usr',
|
'prefix=/usr',
|
||||||
'warning_level=3',
|
'warning_level=3',
|
||||||
],
|
],
|
||||||
meson_version : '>=0.49.0')
|
meson_version : '>=0.53.0')
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
fs = import('fs')
|
||||||
|
|
||||||
audit_dep = dependency('audit', required : get_option('audit'))
|
audit_dep = dependency('audit', required : get_option('audit'))
|
||||||
if audit_dep.found()
|
if audit_dep.found()
|
||||||
@ -76,7 +77,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
rootprefix = get_option('rootprefix')
|
rootprefix = get_option('rootprefix')
|
||||||
rootprefix_default = '/'
|
rootprefix_default = fs.is_symlink('/bin') ? '/usr' : '/'
|
||||||
if rootprefix == ''
|
if rootprefix == ''
|
||||||
rootprefix = rootprefix_default
|
rootprefix = rootprefix_default
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user