Tue Aug 15 19:17:10 2023 UTC ()
mpv: Update to 0.36.0

pkgsrc changes:
- Switch to meson: waf build system will be deprecated (and started to be
  problematic). Try to adjust all patches that we had to meson and switch to
  meson.
- Remove patches/patch-player-lua-ytdl__hook.lua, no longer needed (was
  backported from upstream)
- Remove all waf related patches: all of them should be adjusted for meson and
  are no longer used.

Changes:
Release 0.36.0
==============
This release requires FFmpeg 4.4 or newer.

This is the last release to contain the waf build system.
Meson is the primary and actively supported build system while waf is
considered deprecated.

Features
--------
New
~~~
- player: add window-id property
- vo_kitty: introduce modern sixel alternative
- wayland: add wp-fractional-scale-v1 support
- player/command: add `user-data` property (replacement for `shared-script-properties`)
- vo_gpu_next: support mapping HDR10+ dynamic metadata
- vo_gpu_next: allow screenshots in native colorspace
- vo_gpu_next: parse Dolby Vision metadata for dynamic scene brightness
- video: allow csp equalizer adjustments with floating point precision
- command: add platform property
- demux_mkv: support ARIB captions
- hwdec_vulkan: add support for Vulkan-based hardware decoding
- player: better handling of forced-only subtitles and a toggle in the OSC
- vo_dmabuf_wayland: add osd support

Changed
~~~~~~~
- TOOLS/umpv: prefer $XDG_RUNTIME_DIR
- ffmpeg: increase minimum required version to 4.4
- player: choose speed of smallest acceptable factor for display sync
- player: don't force saving `start` in watch-later-options
- build: officially deprecate waf
- vf_sub: undeprecate
- player: set playlist title to media title if not set already
- player: use and respect XDG_STATE_HOME and XDG_CACHE_HOME by default
- wayland: bump required version to 1.20 and wayland-protocols to 1.25
- ao_pipewire: require at least libpipewire 0.3.48
- vo: hwdec: prioritise drmprime over drmprime_overlay
- vo_gpu/vo_gpu_next: enable gpu shader and icc cache by default

Removed
~~~~~~~
- drm: remove support for legacy (non-atomic) API
- stream/dvb: drop support for DVB API before Linux 3.7
- hwdec_cuda: drop support for PL_HANDLE_WIN32_KMT (Windows 7 only)
- vo_dmabuf_wayland: drop linux-dmabuf-v2 support

Options and Commands
--------------------
Added
~~~~~
- player: add --force-render option
- demux: add --demuxer-hysteresis-secs option to save power with caching
- ao_pipewire: allow usage of global volume control via --pipewire-volume-mode
- vo_gpu_next: add --tone-mapping-visualize
- sub: add --sub-fonts-dir and --osd-fonts-dir options
- player: add --auto-window-resize
- console.lua: add a script-opt for the border size
- player: add --drag-and-drop option
- vo_gpu_next: add --corner-rounding option
- player: add more precise sub fallback options --subs-fallback and --subs-fallback-forced
- player: add --input-cursor-passthrough option
- TOOLS/lua/autoload: allow extending ext sets from script-opts
- demux_playlist: add --directory-mode option to control recursive directory loading
- vo_gpu_next: add --target-contrast and --hdr-contrast-recovery/smoothness

Changed
~~~~~~~
- vd_lavc: add "auto" choice for --vd-lavc-dr and make it the default
 (notably this change was also backported to v0.35.1)
- wayland: add auto choice to --wayland-configure-bounds
- image_writer: change --screenshot-tag-colorspace default to yes
- vo_gpu_next: expose --tone-mapping=st2094-40 and st2094-10
- wayland: make --wayland-edge-pixels-pointer default to 16
- options: enable scripts related opts also with cplugins
- player/screenshot: add filename return field
- options: set --subs-with-matching-audio to off by default
- options: default --slang to auto, which uses the settings of the user's OS
- vd_lavc: allow user to specify a priority list in --hwdec
- vd_lavc: map hwdec=yes to hwdec=auto-safe and change ctrl+h to use auto-safe

Deprecated
~~~~~~~~~~
- drm: deprecate `--drm-atomic` (now always enabled)

Removed
~~~~~~~
- vo_gpu_next: remove --tone-mapping-crosstalk

Fixes and Minor Enhancements
----------------------------
- ao_pipewire: log version and other useful debug info
- wayland: error out if essential protocol support is missing
- wayland: add support for content-type protocol
- wayland: also log refresh rate on surface entrance
- vo_gpu_next: fix undefined behavior on alpha-first formats
- meson: prepend MPV_CONFDIR path with prefix
- meson: unbreak dl check on BSDs without libdl
- lcms: fix crash with lcms2-related options if lcms is disabled
- meson: fix stdatomic detection on bsd
- osc: don't spam window-controls bindings on every render
- wayland: check for resize/move in touch event first
- ao_coreaudio: use device's nominal sample rate for latency properties
- hwdec_drmprime: support yuv420p format
- ao_pipewire: properly clean up resources
- vo/{sixel,tct}: use the alternate buffer to restore terminal
- vo_sixel: add option to skip clear while drawing
- filter_kernels: fix kaiser
- hwdec/d3d11va: fix a possible memory leak
- external_files: set log level for potential files to trace
- external_files: recognize webp files as cover art
- vo_opengl: do not blindly reject all Microsoft's OpenGL implementations
- ao_coreaudio: use AudioUnitReset as ao_driver.reset to prevent long restart
- hwdec_drmprime: fix memory leak
- vo: hwdec: fix libdrm-related memory leak
- draw_bmp: ensure last slice width is less than total width
- demux: boost read EBU R128 gain values to ReplayGain's reference level
- version.py: bump copyright year
- TOOLS/umpv: support shell-quotes in $MPV
- vulkan: fix build error for 32bit builds with clang
- TOOLS/lua/autoload: improve and optimize the natural sorting
- vo_wlshm: properly support video panscan
- vo_dmabuf_wayland: support panscan and panning
- ra_d3d11: fix incorrect type
- meson: also search for rst2html with .py extension
- audio: fix crash during uninit with ao_lavc
- wayland: only warn about GNOME when actually missing idle inhibit support
- mp_image: fix XYZ primaries default
- msg: preserve early messages when log-file is set in mpv.conf
- x11: fix issue with xpresent timing feedback
- meson: reuse libmpv objects for cplayer to save 50% of compile steps
- player/client: support observing sub-properties
- m_property: implement new deletion operation on properties
- vo_lavc: set frame rate on encoder to fix non-conforming outputs
- player/video: don't resync audio if video is an image
- stream: accept webdav:// and webdavs:// urls
- video/image_writer: avoid stripping colorspace info when writing image
- stats.lua: display HDR peak in nits
- image_pool: fix memory leak with frames
- options: transition from OPT_FLAG to OPT_BOOL
- vd_lavc: sort hwdecs without hwdevices last for autoprobing
- ytdl_hook: don't overwrite force-media-title
- lua: use user-data for interop between osc.lua and console.lua
- vo: fix race condition with redraw requests
- various: more fixes to ensure correct playback of XYZ colorspace
- ytdl_hook: fix fragment-related issue that broke YouTube DASH playback
- command: expose hls-bitrate and program-id as track-list subproperties
- ao_pipewire: use realtime scheduling for data thread
- auto_profiles: check for non-existent properties
- d3d11: retry device creation without debug, if SDK is not available
- win32: follow Windows settings and update dark mode state
- ytdl_hook.lua: fix clip start and end
- hwdec_drmprime: support custom rpi4_8 and rpi4_10 formats
- sub: fix UPDATE_SUB_HARD for converted and external subtitles
- charset_conv: fix memory corruption in mp_iconv_to_utf8
- options: read config file as stream
- wayland: improve guessing when mpv is focused
- player: always try to detect subtitle language from file name
- vo: fix mp_frame_perf thread safety
- lua: read_options: find script-opts prefix at index 1 exactly
- path: handle URLs consistently in mp_basename
- ao_wasapi: remove infinite loop hack in AOCONTROL_UPDATE_STREAM_TITLE
- ao_wasapi: use client name instead of hardcoded string
- vd_lavc: fix crash if hwdec devices fail to create
- vo_drm: fix null dereference and using closed fd
- image_writer: respect jpeg-quality when using ffmpeg for writing
- image_writer: add support for AVIF
- TOOLS/lua/autoload: avoid unnecessary playlist manipulation, performance
- various: correctly ignore cache files with --no-config
- terminal-unix: better error detection logic
- json: raise parse depth to 50 for the sake of utils.parse_json()
- player: delete watch_later file only after successful load
- wayland: fix memory leak with multiple monitors
- vd_lavc: prefer d3d11va-copy over dxva2-copy
- vd_lavc: fix hwdec for videos with less than less than 3 frames
- wayland: add support for suspended toplevel state
- draw_bmp: ensure last slice is less than total width (again)
- console.lua: sort the output from the help command
- vd_lavc: try other hwdecs when falling back after an hwdec failure
- sd_ass: don't reconfigure ass on every frame (performance regression)
- sd_ass: fix converted subtitles having too-wide borders
- loadfile: compute audio language for sub selection when using lavfi-complex
- wayland: fix modifier keys in certain situations
- vd_lavc: corrections towards hwdec and swdec fallback
- zimg: fix broken sig_peak (HDR) handling
- screenshot: implement `screenshot window` in sw for most VOs
- osc: don't add margins to osc-deadzonesize
- vo_vaapi: fix segfault in draw_osd
- vo_dmabuf_wayland: correctly handle force-window
- ao_pipewire: fix error with pipewire 0.3.75 or later


(leot)
diff -r1.158 -r1.159 pkgsrc/multimedia/mpv/Makefile
diff -r1.13 -r1.14 pkgsrc/multimedia/mpv/PLIST
diff -r1.79 -r1.80 pkgsrc/multimedia/mpv/distinfo
diff -r1.33 -r1.34 pkgsrc/multimedia/mpv/options.mk
diff -r0 -r1.1 pkgsrc/multimedia/mpv/patches/patch-meson.build
diff -r0 -r1.1 pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c
diff -r1.1 -r0 pkgsrc/multimedia/mpv/patches/patch-player-lua-ytdl__hook.lua
diff -r1.9 -r0 pkgsrc/multimedia/mpv/patches/patch-wscript
diff -r1.4 -r0 pkgsrc/multimedia/mpv/patches/patch-wscript__build.py
Wed Aug 16 04:17:10 2023
Thu Jan 1 09:00:00 1970
pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c,v

anoncvs not yet been updated
Wed Aug 16 04:17:10 2023
Mon Jun 26 19:39:26 2023
pkgsrc/multimedia/mpv/patches/patch-player-lua-ytdl__hook.lua,v

anoncvs not yet been updated
Wed Aug 16 04:17:10 2023
Mon Jun 26 19:39:26 2023
pkgsrc/multimedia/mpv/patches/patch-wscript,v

anoncvs not yet been updated
Wed Aug 16 04:17:10 2023
Mon Jun 26 19:39:26 2023
pkgsrc/multimedia/mpv/patches/patch-wscript__build.py,v

anoncvs not yet been updated

cvs diff -r1.158 -r1.159 pkgsrc/multimedia/mpv/Makefile (expand / switch to unified diff)

--- pkgsrc/multimedia/mpv/Makefile 2023/08/14 05:24:56 1.158
+++ pkgsrc/multimedia/mpv/Makefile 2023/08/15 19:17:10 1.159
@@ -1,65 +1,57 @@ @@ -1,65 +1,57 @@
1# $NetBSD: Makefile,v 1.158 2023/08/14 05:24:56 wiz Exp $ 1# $NetBSD: Makefile,v 1.159 2023/08/15 19:17:10 leot Exp $
2 2
3DISTNAME= mpv-0.35.1 3DISTNAME= mpv-0.36.0
4PKGREVISION= 6 
5CATEGORIES= multimedia 4CATEGORIES= multimedia
6MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/}
7GITHUB_TAG= v${PKGVERSION_NOREV} 6GITHUB_TAG= v${PKGVERSION_NOREV}
8 7
9MAINTAINER= leot@NetBSD.org 8MAINTAINER= leot@NetBSD.org
10HOMEPAGE= https://mpv.io/ 9HOMEPAGE= https://mpv.io/
11COMMENT= Video player based on MPlayer and mplayer2 10COMMENT= Video player based on MPlayer and mplayer2
12LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 11LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1
13 12
14# needs sem_timedwait(3) 13# needs sem_timedwait(3)
15NOT_FOR_PLATFORM= NetBSD-[1-6].*-* 14NOT_FOR_PLATFORM= NetBSD-[1-6].*-*
16 15
17# Requires support for c11 atomics. 16# Requires support for c11 atomics.
18USE_CC_FEATURES+= c11 17USE_CC_FEATURES+= c11
19 18
 19# Needed for rst2man
20TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils 20TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils
21# ${WRKSRC}/bootstrap.py mentions needed version 
22TOOL_DEPENDS+= waf>=2.0.9:../../devel/waf 
23 21
24WAF_REPLACE_EXECUTABLE= yes 22MESON_ARGS+= -Ddvdnav=enabled
25WAF_CONFIGURE_ARGS+= --bindir=${PREFIX}/bin 23MESON_ARGS+= -Dlibmpv=true
26WAF_CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} 
27WAF_CONFIGURE_ARGS+= --enable-dvdnav 
28WAF_CONFIGURE_ARGS+= --enable-libmpv-shared 
29 24
30# Support Wayland via SDL2, wayland support in mpv is too fast-moving. 25# Support Wayland via SDL2, wayland support in mpv is too fast-moving.
31WAF_CONFIGURE_ARGS+= --disable-wayland 26MESON_ARGS+= -Dwayland=disabled
32 
33PYTHON_FOR_BUILD_ONLY= yes 
34PYTHON_VERSIONS_INCOMPATIBLE= 27 
35 27
36USE_TOOLS+= perl pkg-config 28USE_TOOLS+= perl pkg-config
37 29
38MAKE_DIRS= ${PKG_SYSCONFDIR}/mpv 30MAKE_DIRS= ${PKG_SYSCONFDIR}/mpv
39INSTALLATION_DIRS= share/examples/mpv 31INSTALLATION_DIRS= share/examples/mpv
40CONF_FILES+= share/examples/mpv/encoding-profiles.conf \ 32CONF_FILES+= share/examples/mpv/encoding-profiles.conf \
41 ${PKG_SYSCONFDIR}/mpv/encoding-profiles.conf 33 ${PKG_SYSCONFDIR}/mpv/encoding-profiles.conf
42CONF_FILES+= share/examples/mpv/mpv.conf \ 34CONF_FILES+= share/examples/mpv/mpv.conf \
43 ${PKG_SYSCONFDIR}/mpv/mpv.conf 35 ${PKG_SYSCONFDIR}/mpv/mpv.conf
44 36
45PKGCONFIG_OVERRIDE+= libmpv/mpv.pc.in 37PKGCONFIG_OVERRIDE+= libmpv/mpv.pc.in
46 38
47SUBST_CLASSES+= python 39SUBST_CLASSES+= python
48SUBST_SED.python+= -e "s,python,python${PYVERSSUFFIX}," 40SUBST_SED.python+= -e "s,python3,python${PYVERSSUFFIX},"
49SUBST_SED.python+= -e "s,rst2man,rst2man-${PYVERSSUFFIX}," 41SUBST_SED.python+= -e "s,'rst2man','rst2man-${PYVERSSUFFIX}',"
50SUBST_FILES.python+= wscript wscript_build.py 42SUBST_FILES.python+= meson.build
51SUBST_STAGE.python= pre-configure 43SUBST_STAGE.python= pre-configure
52SUBST_MESSAGE.python= Fix Python command names. 44SUBST_MESSAGE.python= Fix python and rst2man command names.
53 45
54BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-version-script rm:-Wl,mpv.def 46BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-version-script rm:-Wl,mpv.def
55 47
56CFLAGS.SunOS+= -D__EXTENSIONS__ 48CFLAGS.SunOS+= -D__EXTENSIONS__
57LDFLAGS.SunOS+= -lsocket 49LDFLAGS.SunOS+= -lsocket
58 50
59.include "../../mk/bsd.prefs.mk" 51.include "../../mk/bsd.prefs.mk"
60 52
61# 53#
62# At some point this should be consolidated into mk/platform/Darwin.mk, it is 54# At some point this should be consolidated into mk/platform/Darwin.mk, it is
63# here temporarily while any issues are ironed out and it can be made generic 55# here temporarily while any issues are ironed out and it can be made generic
64# for Swift handling. 56# for Swift handling.
65# 57#
@@ -70,27 +62,29 @@ LDFLAGS.SunOS+= -lsocket @@ -70,27 +62,29 @@ LDFLAGS.SunOS+= -lsocket
70XCODE_DIR!= xcode-select -p 2>/dev/null || ${TRUE} 62XCODE_DIR!= xcode-select -p 2>/dev/null || ${TRUE}
71. if exists(${XCODE_DIR}/usr/lib/swift/macosx) 63. if exists(${XCODE_DIR}/usr/lib/swift/macosx)
72BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/usr/lib/swift/macosx 64BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/usr/lib/swift/macosx
73. elif exists(${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx) 65. elif exists(${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx)
74BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx 66BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx
75. endif 67. endif
76.endif 68.endif
77 69
78post-install: 70post-install:
79 ${MV} ${DESTDIR}${PREFIX}/share/doc/mpv/mpv.conf \ 71 ${MV} ${DESTDIR}${PREFIX}/share/doc/mpv/mpv.conf \
80 ${DESTDIR}${PREFIX}/share/examples/mpv/mpv.conf 72 ${DESTDIR}${PREFIX}/share/examples/mpv/mpv.conf
81 73
82.include "options.mk" 74.include "options.mk"
 75
 76.include "../../devel/meson/build.mk"
 77
83.include "../../archivers/libarchive/buildlink3.mk" 78.include "../../archivers/libarchive/buildlink3.mk"
84.include "../../converters/libiconv/buildlink3.mk" 79.include "../../converters/libiconv/buildlink3.mk"
85.include "../../devel/waf/waf.mk" 
86.include "../../devel/zlib/buildlink3.mk" 80.include "../../devel/zlib/buildlink3.mk"
87.include "../../graphics/lcms2/buildlink3.mk" 81.include "../../graphics/lcms2/buildlink3.mk"
88.include "../../lang/python/application.mk" 82.include "../../lang/python/tool.mk"
89.include "../../multimedia/libass/buildlink3.mk" 83.include "../../multimedia/libass/buildlink3.mk"
90.include "../../multimedia/libdvdnav/buildlink3.mk" 84.include "../../multimedia/libdvdnav/buildlink3.mk"
91.include "../../multimedia/ffmpeg6/buildlink3.mk" 85.include "../../multimedia/ffmpeg6/buildlink3.mk"
92.include "../../graphics/hicolor-icon-theme/buildlink3.mk" 86.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
93.include "../../sysutils/desktop-file-utils/desktopdb.mk" 87.include "../../sysutils/desktop-file-utils/desktopdb.mk"
94.include "../../mk/jpeg.buildlink3.mk" 88.include "../../mk/jpeg.buildlink3.mk"
95.include "../../mk/atomic64.mk" 89.include "../../mk/atomic64.mk"
96.include "../../mk/bsd.pkg.mk" 90.include "../../mk/bsd.pkg.mk"

cvs diff -r1.13 -r1.14 pkgsrc/multimedia/mpv/PLIST (expand / switch to unified diff)

--- pkgsrc/multimedia/mpv/PLIST 2022/11/16 11:27:32 1.13
+++ pkgsrc/multimedia/mpv/PLIST 2023/08/15 19:17:10 1.14
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1@comment $NetBSD: PLIST,v 1.13 2022/11/16 11:27:32 leot Exp $ 1@comment $NetBSD: PLIST,v 1.14 2023/08/15 19:17:10 leot Exp $
2bin/mpv 2bin/mpv
3include/mpv/client.h 3include/mpv/client.h
4include/mpv/render.h 4include/mpv/render.h
5include/mpv/render_gl.h 5include/mpv/render_gl.h
6include/mpv/stream_cb.h 6include/mpv/stream_cb.h
7lib/libmpv.so 7lib/libmpv.so
8lib/libmpv.so.2 8lib/libmpv.so.2
9lib/libmpv.so.2.0.0 9lib/libmpv.so.2.1.0
10lib/pkgconfig/mpv.pc 10lib/pkgconfig/mpv.pc
11man/man1/mpv.1 11man/man1/mpv.1
12share/applications/mpv.desktop 12share/applications/mpv.desktop
13share/bash-completion/completions/mpv 13share/bash-completion/completions/mpv
14share/doc/mpv/input.conf 14share/doc/mpv/input.conf
15share/doc/mpv/mplayer-input.conf 15share/doc/mpv/mplayer-input.conf
16share/doc/mpv/restore-old-bindings.conf 16share/doc/mpv/restore-old-bindings.conf
17share/examples/mpv/encoding-profiles.conf 17share/examples/mpv/encoding-profiles.conf
18share/examples/mpv/mpv.conf 18share/examples/mpv/mpv.conf
19share/icons/hicolor/128x128/apps/mpv.png 19share/icons/hicolor/128x128/apps/mpv.png
20share/icons/hicolor/16x16/apps/mpv.png 20share/icons/hicolor/16x16/apps/mpv.png
21share/icons/hicolor/32x32/apps/mpv.png 21share/icons/hicolor/32x32/apps/mpv.png
22share/icons/hicolor/64x64/apps/mpv.png 22share/icons/hicolor/64x64/apps/mpv.png

cvs diff -r1.79 -r1.80 pkgsrc/multimedia/mpv/distinfo (expand / switch to unified diff)

--- pkgsrc/multimedia/mpv/distinfo 2023/08/11 09:31:32 1.79
+++ pkgsrc/multimedia/mpv/distinfo 2023/08/15 19:17:10 1.80
@@ -1,12 +1,11 @@ @@ -1,12 +1,11 @@
1$NetBSD: distinfo,v 1.79 2023/08/11 09:31:32 nia Exp $ 1$NetBSD: distinfo,v 1.80 2023/08/15 19:17:10 leot Exp $
2 2
3BLAKE2s (mpv-0.35.1.tar.gz) = 9b4b4d1688fa472980417077495470b1d72f135504e341190d847252de87468e 3BLAKE2s (mpv-0.36.0.tar.gz) = 8d0935c3b9daf9e8fe88e1413407e7194f34d688ffb00d46ab0dc68e750e5ade
4SHA512 (mpv-0.35.1.tar.gz) = 42f3564a9ed4d972d14b2c697b0163f06a8bb68a0606a86c34935181247c783e3cb62286b445799998def0919fb13fce8b8f6453f82652d5bfaea5929119127a 4SHA512 (mpv-0.36.0.tar.gz) = 51f455a425ea5aac47acb3582d0f958a34248a2290a8d6887d22bcb9385fe8d1ab5d7f09d5408cfecfb73c1ec85d1b8ec8958e45a4941d3f711a2e580187472f
5Size (mpv-0.35.1.tar.gz) = 3367913 bytes 5Size (mpv-0.36.0.tar.gz) = 3409178 bytes
6SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 6SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0
7SHA1 (patch-etc_mpv.conf) = 9e41b2f4bf59c3bfc5ad84af05538661981ed111 7SHA1 (patch-etc_mpv.conf) = 9e41b2f4bf59c3bfc5ad84af05538661981ed111
8SHA1 (patch-player-lua-ytdl__hook.lua) = ea5ad528f7d779c7e5fc7c672c74cc2a3e39f221 8SHA1 (patch-meson.build) = 1f534e05b5d87958a03be35027e7d4e03f772dcb
 9SHA1 (patch-osdep_threads.c) = ac9d45ae77893104eb4185f8b399fcc90960cf77
9SHA1 (patch-stream_stream__libarchive.c) = 2025f994b7f82cc868608ab7e8df0ae89b549922 10SHA1 (patch-stream_stream__libarchive.c) = 2025f994b7f82cc868608ab7e8df0ae89b549922
10SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b 11SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b
11SHA1 (patch-wscript) = 16cd1c2ecd6b860d4dc0d826742d31952811c3f7 
12SHA1 (patch-wscript__build.py) = afd5e66032e5ec50c7f12988480340eca0b82bf9 

cvs diff -r1.33 -r1.34 pkgsrc/multimedia/mpv/options.mk (expand / switch to unified diff)

--- pkgsrc/multimedia/mpv/options.mk 2023/08/11 08:52:23 1.33
+++ pkgsrc/multimedia/mpv/options.mk 2023/08/15 19:17:10 1.34
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: options.mk,v 1.33 2023/08/11 08:52:23 nia Exp $ 1# $NetBSD: options.mk,v 1.34 2023/08/15 19:17:10 leot Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.mpv 3PKG_OPTIONS_VAR= PKG_OPTIONS.mpv
4 4
5 5
6PKG_OPTIONS_OPTIONAL_GROUPS= gl 6PKG_OPTIONS_OPTIONAL_GROUPS= gl
7PKG_OPTIONS_GROUP.gl= opengl rpi 7PKG_OPTIONS_GROUP.gl= opengl rpi
8 8
9# audio outputs 9# audio outputs
10PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio 10PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio
11# video outputs 11# video outputs
12PKG_SUPPORTED_OPTIONS+= caca libdrm sixel x11 12PKG_SUPPORTED_OPTIONS+= caca libdrm sixel x11
13# audio/video outputs 13# audio/video outputs
14PKG_SUPPORTED_OPTIONS+= sdl2 14PKG_SUPPORTED_OPTIONS+= sdl2
@@ -38,164 +38,168 @@ PKG_SUGGESTED_OPTIONS+= vaapi @@ -38,164 +38,168 @@ PKG_SUGGESTED_OPTIONS+= vaapi
38.include "../../multimedia/libvdpau/available.mk" 38.include "../../multimedia/libvdpau/available.mk"
39 39
40.if ${VDPAU_AVAILABLE} == "yes" 40.if ${VDPAU_AVAILABLE} == "yes"
41PKG_SUPPORTED_OPTIONS+= vdpau 41PKG_SUPPORTED_OPTIONS+= vdpau
42PKG_SUGGESTED_OPTIONS+= vdpau 42PKG_SUGGESTED_OPTIONS+= vdpau
43.endif 43.endif
44 44
45.include "../../mk/bsd.options.mk" 45.include "../../mk/bsd.options.mk"
46 46
47### 47###
48### alsa support (audio output) 48### alsa support (audio output)
49### 49###
50.if !empty(PKG_OPTIONS:Malsa) 50.if !empty(PKG_OPTIONS:Malsa)
51WAF_CONFIGURE_ARGS+= --enable-alsa 51MESON_ARGS+= -Dalsa=enabled
52.include "../../audio/alsa-lib/buildlink3.mk" 52.include "../../audio/alsa-lib/buildlink3.mk"
53.else 53.else
54WAF_CONFIGURE_ARGS+= --disable-alsa 54MESON_ARGS+= -Dalsa=disabled
55.endif 55.endif
56 56
57### 57###
58### libbluray support 58### libbluray support
59### 59###
60.if !empty(PKG_OPTIONS:Mbluray) 60.if !empty(PKG_OPTIONS:Mbluray)
61WAF_CONFIGURE_ARGS+= --enable-libbluray 61MESON_ARGS+= -Dlibbluray=enabled
62.include "../../multimedia/libbluray/buildlink3.mk" 62.include "../../multimedia/libbluray/buildlink3.mk"
63.else 63.else
64WAF_CONFIGURE_ARGS+= --disable-libbluray 64MESON_ARGS+= -Dlibbluray=disabled
65.endif 65.endif
66 66
67### 67###
68### caca support (video output) 68### caca support (video output)
69### 69###
70.if !empty(PKG_OPTIONS:Mcaca) 70.if !empty(PKG_OPTIONS:Mcaca)
71WAF_CONFIGURE_ARGS+= --enable-caca 71MESON_ARGS+= -Dcaca=enabled
72.include "../../graphics/libcaca/buildlink3.mk" 72.include "../../graphics/libcaca/buildlink3.mk"
73.else 73.else
74WAF_CONFIGURE_ARGS+= --disable-caca 74MESON_ARGS+= -Dcaca=disabled
75.endif 75.endif
76 76
77### 77###
78### lua support 78### lua support
79### 79###
80.if !empty(PKG_OPTIONS:Mlua) 80.if !empty(PKG_OPTIONS:Mlua)
81WAF_CONFIGURE_ARGS+= --enable-lua 81MESON_ARGS+= -Dlua=enabled
82LUA_VERSIONS_ACCEPTED= 52 51 82LUA_VERSIONS_ACCEPTED= 52 51
83.include "../../lang/lua/buildlink3.mk" 83.include "../../lang/lua/buildlink3.mk"
84.else 84.else
85WAF_CONFIGURE_ARGS+= --disable-lua 85MESON_ARGS+= -Dlua=disabled
86.endif 86.endif
87 87
88### 88###
89### JACK support (audio output) 89### JACK support (audio output)
90### 90###
91.if !empty(PKG_OPTIONS:Mjack) 91.if !empty(PKG_OPTIONS:Mjack)
92WAF_CONFIGURE_ARGS+= --enable-jack 92MESON_ARGS+= -Djack=enabled
93.include "../../audio/jack/buildlink3.mk" 93.include "../../audio/jack/buildlink3.mk"
94.else 94.else
95WAF_CONFIGURE_ARGS+= --disable-jack 95MESON_ARGS+= -Djack=disabled
96.endif 96.endif
97 97
98 98
99### 99###
100### OpenAL support (audio output) 100### OpenAL support (audio output)
101### 101###
102.if !empty(PKG_OPTIONS:Mopenal) 102.if !empty(PKG_OPTIONS:Mopenal)
103WAF_CONFIGURE_ARGS+= --enable-openal 103MESON_ARGS+= -Dopenal=enabled
104.include "../../audio/openal-soft/buildlink3.mk" 104.include "../../audio/openal-soft/buildlink3.mk"
105.else 105.else
106WAF_CONFIGURE_ARGS+= --disable-openal 106MESON_ARGS+= -Dopenal=disabled
107.endif 107.endif
108 108
109### 109###
110### PulseAudio support (audio output) 110### PulseAudio support (audio output)
111### 111###
112.if !empty(PKG_OPTIONS:Mpulseaudio) 112.if !empty(PKG_OPTIONS:Mpulseaudio)
113WAF_CONFIGURE_ARGS+= --enable-pulse 113MESON_ARGS+= -Dpulse=enabled
114.include "../../audio/pulseaudio/buildlink3.mk" 114.include "../../audio/pulseaudio/buildlink3.mk"
115.else 115.else
116WAF_CONFIGURE_ARGS+= --disable-pulse 116MESON_ARGS+= -Dpulse=disabled
117.endif 117.endif
118 118
119### 119###
120### SDL2 support (audio and video output) 120### SDL2 support (audio and video output)
121### 121###
122.if !empty(PKG_OPTIONS:Msdl2) 122.if !empty(PKG_OPTIONS:Msdl2)
123WAF_CONFIGURE_ARGS+= --enable-sdl2 123MESON_ARGS+= -Dsdl2-audio=enabled
 124MESON_ARGS+= -Dsdl2=enabled
124.include "../../devel/SDL2/buildlink3.mk" 125.include "../../devel/SDL2/buildlink3.mk"
125.else 126.else
126WAF_CONFIGURE_ARGS+= --disable-sdl2 127MESON_ARGS+= -Dsdl2-audio=disabled
 128MESON_ARGS+= -Dsdl2=disabled
127.endif 129.endif
128 130
129### 131###
130### VAAPI support (video output) 132### VAAPI support (video output)
131### 133###
132.if !empty(PKG_OPTIONS:Mvaapi) 134.if !empty(PKG_OPTIONS:Mvaapi)
133WAF_CONFIGURE_ARGS+= --enable-vaapi 135MESON_ARGS+= -Dvaapi=enabled
134.include "../../multimedia/libva/buildlink3.mk" 136.include "../../multimedia/libva/buildlink3.mk"
135.else 137.else
136WAF_CONFIGURE_ARGS+= --disable-vaapi 138MESON_ARGS+= -Dvaapi=disabled
137.endif 139.endif
138 140
139### 141###
140### VDPAU support (video output) 142### VDPAU support (video output)
141### 143###
142.if !empty(PKG_OPTIONS:Mvdpau) 144.if !empty(PKG_OPTIONS:Mvdpau)
143WAF_CONFIGURE_ARGS+= --enable-vdpau 145MESON_ARGS+= -Dvdpau=enabled
144.include "../../multimedia/libvdpau/buildlink3.mk" 146.include "../../multimedia/libvdpau/buildlink3.mk"
145.else 147.else
146WAF_CONFIGURE_ARGS+= --disable-vdpau 148MESON_ARGS+= -Dvdpau=disabled
147.endif 149.endif
148 150
149### 151###
150### libdrm support (video output) 152### libdrm support (video output)
151### 153###
152.if !empty(PKG_OPTIONS:Mlibdrm) 154.if !empty(PKG_OPTIONS:Mlibdrm)
153WAF_CONFIGURE_ARGS+= --enable-drm 155MESON_ARGS+= -Ddrm=enabled
154.include "../../x11/libdrm/buildlink3.mk" 156.include "../../x11/libdrm/buildlink3.mk"
155.else 157.else
156WAF_CONFIGURE_ARGS+= --disable-drm 158MESON_ARGS+= -Ddrm=disabled
157.endif 159.endif
158 160
159### 161###
160### OpenGL support (video output) 162### OpenGL support (video output)
161### 163###
162.if !empty(PKG_OPTIONS:Mopengl) 164.if !empty(PKG_OPTIONS:Mopengl)
163.include "../../graphics/MesaLib/features.mk" 165.include "../../graphics/MesaLib/features.mk"
164. if ${MESALIB_SUPPORTS_EGL:tl} == "no" 166. if ${MESALIB_SUPPORTS_EGL:tl} == "no"
165WAF_CONFIGURE_ARGS+= --disable-egl-x11 167MESON_ARGS+= -Degl-x11=disabled
166. endif 168. endif
167.include "../../graphics/MesaLib/buildlink3.mk" 169.include "../../graphics/MesaLib/buildlink3.mk"
168.elif !empty(PKG_OPTIONS:Mrpi) 170.elif !empty(PKG_OPTIONS:Mrpi)
169TOOL_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland 171TOOL_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland
170CFLAGS+= "-L${PREFIX}/lib" 172CFLAGS+= "-L${PREFIX}/lib"
171SUBST_CLASSES+= vc 173SUBST_CLASSES+= vc
172SUBST_STAGE.vc= pre-configure 174SUBST_STAGE.vc= pre-configure
173SUBST_MESSAGE.vc= Fixing path to VideoCore libraries. 175SUBST_MESSAGE.vc= Fixing path to VideoCore libraries.
174SUBST_FILES.vc= waftools/checks/custom.py 176SUBST_FILES.vc+= meson.build
175SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g' 177SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g'
176.endif 178.endif
177 179
178### 180###
179### X11 support (video output) 181### X11 support (video output)
180### 182###
181.if !empty(PKG_OPTIONS:Mx11) 183.if !empty(PKG_OPTIONS:Mx11)
182WAF_CONFIGURE_ARGS+= --enable-x11 184MESON_ARGS+= -Dx11=enabled
 185MESON_ARGS+= -Dxv=enabled
183.include "../../x11/libXinerama/buildlink3.mk" 186.include "../../x11/libXinerama/buildlink3.mk"
184.include "../../x11/libXpresent/buildlink3.mk" 187.include "../../x11/libXpresent/buildlink3.mk"
185.include "../../x11/libXrandr/buildlink3.mk" 188.include "../../x11/libXrandr/buildlink3.mk"
186.include "../../x11/libXScrnSaver/buildlink3.mk" 189.include "../../x11/libXScrnSaver/buildlink3.mk"
187.include "../../x11/libXv/buildlink3.mk" 190.include "../../x11/libXv/buildlink3.mk"
188.include "../../x11/libXxf86vm/buildlink3.mk" 191.include "../../x11/libXxf86vm/buildlink3.mk"
189.else 192.else
190WAF_CONFIGURE_ARGS+= --disable-x11 193MESON_ARGS+= -Dx11=disabled
 194MESON_ARGS+= -Dxv=disabled
191.endif 195.endif
192 196
193### 197###
194### Sixel support (video output) 198### Sixel support (video output)
195### 199###
196.if !empty(PKG_OPTIONS:Msixel) 200.if !empty(PKG_OPTIONS:Msixel)
197WAF_CONFIGURE_ARGS+= --enable-sixel 201MESON_ARGS+= -Dsixel=enabled
198.include "../../graphics/libsixel/buildlink3.mk" 202.include "../../graphics/libsixel/buildlink3.mk"
199.else 203.else
200WAF_CONFIGURE_ARGS+= --disable-sixel 204MESON_ARGS+= -Dsixel=disabled
201.endif 205.endif

File Added: pkgsrc/multimedia/mpv/patches/patch-meson.build
$NetBSD: patch-meson.build,v 1.1 2023/08/15 19:17:10 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.
- Also check for SNDCTL_DSP_HALT. NetBSD ossaudio(3) has
  SNDCTL_DSP_SETPLAYVOL but not SNDCTL_DSP_HALT. Consistent with the
  same check that is present in wscript.
- Install configuration files to examples, per pkgsrc conventions.

--- meson.build.orig	2023-07-23 17:10:36.000000000 +0000
+++ meson.build
@@ -293,6 +293,7 @@ if cc.get_id() == 'clang'
 endif
 
 darwin = host_machine.system() == 'darwin'
+netbsd = host_machine.system() == 'netbsd'
 win32 = host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
 posix = not win32
 
@@ -521,17 +522,22 @@ features += {'vt.h': cc.has_header_symbo
 
 features += {'consio.h': not features['vt.h'] and cc.has_header_symbol('sys/consio.h', 'VT_GETMODE')}
 
+features += {'wsdisplay_usl_io.h': not features['vt.h'] and not features['consio.h'] and cc.has_header_symbol('dev/wscons/wsdisplay_usl_io.h', 'VT_GETMODE')}
+
 # macOS's pthread_setname_np is a special snowflake and differs from literally every other platform.
 features += {'osx-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['osx-thread-name']
+if not features['osx-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 <pthread.h>')}
 endif
 
 features += {'bsd-thread-name': false}
-if not features['osx-thread-name'] and not features['glibc-thread-name']
+if not features['osx-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 <pthread.h>\n#include <pthread_np.h>')}
 endif
@@ -827,6 +833,8 @@ oss_opt = get_option('oss-audio').requir
     error_message: 'the build is not GPL!',
 )
 features += {'oss-audio': cc.has_header_symbol('sys/soundcard.h', 'SNDCTL_DSP_SETPLAYVOL',
+                                               required: oss_opt) and
+                          cc.has_header_symbol('sys/soundcard.h', 'SNDCTL_DSP_HALT',
                                                required: oss_opt)}
 if features['oss-audio']
     sources += files('audio/out/ao_oss.c')
@@ -894,7 +902,7 @@ if features['direct3d']
 endif
 
 drm = dependency('libdrm', version: '>= 2.4.75', required: get_option('drm'))
-features += {'drm': drm.found() and (features['vt.h'] or features['consio.h'])}
+features += {'drm': drm.found() and (features['vt.h'] or features['consio.h'] or features['wsdisplay_usl_io.h'])}
 if features['drm']
     dependencies += drm
     sources += files('video/drmprime.c',
@@ -1744,7 +1752,7 @@ if get_option('cplayer')
 
     install_data('etc/mpv.desktop', install_dir: join_paths(datadir, 'applications'))
     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')

File Added: pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c

File Deleted: pkgsrc/multimedia/mpv/patches/patch-player-lua-ytdl__hook.lua

File Deleted: pkgsrc/multimedia/mpv/patches/patch-wscript

File Deleted: pkgsrc/multimedia/mpv/patches/patch-wscript__build.py