pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/multimedia/mpv



Module Name:    pkgsrc
Committed By:   leot
Date:           Tue Aug 15 19:17:10 UTC 2023

Modified Files:
        pkgsrc/multimedia/mpv: Makefile PLIST distinfo options.mk
Added Files:
        pkgsrc/multimedia/mpv/patches: patch-meson.build patch-osdep_threads.c
Removed Files:
        pkgsrc/multimedia/mpv/patches: patch-player-lua-ytdl__hook.lua
            patch-wscript patch-wscript__build.py

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 pkgsrc/multimedia/mpv/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/multimedia/mpv/PLIST
cvs rdiff -u -r1.79 -r1.80 pkgsrc/multimedia/mpv/distinfo
cvs rdiff -u -r1.33 -r1.34 pkgsrc/multimedia/mpv/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/multimedia/mpv/patches/patch-meson.build \
    pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c
cvs rdiff -u -r1.1 -r0 \
    pkgsrc/multimedia/mpv/patches/patch-player-lua-ytdl__hook.lua
cvs rdiff -u -r1.9 -r0 pkgsrc/multimedia/mpv/patches/patch-wscript
cvs rdiff -u -r1.4 -r0 pkgsrc/multimedia/mpv/patches/patch-wscript__build.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/multimedia/mpv/Makefile
diff -u pkgsrc/multimedia/mpv/Makefile:1.158 pkgsrc/multimedia/mpv/Makefile:1.159
--- pkgsrc/multimedia/mpv/Makefile:1.158        Mon Aug 14 05:24:56 2023
+++ pkgsrc/multimedia/mpv/Makefile      Tue Aug 15 19:17:10 2023
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.158 2023/08/14 05:24:56 wiz Exp $
+# $NetBSD: Makefile,v 1.159 2023/08/15 19:17:10 leot Exp $
 
-DISTNAME=      mpv-0.35.1
-PKGREVISION=   6
+DISTNAME=      mpv-0.36.0
 CATEGORIES=    multimedia
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=mpv-player/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -17,21 +16,14 @@ NOT_FOR_PLATFORM=   NetBSD-[1-6].*-*
 # Requires support for c11 atomics.
 USE_CC_FEATURES+=      c11
 
+# Needed for rst2man
 TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils
-# ${WRKSRC}/bootstrap.py mentions needed version
-TOOL_DEPENDS+= waf>=2.0.9:../../devel/waf
 
-WAF_REPLACE_EXECUTABLE=        yes
-WAF_CONFIGURE_ARGS+=   --bindir=${PREFIX}/bin
-WAF_CONFIGURE_ARGS+=   --sysconfdir=${PKG_SYSCONFDIR}
-WAF_CONFIGURE_ARGS+=   --enable-dvdnav
-WAF_CONFIGURE_ARGS+=   --enable-libmpv-shared
+MESON_ARGS+=   -Ddvdnav=enabled
+MESON_ARGS+=   -Dlibmpv=true
 
 # Support Wayland via SDL2, wayland support in mpv is too fast-moving.
-WAF_CONFIGURE_ARGS+=   --disable-wayland
-
-PYTHON_FOR_BUILD_ONLY=         yes
-PYTHON_VERSIONS_INCOMPATIBLE=  27
+MESON_ARGS+=   -Dwayland=disabled
 
 USE_TOOLS+=    perl pkg-config
 
@@ -45,11 +37,11 @@ CONF_FILES+=                share/examples/mpv/mpv.con
 PKGCONFIG_OVERRIDE+=   libmpv/mpv.pc.in
 
 SUBST_CLASSES+=                python
-SUBST_SED.python+=     -e "s,python,python${PYVERSSUFFIX},"
-SUBST_SED.python+=     -e "s,rst2man,rst2man-${PYVERSSUFFIX},"
-SUBST_FILES.python+=   wscript wscript_build.py
+SUBST_SED.python+=     -e "s,python3,python${PYVERSSUFFIX},"
+SUBST_SED.python+=     -e "s,'rst2man','rst2man-${PYVERSSUFFIX}',"
+SUBST_FILES.python+=   meson.build
 SUBST_STAGE.python=    pre-configure
-SUBST_MESSAGE.python=  Fix Python command names.
+SUBST_MESSAGE.python=  Fix python and rst2man command names.
 
 BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,-version-script rm:-Wl,mpv.def
 
@@ -80,12 +72,14 @@ post-install:
            ${DESTDIR}${PREFIX}/share/examples/mpv/mpv.conf
 
 .include "options.mk"
+
+.include "../../devel/meson/build.mk"
+
 .include "../../archivers/libarchive/buildlink3.mk"
 .include "../../converters/libiconv/buildlink3.mk"
-.include "../../devel/waf/waf.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/lcms2/buildlink3.mk"
-.include "../../lang/python/application.mk"
+.include "../../lang/python/tool.mk"
 .include "../../multimedia/libass/buildlink3.mk"
 .include "../../multimedia/libdvdnav/buildlink3.mk"
 .include "../../multimedia/ffmpeg6/buildlink3.mk"

Index: pkgsrc/multimedia/mpv/PLIST
diff -u pkgsrc/multimedia/mpv/PLIST:1.13 pkgsrc/multimedia/mpv/PLIST:1.14
--- pkgsrc/multimedia/mpv/PLIST:1.13    Wed Nov 16 11:27:32 2022
+++ pkgsrc/multimedia/mpv/PLIST Tue Aug 15 19:17:10 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2022/11/16 11:27:32 leot Exp $
+@comment $NetBSD: PLIST,v 1.14 2023/08/15 19:17:10 leot Exp $
 bin/mpv
 include/mpv/client.h
 include/mpv/render.h
@@ -6,7 +6,7 @@ include/mpv/render_gl.h
 include/mpv/stream_cb.h
 lib/libmpv.so
 lib/libmpv.so.2
-lib/libmpv.so.2.0.0
+lib/libmpv.so.2.1.0
 lib/pkgconfig/mpv.pc
 man/man1/mpv.1
 share/applications/mpv.desktop

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

Index: pkgsrc/multimedia/mpv/options.mk
diff -u pkgsrc/multimedia/mpv/options.mk:1.33 pkgsrc/multimedia/mpv/options.mk:1.34
--- pkgsrc/multimedia/mpv/options.mk:1.33       Fri Aug 11 08:52:23 2023
+++ pkgsrc/multimedia/mpv/options.mk    Tue Aug 15 19:17:10 2023
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.33 2023/08/11 08:52:23 nia Exp $
+# $NetBSD: options.mk,v 1.34 2023/08/15 19:17:10 leot Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.mpv
 
@@ -48,51 +48,51 @@ PKG_SUGGESTED_OPTIONS+=             vdpau
 ### alsa support (audio output)
 ###
 .if !empty(PKG_OPTIONS:Malsa)
-WAF_CONFIGURE_ARGS+=   --enable-alsa
+MESON_ARGS+=   -Dalsa=enabled
 .include "../../audio/alsa-lib/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-alsa
+MESON_ARGS+=   -Dalsa=disabled
 .endif
 
 ###
 ### libbluray support
 ###
 .if !empty(PKG_OPTIONS:Mbluray)
-WAF_CONFIGURE_ARGS+=   --enable-libbluray
+MESON_ARGS+=   -Dlibbluray=enabled
 .include "../../multimedia/libbluray/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-libbluray
+MESON_ARGS+=   -Dlibbluray=disabled
 .endif
 
 ###
 ### caca support (video output)
 ###
 .if !empty(PKG_OPTIONS:Mcaca)
-WAF_CONFIGURE_ARGS+=   --enable-caca
+MESON_ARGS+=   -Dcaca=enabled
 .include "../../graphics/libcaca/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-caca
+MESON_ARGS+=   -Dcaca=disabled
 .endif
 
 ###
 ### lua support
 ###
 .if !empty(PKG_OPTIONS:Mlua)
-WAF_CONFIGURE_ARGS+=   --enable-lua
+MESON_ARGS+=   -Dlua=enabled
 LUA_VERSIONS_ACCEPTED= 52 51
 .include "../../lang/lua/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-lua
+MESON_ARGS+=   -Dlua=disabled
 .endif
 
 ###
 ### JACK support (audio output)
 ###
 .if !empty(PKG_OPTIONS:Mjack)
-WAF_CONFIGURE_ARGS+=   --enable-jack
+MESON_ARGS+=   -Djack=enabled
 .include "../../audio/jack/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-jack
+MESON_ARGS+=   -Djack=disabled
 .endif
 
 
@@ -100,60 +100,62 @@ WAF_CONFIGURE_ARGS+=      --disable-jack
 ### OpenAL support (audio output)
 ###
 .if !empty(PKG_OPTIONS:Mopenal)
-WAF_CONFIGURE_ARGS+=   --enable-openal
+MESON_ARGS+=   -Dopenal=enabled
 .include "../../audio/openal-soft/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-openal
+MESON_ARGS+=   -Dopenal=disabled
 .endif
 
 ###
 ### PulseAudio support (audio output)
 ###
 .if !empty(PKG_OPTIONS:Mpulseaudio)
-WAF_CONFIGURE_ARGS+=   --enable-pulse
+MESON_ARGS+=   -Dpulse=enabled
 .include "../../audio/pulseaudio/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-pulse
+MESON_ARGS+=   -Dpulse=disabled
 .endif
 
 ###
 ### SDL2 support (audio and video output)
 ###
 .if !empty(PKG_OPTIONS:Msdl2)
-WAF_CONFIGURE_ARGS+=   --enable-sdl2
+MESON_ARGS+=   -Dsdl2-audio=enabled
+MESON_ARGS+=   -Dsdl2=enabled
 .include "../../devel/SDL2/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-sdl2
+MESON_ARGS+=   -Dsdl2-audio=disabled
+MESON_ARGS+=   -Dsdl2=disabled
 .endif
 
 ###
 ### VAAPI support (video output)
 ###
 .if !empty(PKG_OPTIONS:Mvaapi)
-WAF_CONFIGURE_ARGS+=   --enable-vaapi
+MESON_ARGS+=   -Dvaapi=enabled
 .include "../../multimedia/libva/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-vaapi
+MESON_ARGS+=   -Dvaapi=disabled
 .endif
 
 ###
 ### VDPAU support (video output)
 ###
 .if !empty(PKG_OPTIONS:Mvdpau)
-WAF_CONFIGURE_ARGS+=   --enable-vdpau
+MESON_ARGS+=   -Dvdpau=enabled
 .include "../../multimedia/libvdpau/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-vdpau
+MESON_ARGS+=   -Dvdpau=disabled
 .endif
 
 ###
 ### libdrm support (video output)
 ###
 .if !empty(PKG_OPTIONS:Mlibdrm)
-WAF_CONFIGURE_ARGS+=   --enable-drm
+MESON_ARGS+=   -Ddrm=enabled
 .include "../../x11/libdrm/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-drm
+MESON_ARGS+=   -Ddrm=disabled
 .endif
 
 ###
@@ -162,7 +164,7 @@ WAF_CONFIGURE_ARGS+=        --disable-drm
 .if !empty(PKG_OPTIONS:Mopengl)
 .include "../../graphics/MesaLib/features.mk"
 .  if ${MESALIB_SUPPORTS_EGL:tl} == "no"
-WAF_CONFIGURE_ARGS+=   --disable-egl-x11
+MESON_ARGS+=   -Degl-x11=disabled
 .  endif
 .include "../../graphics/MesaLib/buildlink3.mk"
 .elif !empty(PKG_OPTIONS:Mrpi)
@@ -171,7 +173,7 @@ CFLAGS+=            "-L${PREFIX}/lib"
 SUBST_CLASSES+=                vc
 SUBST_STAGE.vc=                pre-configure
 SUBST_MESSAGE.vc=      Fixing path to VideoCore libraries.
-SUBST_FILES.vc=                waftools/checks/custom.py
+SUBST_FILES.vc+=       meson.build
 SUBST_SED.vc+=         -e 's;opt/vc;${PREFIX};g'
 .endif
 
@@ -179,7 +181,8 @@ SUBST_SED.vc+=              -e 's;opt/vc;${PREFIX};g
 ### X11 support (video output)
 ###
 .if !empty(PKG_OPTIONS:Mx11)
-WAF_CONFIGURE_ARGS+=   --enable-x11
+MESON_ARGS+=   -Dx11=enabled
+MESON_ARGS+=   -Dxv=enabled
 .include "../../x11/libXinerama/buildlink3.mk"
 .include "../../x11/libXpresent/buildlink3.mk"
 .include "../../x11/libXrandr/buildlink3.mk"
@@ -187,15 +190,16 @@ WAF_CONFIGURE_ARGS+=      --enable-x11
 .include "../../x11/libXv/buildlink3.mk"
 .include "../../x11/libXxf86vm/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-x11
+MESON_ARGS+=   -Dx11=disabled
+MESON_ARGS+=   -Dxv=disabled
 .endif
 
 ###
 ### Sixel support (video output)
 ###
 .if !empty(PKG_OPTIONS:Msixel)
-WAF_CONFIGURE_ARGS+=   --enable-sixel
+MESON_ARGS+=   -Dsixel=enabled
 .include "../../graphics/libsixel/buildlink3.mk"
 .else
-WAF_CONFIGURE_ARGS+=   --disable-sixel
+MESON_ARGS+=   -Dsixel=disabled
 .endif

Added files:

Index: pkgsrc/multimedia/mpv/patches/patch-meson.build
diff -u /dev/null pkgsrc/multimedia/mpv/patches/patch-meson.build:1.1
--- /dev/null   Tue Aug 15 19:17:10 2023
+++ pkgsrc/multimedia/mpv/patches/patch-meson.build     Tue Aug 15 19:17:10 2023
@@ -0,0 +1,74 @@
+$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')
Index: pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c
diff -u /dev/null pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c:1.1
--- /dev/null   Tue Aug 15 19:17:10 2023
+++ pkgsrc/multimedia/mpv/patches/patch-osdep_threads.c Tue Aug 15 19:17:10 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-osdep_threads.c,v 1.1 2023/08/15 19:17:10 leot Exp $
+
+Add support for NetBSD.
+
+--- osdep/threads.c.orig       2023-07-23 17:10:36.000000000 +0000
++++ osdep/threads.c
+@@ -51,6 +51,8 @@ void mpthread_set_name(const char *name)
+     pthread_set_name_np(pthread_self(), tname);
+ #elif HAVE_OSX_THREAD_NAME
+     pthread_setname_np(tname);
++#elif HAVE_NETBSD_THREAD_NAME
++    pthread_setname_np(pthread_self(), "%s", tname);
+ #endif
+ }
+ 



Home | Main Index | Thread Index | Old Index