pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mpv: Import mpv-0.36.0nb3 as wip/mpv
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Sun Dec 31 12:08:06 2023 +0100
Changeset: dc9ab55487867007400b76f397f852cb2a949fd5
Added Files:
mpv/DESCR
mpv/Makefile
mpv/PLIST
mpv/buildlink3.mk
mpv/distinfo
mpv/options.mk
mpv/patches/patch-audio_out_ao__alsa.c
mpv/patches/patch-etc_mpv.conf
mpv/patches/patch-meson.build
mpv/patches/patch-osdep_threads.c
mpv/patches/patch-stream_stream__libarchive.c
mpv/patches/patch-video_out_drm__common.c
Log Message:
mpv: Import mpv-0.36.0nb3 as wip/mpv
mpv is a movie player based on MPlayer and mplayer2. It supports
a wide variety of video file formats, audio and video codecs, and
subtitle types.
Intended to be used to update multimedia/mpv.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dc9ab55487867007400b76f397f852cb2a949fd5
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
mpv/DESCR | 3 +
mpv/Makefile | 91 +++++++++++
mpv/PLIST | 26 ++++
mpv/buildlink3.mk | 14 ++
mpv/distinfo | 11 ++
mpv/options.mk | 215 ++++++++++++++++++++++++++
mpv/patches/patch-audio_out_ao__alsa.c | 18 +++
mpv/patches/patch-etc_mpv.conf | 29 ++++
mpv/patches/patch-meson.build | 74 +++++++++
mpv/patches/patch-osdep_threads.c | 15 ++
mpv/patches/patch-stream_stream__libarchive.c | 17 ++
mpv/patches/patch-video_out_drm__common.c | 16 ++
12 files changed, 529 insertions(+)
diffs:
diff --git a/mpv/DESCR b/mpv/DESCR
new file mode 100644
index 0000000000..2e6447c68d
--- /dev/null
+++ b/mpv/DESCR
@@ -0,0 +1,3 @@
+mpv is a movie player based on MPlayer and mplayer2. It supports
+a wide variety of video file formats, audio and video codecs, and
+subtitle types.
diff --git a/mpv/Makefile b/mpv/Makefile
new file mode 100644
index 0000000000..566b0a4e6d
--- /dev/null
+++ b/mpv/Makefile
@@ -0,0 +1,91 @@
+# $NetBSD: Makefile,v 1.162 2023/11/12 13:23:01 wiz Exp $
+
+DISTNAME= mpv-0.36.0
+CATEGORIES= multimedia
+MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+PKGREVISION= 3
+
+MAINTAINER= leot%NetBSD.org@localhost
+HOMEPAGE= https://mpv.io/
+COMMENT= Video player based on MPlayer and mplayer2
+LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1
+
+# needs sem_timedwait(3)
+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
+
+MESON_ARGS+= -Ddvdnav=enabled
+MESON_ARGS+= -Dlibmpv=true
+
+# Support Wayland via SDL2, wayland support in mpv is too fast-moving.
+MESON_ARGS+= -Dwayland=disabled
+
+USE_TOOLS+= perl pkg-config
+
+MAKE_DIRS= ${PKG_SYSCONFDIR}/mpv
+INSTALLATION_DIRS= share/examples/mpv
+CONF_FILES+= share/examples/mpv/encoding-profiles.conf \
+ ${PKG_SYSCONFDIR}/mpv/encoding-profiles.conf
+CONF_FILES+= share/examples/mpv/mpv.conf \
+ ${PKG_SYSCONFDIR}/mpv/mpv.conf
+
+PKGCONFIG_OVERRIDE+= libmpv/mpv.pc.in
+
+SUBST_CLASSES+= python
+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 and rst2man command names.
+
+BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-version-script rm:-Wl,mpv.def
+
+CFLAGS.SunOS+= -D__EXTENSIONS__
+LDFLAGS.SunOS+= -lsocket
+
+.include "../../mk/bsd.prefs.mk"
+
+#
+# At some point this should be consolidated into mk/platform/Darwin.mk, it is
+# here temporarily while any issues are ironed out and it can be made generic
+# for Swift handling.
+#
+# On newer macOS releases there are a couple of swift compat static libraries
+# that need to be added to the search path.
+#
+.if ${OPSYS} == "Darwin"
+XCODE_DIR!= xcode-select -p 2>/dev/null || ${TRUE}
+. if exists(${XCODE_DIR}/usr/lib/swift/macosx)
+BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/usr/lib/swift/macosx
+. elif exists(${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx)
+BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx
+. endif
+.endif
+
+post-install:
+ ${MV} ${DESTDIR}${PREFIX}/share/doc/mpv/mpv.conf \
+ ${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/zlib/buildlink3.mk"
+.include "../../graphics/lcms2/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../multimedia/libass/buildlink3.mk"
+.include "../../multimedia/libdvdnav/buildlink3.mk"
+.include "../../multimedia/ffmpeg6/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/atomic64.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mpv/PLIST b/mpv/PLIST
new file mode 100644
index 0000000000..a1f8aa4d62
--- /dev/null
+++ b/mpv/PLIST
@@ -0,0 +1,26 @@
+@comment $NetBSD: PLIST,v 1.14 2023/08/15 19:17:10 leot Exp $
+bin/mpv
+include/mpv/client.h
+include/mpv/render.h
+include/mpv/render_gl.h
+include/mpv/stream_cb.h
+lib/libmpv.so
+lib/libmpv.so.2
+lib/libmpv.so.2.1.0
+lib/pkgconfig/mpv.pc
+man/man1/mpv.1
+share/applications/mpv.desktop
+share/bash-completion/completions/mpv
+share/doc/mpv/input.conf
+share/doc/mpv/mplayer-input.conf
+share/doc/mpv/restore-old-bindings.conf
+share/examples/mpv/encoding-profiles.conf
+share/examples/mpv/mpv.conf
+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
diff --git a/mpv/buildlink3.mk b/mpv/buildlink3.mk
new file mode 100644
index 0000000000..450633a5c0
--- /dev/null
+++ b/mpv/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.3 2023/08/14 05:24:56 wiz Exp $
+
+BUILDLINK_TREE+= mpv
+
+.if !defined(MPV_BUILDLINK3_MK)
+MPV_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.mpv+= mpv>=0.32.0nb13
+BUILDLINK_ABI_DEPENDS.mpv?= mpv>=0.35.1nb6
+BUILDLINK_PKGSRCDIR.mpv?= ../../multimedia/mpv
+
+.endif # MPV_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -mpv
diff --git a/mpv/distinfo b/mpv/distinfo
new file mode 100644
index 0000000000..cfe8d59ce8
--- /dev/null
+++ b/mpv/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.80 2023/08/15 19:17:10 leot Exp $
+
+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-meson.build) = 1f534e05b5d87958a03be35027e7d4e03f772dcb
+SHA1 (patch-osdep_threads.c) = ac9d45ae77893104eb4185f8b399fcc90960cf77
+SHA1 (patch-stream_stream__libarchive.c) = 2025f994b7f82cc868608ab7e8df0ae89b549922
+SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b
diff --git a/mpv/options.mk b/mpv/options.mk
new file mode 100644
index 0000000000..897634b799
--- /dev/null
+++ b/mpv/options.mk
@@ -0,0 +1,215 @@
+# $NetBSD: options.mk,v 1.35 2023/10/20 04:58:09 mrg Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.mpv
+
+
+PKG_OPTIONS_OPTIONAL_GROUPS= gl
+PKG_OPTIONS_GROUP.gl= opengl rpi
+
+# audio outputs
+PKG_SUPPORTED_OPTIONS+= alsa jack openal pulseaudio
+# video outputs
+PKG_SUPPORTED_OPTIONS+= caca libdrm sixel x11
+# audio/video outputs
+PKG_SUPPORTED_OPTIONS+= sdl2
+# misc
+PKG_SUPPORTED_OPTIONS+= bluray lua javascript
+
+PKG_SUGGESTED_OPTIONS= bluray lua javascript sdl2 sixel
+PKG_SUGGESTED_OPTIONS.Linux+= alsa pulseaudio
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+PKG_SUGGESTED_OPTIONS+= opengl x11
+.endif
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
+PKG_SUGGESTED_OPTIONS+= libdrm
+.endif
+
+.include "../../multimedia/libva/available.mk"
+
+.if ${VAAPI_AVAILABLE} == "yes"
+PKG_SUPPORTED_OPTIONS+= vaapi
+PKG_SUGGESTED_OPTIONS+= vaapi
+.endif
+
+.include "../../multimedia/libvdpau/available.mk"
+
+.if ${VDPAU_AVAILABLE} == "yes"
+PKG_SUPPORTED_OPTIONS+= vdpau
+PKG_SUGGESTED_OPTIONS+= vdpau
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### alsa support (audio output)
+###
+.if !empty(PKG_OPTIONS:Malsa)
+MESON_ARGS+= -Dalsa=enabled
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
+MESON_ARGS+= -Dalsa=disabled
+.endif
+
+###
+### libbluray support
+###
+.if !empty(PKG_OPTIONS:Mbluray)
+MESON_ARGS+= -Dlibbluray=enabled
+.include "../../multimedia/libbluray/buildlink3.mk"
+.else
+MESON_ARGS+= -Dlibbluray=disabled
+.endif
+
+###
+### caca support (video output)
+###
+.if !empty(PKG_OPTIONS:Mcaca)
+MESON_ARGS+= -Dcaca=enabled
+.include "../../graphics/libcaca/buildlink3.mk"
+.else
+MESON_ARGS+= -Dcaca=disabled
+.endif
+
+###
+### lua support
+###
+.if !empty(PKG_OPTIONS:Mlua)
+MESON_ARGS+= -Dlua=enabled
+LUA_VERSIONS_ACCEPTED= 52 51
+.include "../../lang/lua/buildlink3.mk"
+.else
+MESON_ARGS+= -Dlua=disabled
+.endif
+
+###
+### JACK support (audio output)
+###
+.if !empty(PKG_OPTIONS:Mjack)
+MESON_ARGS+= -Djack=enabled
+.include "../../audio/jack/buildlink3.mk"
+.else
+MESON_ARGS+= -Djack=disabled
+.endif
+
+
+###
+### OpenAL support (audio output)
+###
+.if !empty(PKG_OPTIONS:Mopenal)
+MESON_ARGS+= -Dopenal=enabled
+.include "../../audio/openal-soft/buildlink3.mk"
+.else
+MESON_ARGS+= -Dopenal=disabled
+.endif
+
+###
+### PulseAudio support (audio output)
+###
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+MESON_ARGS+= -Dpulse=enabled
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+MESON_ARGS+= -Dpulse=disabled
+.endif
+
+###
+### SDL2 support (audio and video output)
+###
+.if !empty(PKG_OPTIONS:Msdl2)
+MESON_ARGS+= -Dsdl2-audio=enabled
+MESON_ARGS+= -Dsdl2=enabled
+.include "../../devel/SDL2/buildlink3.mk"
+.else
+MESON_ARGS+= -Dsdl2-audio=disabled
+MESON_ARGS+= -Dsdl2=disabled
+.endif
+
+###
+### VAAPI support (video output)
+###
+.if !empty(PKG_OPTIONS:Mvaapi)
+MESON_ARGS+= -Dvaapi=enabled
+.include "../../multimedia/libva/buildlink3.mk"
+.else
+MESON_ARGS+= -Dvaapi=disabled
+.endif
+
+###
+### VDPAU support (video output)
+###
+.if !empty(PKG_OPTIONS:Mvdpau)
+MESON_ARGS+= -Dvdpau=enabled
+.include "../../multimedia/libvdpau/buildlink3.mk"
+.else
+MESON_ARGS+= -Dvdpau=disabled
+.endif
+
+###
+### libdrm support (video output)
+###
+.if !empty(PKG_OPTIONS:Mlibdrm)
+MESON_ARGS+= -Ddrm=enabled
+.include "../../x11/libdrm/buildlink3.mk"
+.else
+MESON_ARGS+= -Ddrm=disabled
+.endif
+
+###
+### OpenGL support (video output)
+###
+.if !empty(PKG_OPTIONS:Mopengl)
+.include "../../graphics/MesaLib/features.mk"
+. if ${MESALIB_SUPPORTS_EGL:tl} == "no"
+MESON_ARGS+= -Degl-x11=disabled
+. endif
+.include "../../graphics/MesaLib/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mrpi)
+TOOL_DEPENDS+= raspberrypi-userland>=20170109:../../misc/raspberrypi-userland
+CFLAGS+= "-L${PREFIX}/lib"
+SUBST_CLASSES+= vc
+SUBST_STAGE.vc= pre-configure
+SUBST_MESSAGE.vc= Fixing path to VideoCore libraries.
+SUBST_FILES.vc+= meson.build
+SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g'
+.endif
+
+###
+### X11 support (video output)
+###
+.if !empty(PKG_OPTIONS:Mx11)
+MESON_ARGS+= -Dx11=enabled
+MESON_ARGS+= -Dxv=enabled
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libXpresent/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXv/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.else
+MESON_ARGS+= -Dx11=disabled
+MESON_ARGS+= -Dxv=disabled
+.endif
+
+###
+### Sixel support (video output)
+###
+.if !empty(PKG_OPTIONS:Msixel)
+MESON_ARGS+= -Dsixel=enabled
+.include "../../graphics/libsixel/buildlink3.mk"
+.else
+MESON_ARGS+= -Dsixel=disabled
+.endif
+
+###
+### JavaScript support
+###
+.if !empty(PKG_OPTIONS:Mjavascript)
+MESON_ARGS+= -Djavascript=enabled
+.include "../../lang/mujs/buildlink3.mk"
+.else
+MESON_ARGS+= -Djavascript=disabled
+.endif
diff --git a/mpv/patches/patch-audio_out_ao__alsa.c b/mpv/patches/patch-audio_out_ao__alsa.c
new file mode 100644
index 0000000000..6a67e50515
--- /dev/null
+++ b/mpv/patches/patch-audio_out_ao__alsa.c
@@ -0,0 +1,18 @@
+$NetBSD: patch-audio_out_ao__alsa.c,v 1.1 2019/06/01 01:15:54 tsutsui Exp $
+
+- pull a compat definition of ESTRPIPE for non-Linux OSes
+ from alsa-lib-1.1.4.1/include/type_compat.h
+
+--- audio/out/ao_alsa.c.orig 2018-10-02 19:03:41.000000000 +0000
++++ audio/out/ao_alsa.c
+@@ -49,6 +49,10 @@
+ #define HAVE_CHMAP_API 0
+ #endif
+
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
++
+ #include "ao.h"
+ #include "internal.h"
+ #include "audio/format.h"
diff --git a/mpv/patches/patch-etc_mpv.conf b/mpv/patches/patch-etc_mpv.conf
new file mode 100644
index 0000000000..e5bd944aa0
--- /dev/null
+++ b/mpv/patches/patch-etc_mpv.conf
@@ -0,0 +1,29 @@
+$NetBSD: patch-etc_mpv.conf,v 1.1 2022/05/03 07:04:27 nia Exp $
+
+Optimize for stereo audio output devices on NetBSD.
+
+--- etc/mpv.conf.orig 2022-01-03 19:45:08.000000000 +0000
++++ etc/mpv.conf
+@@ -71,19 +71,9 @@
+ # audio settings #
+ ##################
+
+-# Specify default audio device. You can list devices with: --audio-device=help
+-# The option takes the device string (the stuff between the '...').
+-#audio-device=alsa/default
+-
+-# Do not filter audio to keep pitch when changing playback speed.
+-#audio-pitch-correction=no
+-
+-# Output 5.1 audio natively, and upmix/downmix audio with a different format.
+-#audio-channels=5.1
+-# Disable any automatic remix, _if_ the audio output accepts the audio format.
+-# of the currently played file. See caveats mentioned in the manpage.
+-# (The default is "auto-safe", see manpage.)
+-#audio-channels=auto
++# NetBSD's audio stack will decline to set a surround mode if the device
++# does not support it. By default, play surround files in stereo for safety.
++audio-channels=stereo
+
+ ##################
+ # other settings #
diff --git a/mpv/patches/patch-meson.build b/mpv/patches/patch-meson.build
new file mode 100644
index 0000000000..7fadef4bff
--- /dev/null
+++ b/mpv/patches/patch-meson.build
@@ -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')
diff --git a/mpv/patches/patch-osdep_threads.c b/mpv/patches/patch-osdep_threads.c
new file mode 100644
index 0000000000..b3cbb75464
--- /dev/null
+++ b/mpv/patches/patch-osdep_threads.c
@@ -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
+ }
+
diff --git a/mpv/patches/patch-stream_stream__libarchive.c b/mpv/patches/patch-stream_stream__libarchive.c
new file mode 100644
index 0000000000..e5ca14f35e
--- /dev/null
+++ b/mpv/patches/patch-stream_stream__libarchive.c
@@ -0,0 +1,17 @@
+$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 2022-01-03 19:45:08.000000000 +0000
++++ 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)
diff --git a/mpv/patches/patch-video_out_drm__common.c b/mpv/patches/patch-video_out_drm__common.c
new file mode 100644
index 0000000000..02d150a067
--- /dev/null
+++ b/mpv/patches/patch-video_out_drm__common.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-video_out_drm__common.c,v 1.4 2020/12/19 11:27:51 leot Exp $
+
+Enable support for DRM on NetBSD.
+
+--- video/out/drm_common.c.orig 2020-11-22 17:46:28.000000000 +0000
++++ video/out/drm_common.c
+@@ -30,6 +30,9 @@
+
+ #if HAVE_CONSIO_H
+ #include <sys/consio.h>
++#elif HAVE_WSDISPLAY_USL_IO_H
++#include <sys/types.h>
++#include <dev/wscons/wsdisplay_usl_io.h>
+ #else
+ #include <sys/vt.h>
+ #endif
Home |
Main Index |
Thread Index |
Old Index