From cc0037e9caaee05af0fdedafc5798c2a7aa9bdb8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sun, 28 Nov 2021 12:35:29 -0600 Subject: 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. --- meson.build | 5 +++-- 1 file 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 -- cgit v1.2.3