--- meson.build.orig 2026-09-12 12:52:03 UTC +++ meson.build @@ -12,12 +12,16 @@ endif endif endif +osname = build_machine.system() + prefix = get_option('prefix') sysconfdir = get_option('sysconfdir') # If sysconfdir starts with prefix, strip the prefix. -if sysconfdir.startswith(prefix) and not is_nixos - sysconfdir = sysconfdir.substring(prefix.length()) +if sysconfdir.startswith(prefix) and not is_nixos and osname != 'freebsd' + # this fails with: Unknown method "length" in object <[OptionStringHolder] holds [OptionString] + # sysconfdir = sysconfdir.substring(prefix.length()) + sysconfdir = sysconfdir.replace(prefix, '') # Ensure sysconfdir is an absolute path. if not sysconfdir.startswith('/') sysconfdir = '/' + sysconfdir @@ -72,9 +76,8 @@ c_args = [ '-Wno-unused-function', '-Wno-unused-result', '-DWLR_USE_UNSTABLE', - '-D_POSIX_C_SOURCE=200809L', '-DVERSION="@0@"'.format(version_with_hash), - '-DSYSCONFDIR="@0@"'.format('/etc'), + '-DSYSCONFDIR="@0@"'.format(sysconfdir), ] # add debug args only when debug option is enabled