diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2021-11-28 12:35:29 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2021-11-28 12:35:29 -0600 |
commit | cc0037e9caaee05af0fdedafc5798c2a7aa9bdb8 (patch) | |
tree | eb14afee1d7ad52854cca76b65de421ca3ffb7ea | |
parent | 2ba16135cbef444a566da5e2e02e2f41b48c2109 (diff) |
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.
-rw-r--r-- | meson.build | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 4cc9232c..1fb378c1 100644 --- a/meson.build +++ b/meson.build @@ -6,9 +6,10 @@ project('OpenRC', 'c', 'prefix=/usr', 'warning_level=3', ], - meson_version : '>=0.49.0') + meson_version : '>=0.53.0') cc = meson.get_compiler('c') +fs = import('fs') audit_dep = dependency('audit', required : get_option('audit')) if audit_dep.found() @@ -76,7 +77,7 @@ else endif rootprefix = get_option('rootprefix') -rootprefix_default = '/' +rootprefix_default = fs.is_symlink('/bin') ? '/usr' : '/' if rootprefix == '' rootprefix = rootprefix_default endif |