# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= mpv VERSION= 0.41.0 REVISION= 1 KEYWORDS= multimedia VARIANTS= std SDESC[std]= Advanced general-purpose multimedia player HOMEPAGE= https://mpv.io/ CONTACT= nobody DOWNLOAD_GROUPS= main waf SITES[main]= GITHUB/mpv-player:mpv:v0.41.0 SITES[waf]= https://gitlab.com/ita1024/waf/-/archive/waf-2.0.24/ DISTFILE[1]= generated:main DISTFILE[2]= waf-waf-2.0.24.tar.bz2:waf DF_INDEX= 1 2 SPKGS[std]= set primary dev tools docs man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= python-docutils:single:python_used libarchive:dev:std ffmpeg:dev:std libdvdnav:dev:std libplacebo:dev:std xorg-xpresent:dev:std uchardet:dev:std BUILDRUN_DEPENDS= ffmpeg:primary:std libarchive:primary:std libass:primary:std libdvdnav:primary:std libvdpau:primary:std libva:primary:std libplacebo:primary:std uchardet:primary:std xorg-xpresent:primary:std RUN_DEPENDS= youtube-dl:single:std EXRUN[tools]= primary USES= cpe iconv jpeg lua:5.2 pkgconfig meson perl:build python:build,sutools ssl:build desktop-utils:primary gnome-icons:primary SDL_COMPONENTS= sdl2 XORG_COMPONENTS= xinerama xscrnsaver xv xxf86vm LICENSE= GPLv2+:primary LICENSE_TERMS= primary:{{WRKSRC}}/Copyright LICENSE_FILE= GPLv2+:{{WRKSRC}}/LICENSE.GPL LICENSE_SCHEME= solo FPC_EQUIVALENT= multimedia/mpv MESON_ARGS= -Dlua=lua-5.2 -Dx11=enabled -Dlibmpv=true SOVERSION= 2.5.0 post-patch: ${FIND} ${WRKSRC}/DOCS/man -name '*.rst' | \ ${XARGS} ${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' [FILE:364:descriptions/desc.primary] Mpv is based on the MPlayer and mplayer2 projects which it greatly improves. It supports a wide variety of video file formats, audio and video codecs, and subtitle types. Special input URL types are available to read input from a variety of sources other than disk files. Depending on platform, a variety of different video and audio output methods are supported. [FILE:55:descriptions/desc.tools] This package contains the MPV player and related files [FILE:208:distinfo] ee21092a5ee427353392360929dc64645c54479aefdb5babc5cfbb5fad626209 7262018 mpv-player-mpv-0.41.0.tar.gz 599ab1903b6f12f0683878d2cd4f73546e0ce26031efd05f3fbe5178e4ef8cda 582903 waf-waf-2.0.24.tar.bz2 [FILE:53:manifests/plist.primary] lib/ libmpv.so.%%SOMAJOR%% libmpv.so.%%SOVERSION%% [FILE:94:manifests/plist.dev] include/mpv/ client.h render.h render_gl.h stream_cb.h lib/libmpv.so lib/pkgconfig/mpv.pc [FILE:431:manifests/plist.tools] bin/mpv share/applications/mpv.desktop share/bash-completion/completions/mpv share/fish/vendor_completions.d/mpv.fish share/icons/hicolor/128x128/apps/mpv.png share/icons/hicolor/16x16/apps/mpv.png share/icons/hicolor/32x32/apps/mpv.png share/icons/hicolor/64x64/apps/mpv.png share/icons/hicolor/scalable/apps/mpv.svg share/icons/hicolor/symbolic/apps/mpv-symbolic.svg share/metainfo/mpv.metainfo.xml share/zsh/site-functions/_mpv [FILE:135:manifests/plist.docs] share/doc/mpv/ encoding-profiles.conf input.conf mplayer-input.conf mpv.conf restore-old-bindings.conf restore-osc-bindings.conf [FILE:21:manifests/plist.man] share/man/man1/mpv.1 [FILE:1838:patches/patch-meson.build] - 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 UTC +++ 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 [FILE:446:patches/patch-osdep_threads-posix.h] $NetBSD: patch-osdep_threads-posix.h,v 1.1 2024/01/01 15:50:14 leot Exp $ Add support for NetBSD. --- osdep/threads-posix.h.orig 2025-03-25 17:33:27 UTC +++ osdep/threads-posix.h @@ -236,6 +236,8 @@ static inline void mp_thread_set_name(co pthread_set_name_np(pthread_self(), name); #elif HAVE_MAC_THREAD_NAME pthread_setname_np(name); +#elif HAVE_NETBSD_THREAD_NAME + pthread_setname_np(pthread_self(), "%s", name); #endif } [FILE:573:patches/patch-stream_stream__libarchive.c] $NetBSD: patch-stream_stream__libarchive.c,v 1.1 2022/05/17 13:12:13 ryoon Exp $ * NetBSD does not implement uselocale(). --- stream/stream_libarchive.c.orig 2025-03-25 17:33:27 UTC +++ stream/stream_libarchive.c @@ -29,6 +29,10 @@ #define MP_ARCHIVE_FLAG_MAYBE_RAR (MP_ARCHIVE_FLAG_PRIV << 1) #define MP_ARCHIVE_FLAG_MAYBE_VOLUMES (MP_ARCHIVE_FLAG_PRIV << 2) +#if defined(__NetBSD__) +#define uselocale(locale) NULL +#endif + struct mp_archive_volume { struct mp_archive *mpa; int index; // volume number (starting with 0, mp_archive.primary_src) [FILE:246:patches/patch-video_out_drm__common.c] --- video/out/drm_common.c.orig 2025-03-25 17:33:27 UTC +++ video/out/drm_common.c @@ -34,6 +34,7 @@ #elif HAVE_VT_H #include #elif HAVE_WSDISPLAY_USL_IO_H +#include #include #endif [FILE:178:files/special.mk] # Emulate USES=waf MAKE_CMD= ${PYTHON_CMD} ${WRKDIR}/waf-*/waf-light CONFIGURE_CMD= ${PYTHON_CMD} ${WRKDIR}/waf-*/waf-light configure MAKEFILE= MAKE_FLAGS= MAKE_ARGS+= --verbose