mpv: To aid in playing surround sound files on typical NetBSD hardware, default to downmixing surround files to stereo. Healthy side effect: read default options from $SYSCONFDIR/mpv/mpv.conf. Bump PKGREVISIONdiff -r1.134 -r1.135 pkgsrc/multimedia/mpv/Makefile
(nia)
@@ -1,78 +1,83 @@ | @@ -1,78 +1,83 @@ | |||
1 | # $NetBSD: Makefile,v 1.134 2022/04/18 19:11:46 adam Exp $ | 1 | # $NetBSD: Makefile,v 1.135 2022/05/03 07:04:27 nia Exp $ | |
2 | 2 | |||
3 | DISTNAME= mpv-0.34.1 | 3 | DISTNAME= mpv-0.34.1 | |
4 | PKGREVISION= 2 | 4 | PKGREVISION= 3 | |
5 | CATEGORIES= multimedia | 5 | CATEGORIES= multimedia | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/} | |
7 | GITHUB_TAG= v${PKGVERSION_NOREV} | 7 | GITHUB_TAG= v${PKGVERSION_NOREV} | |
8 | 8 | |||
9 | MAINTAINER= leot@NetBSD.org | 9 | MAINTAINER= leot@NetBSD.org | |
10 | HOMEPAGE= https://mpv.io/ | 10 | HOMEPAGE= https://mpv.io/ | |
11 | COMMENT= Video player based on MPlayer and mplayer2 | 11 | COMMENT= Video player based on MPlayer and mplayer2 | |
12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 | 12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 | |
13 | 13 | |||
14 | # needs sem_timedwait(3) | 14 | # needs sem_timedwait(3) | |
15 | NOT_FOR_PLATFORM= NetBSD-[1-6].*-* | 15 | NOT_FOR_PLATFORM= NetBSD-[1-6].*-* | |
16 | 16 | |||
17 | TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils | 17 | TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils | |
18 | # ${WRKSRC}/bootstrap.py mentions needed version | 18 | # ${WRKSRC}/bootstrap.py mentions needed version | |
19 | TOOL_DEPENDS+= waf>=2.0.9:../../devel/waf | 19 | TOOL_DEPENDS+= waf>=2.0.9:../../devel/waf | |
20 | 20 | |||
21 | WAF_REPLACE_EXECUTABLE= yes | 21 | WAF_REPLACE_EXECUTABLE= yes | |
22 | WAF_CONFIGURE_ARGS+= --bindir=${PREFIX}/bin | 22 | WAF_CONFIGURE_ARGS+= --bindir=${PREFIX}/bin | |
23 | WAF_CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} | |||
23 | WAF_CONFIGURE_ARGS+= --enable-dvdnav | 24 | WAF_CONFIGURE_ARGS+= --enable-dvdnav | |
24 | WAF_CONFIGURE_ARGS+= --enable-libmpv-shared | 25 | WAF_CONFIGURE_ARGS+= --enable-libmpv-shared | |
25 | 26 | |||
26 | PYTHON_FOR_BUILD_ONLY= yes | 27 | PYTHON_FOR_BUILD_ONLY= yes | |
27 | 28 | |||
28 | USE_TOOLS+= perl pkg-config | 29 | USE_TOOLS+= perl pkg-config | |
29 | 30 | |||
30 | MAKE_DIRS= ${PKG_SYSCONFDIR}/mpv | 31 | MAKE_DIRS= ${PKG_SYSCONFDIR}/mpv | |
31 | INSTALLATION_DIRS= share/examples/mpv | 32 | INSTALLATION_DIRS= share/examples/mpv | |
32 | CONF_FILES+= share/examples/mpv/encoding-profiles.conf ${PKG_SYSCONFDIR}/mpv/encoding-profiles.conf | 33 | CONF_FILES+= share/examples/mpv/encoding-profiles.conf \ | |
34 | ${PKG_SYSCONFDIR}/mpv/encoding-profiles.conf | |||
35 | CONF_FILES+= share/examples/mpv/mpv.conf \ | |||
36 | ${PKG_SYSCONFDIR}/mpv/mpv.conf | |||
33 | 37 | |||
34 | PKGCONFIG_OVERRIDE+= libmpv/mpv.pc.in | 38 | PKGCONFIG_OVERRIDE+= libmpv/mpv.pc.in | |
35 | 39 | |||
36 | SUBST_CLASSES+= python | 40 | SUBST_CLASSES+= python | |
37 | SUBST_SED.python+= -e "s,python,python${PYVERSSUFFIX}," | 41 | SUBST_SED.python+= -e "s,python,python${PYVERSSUFFIX}," | |
38 | SUBST_SED.python+= -e "s,rst2man,rst2man-${PYVERSSUFFIX}," | 42 | SUBST_SED.python+= -e "s,rst2man,rst2man-${PYVERSSUFFIX}," | |
39 | SUBST_FILES.python+= wscript wscript_build.py | 43 | SUBST_FILES.python+= wscript wscript_build.py | |
40 | SUBST_STAGE.python= pre-configure | 44 | SUBST_STAGE.python= pre-configure | |
41 | SUBST_MESSAGE.python= Fix Python command names. | 45 | SUBST_MESSAGE.python= Fix Python command names. | |
42 | 46 | |||
43 | .include "../../mk/bsd.prefs.mk" | 47 | .include "../../mk/bsd.prefs.mk" | |
44 | 48 | |||
45 | # | 49 | # | |
46 | # At some point this should be consolidated into mk/platform/Darwin.mk, it is | 50 | # At some point this should be consolidated into mk/platform/Darwin.mk, it is | |
47 | # here temporarily while any issues are ironed out and it can be made generic | 51 | # here temporarily while any issues are ironed out and it can be made generic | |
48 | # for Swift handling. | 52 | # for Swift handling. | |
49 | # | 53 | # | |
50 | # On newer macOS releases there are a couple of swift compat static libraries | 54 | # On newer macOS releases there are a couple of swift compat static libraries | |
51 | # that need to be added to the search path. | 55 | # that need to be added to the search path. | |
52 | # | 56 | # | |
53 | .if ${OPSYS} == "Darwin" | 57 | .if ${OPSYS} == "Darwin" | |
54 | XCODE_DIR!= xcode-select -p 2>/dev/null || ${TRUE} | 58 | XCODE_DIR!= xcode-select -p 2>/dev/null || ${TRUE} | |
55 | . if exists(${XCODE_DIR}/usr/lib/swift/macosx) | 59 | . if exists(${XCODE_DIR}/usr/lib/swift/macosx) | |
56 | BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/usr/lib/swift/macosx | 60 | BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/usr/lib/swift/macosx | |
57 | . elif exists(${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx) | 61 | . elif exists(${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx) | |
58 | BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx | 62 | BUILDLINK_PASSTHRU_DIRS+= ${XCODE_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx | |
59 | . endif | 63 | . endif | |
60 | .endif | 64 | .endif | |
61 | 65 | |||
62 | post-install: | 66 | post-install: | |
63 | cd ${DESTDIR}${PREFIX} && ${MV} etc/mpv/encoding-profiles.conf share/examples/mpv | 67 | ${MV} ${DESTDIR}${PREFIX}/share/doc/mpv/mpv.conf \ | |
68 | ${DESTDIR}${PREFIX}/share/examples/mpv/mpv.conf | |||
64 | 69 | |||
65 | .include "options.mk" | 70 | .include "options.mk" | |
66 | .include "../../converters/libiconv/buildlink3.mk" | 71 | .include "../../converters/libiconv/buildlink3.mk" | |
67 | .include "../../devel/waf/waf.mk" | 72 | .include "../../devel/waf/waf.mk" | |
68 | .include "../../devel/zlib/buildlink3.mk" | 73 | .include "../../devel/zlib/buildlink3.mk" | |
69 | .include "../../graphics/lcms2/buildlink3.mk" | 74 | .include "../../graphics/lcms2/buildlink3.mk" | |
70 | .include "../../lang/python/application.mk" | 75 | .include "../../lang/python/application.mk" | |
71 | .include "../../multimedia/libass/buildlink3.mk" | 76 | .include "../../multimedia/libass/buildlink3.mk" | |
72 | .include "../../multimedia/libdvdnav/buildlink3.mk" | 77 | .include "../../multimedia/libdvdnav/buildlink3.mk" | |
73 | .include "../../multimedia/ffmpeg4/buildlink3.mk" | 78 | .include "../../multimedia/ffmpeg4/buildlink3.mk" | |
74 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | 79 | .include "../../graphics/hicolor-icon-theme/buildlink3.mk" | |
75 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | 80 | .include "../../sysutils/desktop-file-utils/desktopdb.mk" | |
76 | .include "../../mk/jpeg.buildlink3.mk" | 81 | .include "../../mk/jpeg.buildlink3.mk" | |
77 | .include "../../mk/atomic64.mk" | 82 | .include "../../mk/atomic64.mk" | |
78 | .include "../../mk/bsd.pkg.mk" | 83 | .include "../../mk/bsd.pkg.mk" |
@@ -1,26 +1,26 @@ | @@ -1,26 +1,26 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.11 2020/12/19 11:27:51 leot Exp $ | 1 | @comment $NetBSD: PLIST,v 1.12 2022/05/03 07:04:27 nia Exp $ | |
2 | bin/mpv | 2 | bin/mpv | |
3 | include/mpv/client.h | 3 | include/mpv/client.h | |
4 | include/mpv/opengl_cb.h | 4 | include/mpv/opengl_cb.h | |
5 | include/mpv/render.h | 5 | include/mpv/render.h | |
6 | include/mpv/render_gl.h | 6 | include/mpv/render_gl.h | |
7 | include/mpv/stream_cb.h | 7 | include/mpv/stream_cb.h | |
8 | lib/libmpv.so | 8 | lib/libmpv.so | |
9 | lib/libmpv.so.1 | 9 | lib/libmpv.so.1 | |
10 | lib/libmpv.so.1.109.0 | 10 | lib/libmpv.so.1.109.0 | |
11 | lib/pkgconfig/mpv.pc | 11 | lib/pkgconfig/mpv.pc | |
12 | man/man1/mpv.1 | 12 | man/man1/mpv.1 | |
13 | share/applications/mpv.desktop | 13 | share/applications/mpv.desktop | |
14 | share/bash-completion/completions/mpv | 14 | share/bash-completion/completions/mpv | |
15 | share/doc/mpv/input.conf | 15 | share/doc/mpv/input.conf | |
16 | share/doc/mpv/mplayer-input.conf | 16 | share/doc/mpv/mplayer-input.conf | |
17 | share/doc/mpv/mpv.conf | |||
18 | share/doc/mpv/restore-old-bindings.conf | 17 | share/doc/mpv/restore-old-bindings.conf | |
19 | share/examples/mpv/encoding-profiles.conf | 18 | share/examples/mpv/encoding-profiles.conf | |
19 | share/examples/mpv/mpv.conf | |||
20 | share/icons/hicolor/128x128/apps/mpv.png | 20 | share/icons/hicolor/128x128/apps/mpv.png | |
21 | share/icons/hicolor/16x16/apps/mpv.png | 21 | share/icons/hicolor/16x16/apps/mpv.png | |
22 | share/icons/hicolor/32x32/apps/mpv.png | 22 | share/icons/hicolor/32x32/apps/mpv.png | |
23 | share/icons/hicolor/64x64/apps/mpv.png | 23 | share/icons/hicolor/64x64/apps/mpv.png | |
24 | share/icons/hicolor/scalable/apps/mpv.svg | 24 | share/icons/hicolor/scalable/apps/mpv.svg | |
25 | share/icons/hicolor/symbolic/apps/mpv-symbolic.svg | 25 | share/icons/hicolor/symbolic/apps/mpv-symbolic.svg | |
26 | share/zsh/site-functions/_mpv | 26 | share/zsh/site-functions/_mpv |
@@ -1,9 +1,11 @@ | @@ -1,9 +1,11 @@ | |||
1 | $NetBSD: distinfo,v 1.73 2022/01/06 20:02:16 leot Exp $ | 1 | $NetBSD: distinfo,v 1.74 2022/05/03 07:04:27 nia Exp $ | |
2 | 2 | |||
3 | BLAKE2s (mpv-0.34.1.tar.gz) = 8c12b91067c852b26e1b044afb0ff1e80f1950f2c5cc193cc10ffbef227eb4da | 3 | BLAKE2s (mpv-0.34.1.tar.gz) = 8c12b91067c852b26e1b044afb0ff1e80f1950f2c5cc193cc10ffbef227eb4da | |
4 | SHA512 (mpv-0.34.1.tar.gz) = 77ea349d6999f8cce9b5cce4cebd3506a224fc18ab08d22dd16bd34c34d012bb170879b268ddd62db40d116b4cc0b2d9d651b8097f387ed9115c426834cac77e | 4 | SHA512 (mpv-0.34.1.tar.gz) = 77ea349d6999f8cce9b5cce4cebd3506a224fc18ab08d22dd16bd34c34d012bb170879b268ddd62db40d116b4cc0b2d9d651b8097f387ed9115c426834cac77e | |
5 | Size (mpv-0.34.1.tar.gz) = 3288356 bytes | 5 | Size (mpv-0.34.1.tar.gz) = 3288356 bytes | |
6 | SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 | 6 | SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0 | |
7 | SHA1 (patch-etc_mpv.conf) = 9e41b2f4bf59c3bfc5ad84af05538661981ed111 | |||
7 | SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b | 8 | SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b | |
8 | SHA1 (patch-video_out_wayland__common.c) = abed416d258ebf0b595ea897daf3013dd81189e8 | 9 | SHA1 (patch-video_out_wayland__common.c) = abed416d258ebf0b595ea897daf3013dd81189e8 | |
9 | SHA1 (patch-wscript) = 3792bd2cc84fababdde86e66c5a93772f2b105d1 | 10 | SHA1 (patch-wscript) = c7bb9c506718c38aded9ca47e7aa0d76cf338bf2 | |
11 | SHA1 (patch-wscript__build.py) = fc77ebe56fba0b827541d052a767402965793ee1 |
$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 #
@@ -1,38 +1,38 @@ | @@ -1,38 +1,38 @@ | |||
1 | $NetBSD: patch-wscript,v 1.7 2021/11/01 17:39:26 leot Exp $ | 1 | $NetBSD: patch-wscript,v 1.8 2022/05/03 07:04:27 nia Exp $ | |
2 | 2 | |||
3 | - Enable support for DRM on NetBSD. | 3 | - Enable support for DRM on NetBSD. | |
4 | - Check for OSSv4 features that could not be on some platforms | 4 | - Check for OSSv4 features that could not be on some platforms | |
5 | (e.g. NetBSD) | 5 | (e.g. NetBSD) | |
6 | 6 | |||
7 | --- wscript.orig 2021-11-01 14:44:39.000000000 +0000 | 7 | --- wscript.orig 2022-01-03 19:45:08.000000000 +0000 | |
8 | +++ wscript | 8 | +++ wscript | |
9 | @@ -272,6 +272,11 @@ iconv support use --disable-iconv.", | 9 | @@ -272,6 +272,11 @@ iconv support use --disable-iconv.", | |
10 | 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'], | 10 | 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'], | |
11 | 'int m; ioctl(0, VT_GETMODE, &m)'), | 11 | 'int m; ioctl(0, VT_GETMODE, &m)'), | |
12 | }, { | 12 | }, { | |
13 | + 'name': 'wsdisplay_usl_io.h', | 13 | + 'name': 'wsdisplay_usl_io.h', | |
14 | + 'desc': 'wsdisplay_usl_io.h', | 14 | + 'desc': 'wsdisplay_usl_io.h', | |
15 | + 'func': check_statement(['sys/types.h', 'dev/wscons/wsdisplay_usl_io.h', 'sys/ioctl.h'], | 15 | + 'func': check_statement(['sys/types.h', 'dev/wscons/wsdisplay_usl_io.h', 'sys/ioctl.h'], | |
16 | + 'int m; ioctl(0, VT_GETMODE, &m)'), | 16 | + 'int m; ioctl(0, VT_GETMODE, &m)'), | |
17 | + }, { | 17 | + }, { | |
18 | 'name': 'gbm.h', | 18 | 'name': 'gbm.h', | |
19 | 'desc': 'gbm.h', | 19 | 'desc': 'gbm.h', | |
20 | 'func': check_cc(header_name=['stdio.h', 'gbm.h']), | 20 | 'func': check_cc(header_name=['stdio.h', 'gbm.h']), | |
21 | @@ -432,7 +437,7 @@ audio_output_features = [ | 21 | @@ -432,7 +437,7 @@ audio_output_features = [ | |
22 | }, { | 22 | }, { | |
23 | 'name': '--oss-audio', | 23 | 'name': '--oss-audio', | |
24 | 'desc': 'OSSv4 audio output', | 24 | 'desc': 'OSSv4 audio output', | |
25 | - 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL'), | 25 | - 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL'), | |
26 | + 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL; int y = SNDCTL_DSP_HALT;'), | 26 | + 'func': check_statement(['sys/soundcard.h'], 'int x = SNDCTL_DSP_SETPLAYVOL; int y = SNDCTL_DSP_HALT;'), | |
27 | 'deps': 'posix && gpl', | 27 | 'deps': 'posix && gpl', | |
28 | }, { | 28 | }, { | |
29 | 'name': '--pulse', | 29 | 'name': '--pulse', | |
30 | @@ -490,7 +495,7 @@ video_output_features = [ | 30 | @@ -490,7 +495,7 @@ video_output_features = [ | |
31 | }, { | 31 | }, { | |
32 | 'name': '--drm', | 32 | 'name': '--drm', | |
33 | 'desc': 'DRM', | 33 | 'desc': 'DRM', | |
34 | - 'deps': 'vt.h || consio.h', | 34 | - 'deps': 'vt.h || consio.h', | |
35 | + 'deps': 'vt.h || consio.h || wsdisplay_usl_io.h', | 35 | + 'deps': 'vt.h || consio.h || wsdisplay_usl_io.h', | |
36 | 'func': check_pkg_config('libdrm', '>= 2.4.75'), | 36 | 'func': check_pkg_config('libdrm', '>= 2.4.75'), | |
37 | }, { | 37 | }, { | |
38 | 'name': '--gbm', | 38 | 'name': '--gbm', |
$NetBSD: patch-wscript__build.py,v 1.3 2022/05/03 07:04:27 nia Exp $
Install configuration files to examples, per pkgsrc conventions.
--- wscript_build.py.orig 2022-01-03 19:45:08.000000000 +0000
+++ wscript_build.py
@@ -737,7 +737,7 @@ def build(ctx):
ctx.env.DATADIR + '/applications',
['etc/mpv.desktop'] )
- ctx.install_files(ctx.env.CONFDIR, ['etc/encoding-profiles.conf'] )
+ ctx.install_files(ctx.env.DATADIR + '/examples/mpv', ['etc/encoding-profiles.conf'] )
for size in '16x16 32x32 64x64 128x128'.split():
ctx.install_as(