pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
mpv: Import mpv-0.33.0 as wip/mpv
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Fri Nov 27 22:09:47 2020 +0100
Changeset: 38b04726fc1b57309588c63b34a3fb6ec3eac89d
Modified Files:
Makefile
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-video_out_drm__common.c
mpv/patches/patch-video_out_wayland__common.c
mpv/patches/patch-wscript
Log Message:
mpv: Import mpv-0.33.0 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=38b04726fc1b57309588c63b34a3fb6ec3eac89d
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
mpv/DESCR | 3 +
mpv/Makefile | 78 +++++++++++
mpv/PLIST | 26 ++++
mpv/buildlink3.mk | 13 ++
mpv/distinfo | 10 ++
mpv/options.mk | 189 ++++++++++++++++++++++++++
mpv/patches/patch-audio_out_ao__alsa.c | 18 +++
mpv/patches/patch-video_out_drm__common.c | 16 +++
mpv/patches/patch-video_out_wayland__common.c | 22 +++
mpv/patches/patch-wscript | 27 ++++
11 files changed, 403 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 43eabd6069..b1a585352e 100644
--- a/Makefile
+++ b/Makefile
@@ -2218,6 +2218,7 @@ SUBDIR+= mppdec
SUBDIR+= mppp
SUBDIR+= mpq-tools
SUBDIR+= mps-youtube
+SUBDIR+= mpv
SUBDIR+= mpv-git
SUBDIR+= mruby
SUBDIR+= msgpack-git
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..e3754262fb
--- /dev/null
+++ b/mpv/Makefile
@@ -0,0 +1,78 @@
+# $NetBSD: Makefile,v 1.117 2020/11/06 12:30:16 nia Exp $
+
+DISTNAME= mpv-0.33.0
+CATEGORIES= multimedia
+MASTER_SITES= ${MASTER_SITE_GITHUB:=mpv-player/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+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].*-*
+
+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+= --enable-dvdnav
+WAF_CONFIGURE_ARGS+= --disable-egl-x11
+WAF_CONFIGURE_ARGS+= --enable-libmpv-shared
+
+PYTHON_FOR_BUILD_ONLY= yes
+
+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
+
+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
+SUBST_STAGE.python= pre-configure
+SUBST_MESSAGE.python= Fix Python command names.
+
+.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:
+ cd ${DESTDIR}${PREFIX} && ${MV} etc/mpv/encoding-profiles.conf share/examples/mpv
+
+.include "options.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 "../../multimedia/libass/buildlink3.mk"
+.include "../../multimedia/libdvdnav/buildlink3.mk"
+.include "../../multimedia/ffmpeg4/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mpv/PLIST b/mpv/PLIST
new file mode 100644
index 0000000000..b6b85c7747
--- /dev/null
+++ b/mpv/PLIST
@@ -0,0 +1,26 @@
+@comment $NetBSD$
+bin/mpv
+include/mpv/client.h
+include/mpv/opengl_cb.h
+include/mpv/render.h
+include/mpv/render_gl.h
+include/mpv/stream_cb.h
+lib/libmpv.so
+lib/libmpv.so.1
+lib/libmpv.so.1.109.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/mpv.conf
+share/doc/mpv/restore-old-bindings.conf
+share/examples/mpv/encoding-profiles.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/zsh/site-functions/_mpv
diff --git a/mpv/buildlink3.mk b/mpv/buildlink3.mk
new file mode 100644
index 0000000000..9448199e06
--- /dev/null
+++ b/mpv/buildlink3.mk
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2020/06/05 03:52:23 ryoon Exp $
+
+BUILDLINK_TREE+= mpv
+
+.if !defined(MPV_BUILDLINK3_MK)
+MPV_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.mpv+= mpv>=0.32.0nb13
+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..7360cf9afc
--- /dev/null
+++ b/mpv/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.67 2020/04/16 04:17:54 nia Exp $
+
+SHA1 (mpv-0.33.0.tar.gz) = 62ba4778773624546aeb039bb39c33b7a21579f9
+RMD160 (mpv-0.33.0.tar.gz) = 4b5201454365d1fa2dc0c1b3350f227b056d0758
+SHA512 (mpv-0.33.0.tar.gz) = 5a4af74ba2c9656c6b61adcf944c734923c7b4527a49cd79ec63a0617911629438a138d887dfbd4b6c0c9c53e2c68c18839d98d9765179e52cc5675d0682e077
+Size (mpv-0.33.0.tar.gz) = 3259387 bytes
+SHA1 (patch-audio_out_ao__alsa.c) = c4661d0d22550d6e4eb2b7a42dd04dbcc58123b0
+SHA1 (patch-video_out_drm__common.c) = 70eb8884f63e9456c0ffe592289cfd81e208955b
+SHA1 (patch-video_out_wayland__common.c) = 6a8d1d9b4109f941847f7eef47e3fbc7b3cc0535
+SHA1 (patch-wscript) = f9b3f85c696d70ca4becb5f554320f754779c0de
diff --git a/mpv/options.mk b/mpv/options.mk
new file mode 100644
index 0000000000..80410218a2
--- /dev/null
+++ b/mpv/options.mk
@@ -0,0 +1,189 @@
+# $NetBSD: options.mk,v 1.25 2020/06/30 14:30:38 nia 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 pulseaudio
+# video outputs
+PKG_SUPPORTED_OPTIONS+= caca libdrm wayland x11
+# audio/video outputs
+PKG_SUPPORTED_OPTIONS+= sdl2
+# misc
+PKG_SUPPORTED_OPTIONS+= bluray lua
+
+PKG_SUGGESTED_OPTIONS= bluray lua sdl2
+PKG_SUGGESTED_OPTIONS.Linux+= alsa pulseaudio
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+.if ${OPSYS} != "Darwin"
+PKG_SUGGESTED_OPTIONS+= opengl libdrm x11
+.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 "../../devel/wayland/platform.mk"
+
+.if ${PLATFORM_SUPPORTS_WAYLAND} == "yes"
+PKG_SUGGESTED_OPTIONS+= wayland
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+###
+### alsa support (audio output)
+###
+.if !empty(PKG_OPTIONS:Malsa)
+WAF_CONFIGURE_ARGS+= --enable-alsa
+.include "../../audio/alsa-lib/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-alsa
+.endif
+
+###
+### libbluray support
+###
+.if !empty(PKG_OPTIONS:Mbluray)
+WAF_CONFIGURE_ARGS+= --enable-libbluray
+.include "../../multimedia/libbluray/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-libbluray
+.endif
+
+###
+### caca support (video output)
+###
+.if !empty(PKG_OPTIONS:Mcaca)
+WAF_CONFIGURE_ARGS+= --enable-caca
+.include "../../graphics/libcaca/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-caca
+.endif
+
+###
+### lua support
+###
+.if !empty(PKG_OPTIONS:Mlua)
+WAF_CONFIGURE_ARGS+= --enable-lua
+LUA_VERSIONS_ACCEPTED= 52 51
+.include "../../lang/lua/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-lua
+.endif
+
+###
+### JACK support (audio output)
+###
+.if !empty(PKG_OPTIONS:Mjack)
+WAF_CONFIGURE_ARGS+= --enable-jack
+.include "../../audio/jack/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-jack
+.endif
+
+###
+### PulseAudio support (audio output)
+###
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+WAF_CONFIGURE_ARGS+= --enable-pulse
+.include "../../audio/pulseaudio/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-pulse
+.endif
+
+###
+### SDL2 support (audio and video output)
+###
+.if !empty(PKG_OPTIONS:Msdl2)
+WAF_CONFIGURE_ARGS+= --enable-sdl2
+.include "../../devel/SDL2/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-sdl2
+.endif
+
+###
+### VAAPI support (video output)
+###
+.if !empty(PKG_OPTIONS:Mvaapi)
+WAF_CONFIGURE_ARGS+= --enable-vaapi
+.include "../../multimedia/libva/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-vaapi
+.endif
+
+###
+### VDPAU support (video output)
+###
+.if !empty(PKG_OPTIONS:Mvdpau)
+WAF_CONFIGURE_ARGS+= --enable-vdpau
+.include "../../multimedia/libvdpau/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-vdpau
+.endif
+
+###
+### libdrm support (video output)
+###
+.if !empty(PKG_OPTIONS:Mlibdrm)
+WAF_CONFIGURE_ARGS+= --enable-drm
+.include "../../x11/libdrm/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-drm
+.endif
+
+###
+### OpenGL support (video output)
+###
+.if !empty(PKG_OPTIONS:Mopengl)
+.include "../../graphics/MesaLib/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mrpi)
+BUILD_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= waftools/checks/custom.py
+SUBST_SED.vc+= -e 's;opt/vc;${PREFIX};g'
+.endif
+
+###
+### Wayland support (video output)
+###
+.if !empty(PKG_OPTIONS:Mwayland)
+WAF_CONFIGURE_ARGS+= --enable-wayland
+.include "../../devel/wayland/buildlink3.mk"
+.include "../../devel/wayland-protocols/buildlink3.mk"
+.include "../../x11/libxkbcommon/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-wayland
+.endif
+
+###
+### X11 support (video output)
+###
+.if !empty(PKG_OPTIONS:Mx11)
+WAF_CONFIGURE_ARGS+= --enable-x11
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXv/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.else
+WAF_CONFIGURE_ARGS+= --disable-x11
+.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-video_out_drm__common.c b/mpv/patches/patch-video_out_drm__common.c
new file mode 100644
index 0000000000..4b6b01e9fb
--- /dev/null
+++ b/mpv/patches/patch-video_out_drm__common.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-video_out_drm__common.c,v 1.3 2019/10/25 14:35:56 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
diff --git a/mpv/patches/patch-video_out_wayland__common.c b/mpv/patches/patch-video_out_wayland__common.c
new file mode 100644
index 0000000000..019ab56e0f
--- /dev/null
+++ b/mpv/patches/patch-video_out_wayland__common.c
@@ -0,0 +1,22 @@
+$NetBSD: patch-video_out_wayland__common.c,v 1.4 2019/12/10 10:45:07 nia Exp $
+
+Allow building on systems without evdev.
+
+--- video/out/wayland_common.c.orig 2020-11-22 17:46:28.000000000 +0000
++++ video/out/wayland_common.c
+@@ -19,7 +19,15 @@
+ #include <limits.h>
+ #include <poll.h>
+ #include <unistd.h>
++#ifdef HAVE_LINUX_INPUT_EVENT_CODES
+ #include <linux/input-event-codes.h>
++#else
++#define BTN_LEFT (0x110)
++#define BTN_RIGHT (0x111)
++#define BTN_MIDDLE (0x112)
++#define BTN_SIDE (0x113)
++#define BTN_EXTRA (0x114)
++#endif
+ #include <time.h>
+ #include "common/msg.h"
+ #include "options/m_config.h"
diff --git a/mpv/patches/patch-wscript b/mpv/patches/patch-wscript
new file mode 100644
index 0000000000..3aba7ed3a3
--- /dev/null
+++ b/mpv/patches/patch-wscript
@@ -0,0 +1,27 @@
+$NetBSD: patch-wscript,v 1.5 2020/03/16 21:20:03 wiz Exp $
+
+Enable support for DRM on NetBSD.
+
+--- wscript.orig 2020-11-22 17:46:28.000000000 +0000
++++ wscript
+@@ -268,6 +268,11 @@ iconv support use --disable-iconv.",
+ 'func': check_statement(['sys/consio.h', 'sys/ioctl.h'],
+ 'int m; ioctl(0, VT_GETMODE, &m)'),
+ }, {
++ 'name': 'wsdisplay_usl_io.h',
++ 'desc': 'wsdisplay_usl_io.h',
++ 'func': check_statement(['sys/types.h', 'dev/wscons/wsdisplay_usl_io.h', 'sys/ioctl.h'],
++ 'int m; ioctl(0, VT_GETMODE, &m)'),
++ }, {
+ 'name': 'gbm.h',
+ 'desc': 'gbm.h',
+ 'func': check_cc(header_name=['stdio.h', 'gbm.h']),
+@@ -477,7 +482,7 @@ video_output_features = [
+ }, {
+ 'name': '--drm',
+ 'desc': 'DRM',
+- 'deps': 'vt.h || consio.h',
++ 'deps': 'vt.h || consio.h || wsdisplay_usl_io.h',
+ 'func': check_pkg_config('libdrm', '>= 2.4.74'),
+ }, {
+ 'name': '--gbm',
Home |
Main Index |
Thread Index |
Old Index