$NetBSD: patch-meson.build,v 1.4 2024/10/20 09:28:29 leot Exp $ - Instruct about NetBSD pthread_setname_np(3). Maybe pthread_setname_np(3) should be checked in order to distinguish based on the argument supported instead of special-casing based on the platform... workaround that for the moment in the simplest way. - Enable support for DRM on NetBSD. - Install configuration files to examples, per pkgsrc conventions. --- meson.build.orig 2024-09-23 17:36:41.000000000 +0000 +++ meson.build @@ -300,6 +300,7 @@ if cc.has_multi_arguments('-Wformat', '- endif darwin = host_machine.system() == 'darwin' +netbsd = host_machine.system() == 'netbsd' win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows' posix = not win32 @@ -552,14 +553,17 @@ features += {'wsdisplay-usl-io.h': cc.ha # macOS's pthread_setname_np is a special snowflake and differs from literally every other platform. features += {'mac-thread-name': darwin} +# NetBSD pthread_setname_np differs from macOS and Linux +features += {'netbsd-thread-name': netbsd} + features += {'glibc-thread-name': false} -if not features['mac-thread-name'] +if not features['mac-thread-name'] and not features['netbsd-thread-name'] features += {'glibc-thread-name': posix and cc.has_function('pthread_setname_np', args: '-D_GNU_SOURCE', dependencies: pthreads, prefix: '#include ')} endif features += {'bsd-thread-name': false} -if not features['mac-thread-name'] and not features['glibc-thread-name'] +if not features['mac-thread-name'] and not features['glibc-thread-name'] and not features['netbsd-thread-name'] features += {'bsd-thread-name': posix and cc.has_function('pthread_set_name_np', dependencies: pthreads, prefix: '#include \n#include ')} endif @@ -1798,7 +1802,7 @@ if get_option('cplayer') install_data('etc/_mpv.zsh', install_dir: zsh_install_dir, rename: '_mpv') install_data('etc/mpv.metainfo.xml', install_dir: join_paths(datadir, 'metainfo')) - install_data('etc/encoding-profiles.conf', install_dir: join_paths(confdir, 'mpv')) + install_data('etc/encoding-profiles.conf', install_dir: join_paths(datadir, 'examples/mpv')) foreach size: ['16x16', '32x32', '64x64', '128x128'] icon_dir = join_paths(datadir, 'icons', 'hicolor', size, 'apps')