Skip to content

Commit

Permalink
build: set rootprefix_default to /usr if on a /usr merged system
Browse files Browse the repository at this point in the history
This requires at leaste meson 0.53.0 since it uses the fs module.

This is for #474.
  • Loading branch information
williamh committed Nov 28, 2021
1 parent 2ba1613 commit cc0037e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cc0037e

Please sign in to comment.