$NetBSD: patch-meson.build,v 1.5 2025/04/24 10:26:30 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 2025-03-25 17:33:27.000000000 +0000 +++ meson.build @@ -312,6 +312,7 @@ if cc.get_id() == 'gcc' endif darwin = host_machine.system() == 'darwin' +netbsd = host_machine.system() == 'netbsd' win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows' posix = not win32 @@ -555,14 +556,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 @@ -1803,7 +1807,7 @@ if get_option('cplayer') install_data('etc/mpv.fish', install_dir: fish_install_dir, rename: 'mpv.fish') 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')