$NetBSD$ * Build battery on NetBSD, link with -lprop * Config files to examples --- meson.build.orig 2025-08-08 07:15:22.000000000 +0000 +++ meson.build @@ -58,15 +58,19 @@ if compiler.links(code, name : 'nl_langi add_project_arguments('-DHAVE_LANGINFO_1STDAY', language: 'cpp') endif -add_global_arguments(cpp_args, language : 'cpp') -add_global_link_arguments(cpp_link_args, language : 'cpp') - is_linux = host_machine.system() == 'linux' is_dragonfly = host_machine.system() == 'dragonfly' is_freebsd = host_machine.system() == 'freebsd' is_netbsd = host_machine.system() == 'netbsd' is_openbsd = host_machine.system() == 'openbsd' +if is_netbsd + cpp_link_args += ['-lprop'] +endif + +add_global_arguments(cpp_args, language : 'cpp') +add_global_link_arguments(cpp_link_args, language : 'cpp') + thread_dep = dependency('threads') fmt = dependency('fmt', version : ['>=8.1.1'], fallback : ['fmt', 'fmt_dep']) spdlog = dependency('spdlog', version : ['>=1.10.0'], fallback : ['spdlog', 'spdlog_dep'], default_options : ['external_fmt=enabled', 'std_format=disabled', 'tests=disabled']) @@ -245,7 +249,7 @@ elif is_dragonfly or is_freebsd or is_ne 'man/waybar-cpu.5.scd', 'man/waybar-memory.5.scd', ) - if is_freebsd + if is_freebsd or is_netbsd src_files += files('src/modules/battery.cpp') man_files += files('man/waybar-battery.5.scd') endif @@ -563,7 +567,8 @@ executable( install_data( 'resources/config.jsonc', 'resources/style.css', - install_dir: sysconfdir / 'xdg/waybar' + #install_dir: sysconfdir / 'xdg/waybar' + install_dir: prefix / 'share/examples/waybar' ) scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))