* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2015-12-28 13:27 Ian Delaney
0 siblings, 0 replies; 17+ messages in thread
From: Ian Delaney @ 2015-12-28 13:27 UTC (permalink / raw
To: gentoo-commits
commit: 075cacd6224fc94f2cbd2be393d626626dc95dd2
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Tue Dec 22 23:08:10 2015 +0000
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 12:47:24 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075cacd6
media-video/mpv: revbump 0.11.0 to receive recent live ebuild changes
This requires a small upstream patch to fix include in tests.
Package-Manager: portage-2.2.24
.../mpv/files/mpv-fix-include-in-tests.patch | 17 ++
media-video/mpv/mpv-0.11.0-r1.ebuild | 284 +++++++++++++++++++++
2 files changed, 301 insertions(+)
diff --git a/media-video/mpv/files/mpv-fix-include-in-tests.patch b/media-video/mpv/files/mpv-fix-include-in-tests.patch
new file mode 100644
index 0000000..b020119
--- /dev/null
+++ b/media-video/mpv/files/mpv-fix-include-in-tests.patch
@@ -0,0 +1,17 @@
+commit 867334395765ae7d2765e0834f9fd3dd5de53cab
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date: Tue Dec 22 17:10:12 2015 +0300
+
+ tests: fix #include
+
+diff --git a/test/gl_video.c b/test/gl_video.c
+index 253ab35..97fee94 100644
+--- a/test/gl_video.c
++++ b/test/gl_video.c
+@@ -1,5 +1,5 @@
+ #include "test_helpers.h"
+-#include "video/out/gl_video.h"
++#include "video/out/opengl/video.h"
+
+ static void test_scale_ambient_lux_limits(void **state) {
+ float x;
diff --git a/media-video/mpv/mpv-0.11.0-r1.ebuild b/media-video/mpv/mpv-0.11.0-r1.ebuild
new file mode 100644
index 0000000..dc450c2
--- /dev/null
+++ b/media-video/mpv/mpv-0.11.0-r1.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
+
+WAF_PV='1.8.12'
+
+inherit eutils fdo-mime gnome2-utils pax-utils python-any-r1 waf-utils
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="https://mpv.io/"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
+ DOCS=( RELEASE_NOTES )
+else
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+fi
+SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+DOCS+=( README.md etc/example.conf etc/input.conf )
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+# Here 'opengl' stands for GLX, 'egl' stands for any EGL-based output
+IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd egl +enca encode +iconv
+ jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit openal
+ +opengl oss pulseaudio pvr raspberry-pi rubberband samba sdl selinux test
+ uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver xv"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ egl? ( || ( X wayland ) )
+ enca? ( iconv )
+ lcms? ( || ( opengl egl ) )
+ libguess? ( iconv )
+ luajit? ( lua )
+ opengl? ( X )
+ pvr? ( v4l )
+ uchardet? ( iconv )
+ v4l? ( || ( alsa oss ) )
+ vaapi? ( X )
+ vdpau? ( X )
+ wayland? ( egl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+"
+
+COMMON_DEPEND="
+ !libav? ( >=media-video/ffmpeg-2.4.0:0=[encode?,threads,vaapi?,vdpau?] )
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ archive? ( >=app-arch/libarchive-3.0.0:= )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ cdda? ( dev-libs/libcdio-paranoia )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdnav-4.2.0
+ >=media-libs/libdvdread-4.1.0
+ )
+ egl? ( media-libs/mesa[egl,wayland(-)?] )
+ iconv? (
+ virtual/libiconv
+ enca? ( app-i18n/enca )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ uchardet? ( dev-libs/uchardet )
+ )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ libass? (
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ lua? (
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ pulseaudio? ( media-sound/pulseaudio )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
+ v4l? ( media-libs/libv4l )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? (
+ x11-libs/libXdamage
+ virtual/opengl
+ )
+ vaapi? ( >=x11-libs/libva-1.2.0[X] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ virtual/pkgconfig
+ doc? ( dev-python/rst2pdf )
+ test? ( >=dev-util/cmocka-1.0.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+pkg_pretend() {
+ if ! use libass; then
+ ewarn "You have disabled the libass support."
+ ewarn "OSD and subtitles won't be available."
+ fi
+
+ if use openal; then
+ ewarn "You have enabled the openal audio output. Be warned that"
+ ewarn "this output is considered experimental by upstream."
+ fi
+
+ if use sdl; then
+ ewarn "You have enabled the sdl video and audio outputs. Note that"
+ ewarn "upstream provides these outputs for compatibility reasons only."
+ ewarn "You probably don't need them under the normal circumstances."
+ fi
+
+ if use libav; then
+ elog "You have enabled media-video/libav instead of media-video/ffmpeg."
+ elog "Upstream recommends media-video/ffmpeg, as some functionality"
+ elog "is not provided by media-video/libav."
+ fi
+
+ einfo "mpv optionally supports many different audio and video formats."
+ einfo "You will need to enable support for the desired formats in your"
+ einfo "libavcodec/libavformat provider:"
+ einfo " media-video/ffmpeg or media-video/libav"
+}
+
+src_prepare() {
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
+ chmod +x "${S}"/waf || die
+
+ epatch "${FILESDIR}/${PN}-fix-include-in-tests.patch"
+ epatch_user
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+
+ --disable-libmpv-static
+ --disable-static-build
+ --disable-build-date # Create reproducible build
+ --disable-optimize # Do not add '-O2' to CFLAGS
+ --disable-debug-build # Do not add '-g' to CFLAGS
+
+ $(use_enable doc pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable cli zsh-comp)
+ $(use_enable test)
+
+ $(use_enable iconv)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(usex luajit '--lua=luajit' '')
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdda)
+ $(use_enable enca)
+ $(use_enable libguess)
+ $(use_enable uchardet)
+ $(use_enable rubberband)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # Only available in overlays
+ --disable-vapoursynth-lazy
+ $(use_enable archive libarchive)
+
+ --enable-libavfilter
+ --enable-libavdevice
+
+ # Audio outputs
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # Only available in overlays
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ $(use_enable alsa)
+ --disable-coreaudio
+ --disable-dsound
+ --disable-wasapi
+
+ # Video outputs
+ --disable-cocoa
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(use_enable opengl gl-x11)
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
+ $(use_enable wayland gl-wayland)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi)
+ $(use_enable vaapi vaapi-vpp)
+ $(usex vaapi "$(use_enable opengl vaapi-glx)" '--disable-vaapi-glx')
+ $(use_enable libcaca caca)
+ $(use_enable drm)
+ $(use_enable jpeg)
+ $(use_enable raspberry-pi rpi)
+
+ # HWaccels
+ $(use_enable vaapi vaapi-hwaccel)
+ # Automagic VDPAU HW acceleration. See Gentoo bug 558870.
+
+ # TV features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l audio-input)
+ $(use_enable pvr)
+ $(use_enable dvb dvbin)
+ )
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}usr/bin/${PN}"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+src_test() {
+ cd "${S}"/build/test || die
+ for test in *; do
+ if [[ -x ${test} ]]; then
+ ./"${test}" || die "Test suite failed"
+ fi
+ done
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-01-21 9:16 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-01-21 9:16 UTC (permalink / raw
To: gentoo-commits
commit: 7b03d80da4c0ef6393943e39b0c91096e3be9da6
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Wed Jan 20 14:50:13 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Jan 20 14:50:13 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b03d80d
media-video/mpv: fix 0.15.0 build with vaapi USE wrt bug 572386
Upstream issue: https://github.com/mpv-player/mpv/issues/2737
Gentoo-Bug: 572386
Package-Manager: portage-2.2.26
...pv-0.15.0-fix-vaapi-build-on-older-ffmpeg.patch | 23 ++++++++++++++++++++++
media-video/mpv/mpv-0.15.0-r1.ebuild | 1 +
2 files changed, 24 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.15.0-fix-vaapi-build-on-older-ffmpeg.patch b/media-video/mpv/files/mpv-0.15.0-fix-vaapi-build-on-older-ffmpeg.patch
new file mode 100644
index 0000000..dc55c98
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.15.0-fix-vaapi-build-on-older-ffmpeg.patch
@@ -0,0 +1,23 @@
+commit a8abb53a5d00d023aa6cb753ccaa6810e1640338
+Author: wm4 <wm4@nowhere>
+Date: Wed Jan 20 15:35:15 2016 +0100
+
+ vaapi: fix compilation on older FFmpeg/Libav
+
+ They don't define FF_PROFILE_VP9_0.
+
+ Fixes #2737.
+
+diff --git a/video/decode/vaapi.c b/video/decode/vaapi.c
+index edc95f5..313a901 100644
+--- a/video/decode/vaapi.c
++++ b/video/decode/vaapi.c
+@@ -109,7 +109,7 @@ static const struct va_native_display disp_x11 = {
+ #endif
+
+ #define HAS_HEVC VA_CHECK_VERSION(0, 38, 0)
+-#define HAS_VP9 VA_CHECK_VERSION(0, 38, 1)
++#define HAS_VP9 (VA_CHECK_VERSION(0, 38, 1) && defined(FF_PROFILE_VP9_0))
+
+ #define PE(av_codec_id, ff_profile, vdp_profile) \
+ {AV_CODEC_ID_ ## av_codec_id, FF_PROFILE_ ## ff_profile, \
diff --git a/media-video/mpv/mpv-0.15.0-r1.ebuild b/media-video/mpv/mpv-0.15.0-r1.ebuild
index ca974a9..3bf7631 100644
--- a/media-video/mpv/mpv-0.15.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.15.0-r1.ebuild
@@ -163,6 +163,7 @@ src_prepare() {
chmod +x "${S}"/waf || die
epatch "${FILESDIR}/${P}-fix-null-pointer-dereference.patch"
+ epatch "${FILESDIR}/${P}-fix-vaapi-build-on-older-ffmpeg.patch"
epatch_user
}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-03-10 21:51 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-03-10 21:51 UTC (permalink / raw
To: gentoo-commits
commit: 137f714824e5b676ca22de257d30e9b8977bce31
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Thu Mar 10 17:48:52 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Mar 10 21:35:15 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=137f7148
media-video/mpv: revbump to 0.16.0-r1
Prevent NULL dereference on Wayland.
Fix known regressions since 0.15.0.
Sync with 9999.
Package-Manager: portage-2.2.27
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
...-0.16.0-avoid-NULL-dereference-on-wayland.patch | 23 ++
.../files/mpv-0.16.0-fix-bitrate-calculation.patch | 31 +++
.../files/mpv-0.16.0-fix-coverart-decoding.patch | 39 +++
.../mpv-0.16.0-set-correct-seekable-flags.patch | 36 +++
media-video/mpv/mpv-0.16.0-r1.ebuild | 281 +++++++++++++++++++++
5 files changed, 410 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.16.0-avoid-NULL-dereference-on-wayland.patch b/media-video/mpv/files/mpv-0.16.0-avoid-NULL-dereference-on-wayland.patch
new file mode 100644
index 0000000..9af5e24
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.16.0-avoid-NULL-dereference-on-wayland.patch
@@ -0,0 +1,23 @@
+commit 5c2026336419805202fbf7a817b2960b0584ce5d
+Author: wm4 <wm4@nowhere>
+Date: Thu Mar 3 15:30:28 2016 +0100
+
+ vo_opengl: wayland: don't destroy NULL wl_egl_window
+
+ The wayland client API crashes intentionally when trying to free NULL
+ objects. (Thanks.)
+
+diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
+index 63a1453..a100073 100644
+--- a/video/out/opengl/context_wayland.c
++++ b/video/out/opengl/context_wayland.c
+@@ -183,7 +183,8 @@ static void waylandgl_uninit(MPGLContext *ctx)
+
+ if (wl->egl_context.egl.ctx) {
+ eglReleaseThread();
+- wl_egl_window_destroy(wl->egl_context.egl_window);
++ if (wl->egl_context.egl_window)
++ wl_egl_window_destroy(wl->egl_context.egl_window);
+ eglDestroySurface(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
+ eglMakeCurrent(wl->egl_context.egl.dpy, NULL, NULL, EGL_NO_CONTEXT);
+ eglDestroyContext(wl->egl_context.egl.dpy, wl->egl_context.egl.ctx);
diff --git a/media-video/mpv/files/mpv-0.16.0-fix-bitrate-calculation.patch b/media-video/mpv/files/mpv-0.16.0-fix-bitrate-calculation.patch
new file mode 100644
index 0000000..2515b3a
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.16.0-fix-bitrate-calculation.patch
@@ -0,0 +1,31 @@
+commit 5c1fe2a4f3e559a0c6a010e48b0c225d01c1cd0a
+Author: wm4 <wm4@nowhere>
+Date: Sat Mar 5 12:48:58 2016 +0100
+
+ demux: delay bitrate calculation on packets with unknown timestamps
+
+ Commit 503c6f7f essentially removed timestamps from "laces" (Block sub-
+ divisions), which means many audio packets will have no timestamp.
+ There's no reason why bitrate calculation can't just delayed to a point
+ when the next timestamp is known.
+
+ Fixes #2903 (no audio bitrate with mkv files).
+
+diff --git a/demux/demux.c b/demux/demux.c
+index bd3211a..a7241d9 100644
+--- a/demux/demux.c
++++ b/demux/demux.c
+@@ -681,11 +681,11 @@ static struct demux_packet *dequeue_packet(struct demux_stream *ds)
+ if (ts != MP_NOPTS_VALUE)
+ ds->base_ts = ts;
+
+- if (pkt->keyframe) {
++ if (pkt->keyframe && ts != MP_NOPTS_VALUE) {
+ // Update bitrate - only at keyframe points, because we use the
+ // (possibly) reordered packet timestamps instead of realtime.
+ double d = ts - ds->last_br_ts;
+- if (ts == MP_NOPTS_VALUE || ds->last_br_ts == MP_NOPTS_VALUE || d < 0) {
++ if (ds->last_br_ts == MP_NOPTS_VALUE || d < 0) {
+ ds->bitrate = -1;
+ ds->last_br_ts = ts;
+ ds->last_br_bytes = 0;
diff --git a/media-video/mpv/files/mpv-0.16.0-fix-coverart-decoding.patch b/media-video/mpv/files/mpv-0.16.0-fix-coverart-decoding.patch
new file mode 100644
index 0000000..1166b36
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.16.0-fix-coverart-decoding.patch
@@ -0,0 +1,39 @@
+commit c53c6bbd387ca582091a8bfca33140d65c200be0
+Author: wm4 <wm4@nowhere>
+Date: Mon Mar 7 15:00:08 2016 +0100
+
+ video: fix coverart decoding
+
+ Deselecting cover art and then reselecting it did not work. The second
+ time the cover art picture is not displayed again. (This seems to break
+ every other month...)
+
+ The reason is commit 6640b22a. It mutates the input packet. And it is
+ correct that we don't own d_video->header->attached_picture at this
+ point. Fix it by creating a new packet reference.
+
+diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
+index e8a5774..fc0b090 100644
+--- a/video/decode/dec_video.c
++++ b/video/decode/dec_video.c
+@@ -363,9 +363,10 @@ void video_work(struct dec_video *d_video)
+ return;
+
+ if (d_video->header->attached_picture) {
++ struct demux_packet *packet =
++ demux_copy_packet(d_video->header->attached_picture);
+ if (d_video->current_state == DATA_AGAIN && !d_video->cover_art_mpi) {
+- d_video->cover_art_mpi =
+- decode_packet(d_video, d_video->header->attached_picture, 0);
++ d_video->cover_art_mpi = decode_packet(d_video, packet, 0);
+ // Might need flush.
+ if (!d_video->cover_art_mpi)
+ d_video->cover_art_mpi = decode_packet(d_video, NULL, 0);
+@@ -375,6 +376,7 @@ void video_work(struct dec_video *d_video)
+ d_video->current_mpi = mp_image_new_ref(d_video->cover_art_mpi);
+ // (DATA_OK is returned the first time, when current_mpi is sill set)
+ d_video->current_state = DATA_EOF;
++ talloc_free(packet);
+ return;
+ }
+
diff --git a/media-video/mpv/files/mpv-0.16.0-set-correct-seekable-flags.patch b/media-video/mpv/files/mpv-0.16.0-set-correct-seekable-flags.patch
new file mode 100644
index 0000000..75ac650
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.16.0-set-correct-seekable-flags.patch
@@ -0,0 +1,36 @@
+commit a6f8a6977ec59d314b617780c60e374b585ebaca
+Author: wm4 <wm4@nowhere>
+Date: Thu Mar 3 15:30:55 2016 +0100
+
+ demux_timeline: set correct seekable flags
+
+ Tricky misleading crap.
+
+ Fixes #2898.
+
+diff --git a/demux/demux.h b/demux/demux.h
+index e882e90..2c1e3a2 100644
+--- a/demux/demux.h
++++ b/demux/demux.h
+@@ -174,7 +174,7 @@ typedef struct demuxer {
+ int64_t filepos; // input stream current pos.
+ char *filename; // same as stream->url
+ bool seekable;
+- bool partially_seekable; // implies seekable=true
++ bool partially_seekable; // true if _maybe_ seekable; implies seekable=true
+ double start_time;
+ // File format allows PTS resets (even if the current file is without)
+ bool ts_resets_possible;
+diff --git a/demux/demux_timeline.c b/demux/demux_timeline.c
+index 0c6c398..92cf1e6 100644
+--- a/demux/demux_timeline.c
++++ b/demux/demux_timeline.c
+@@ -344,7 +344,7 @@ static int d_open(struct demuxer *demuxer, enum demux_check check)
+ print_timeline(demuxer);
+
+ demuxer->seekable = true;
+- demuxer->partially_seekable = true;
++ demuxer->partially_seekable = false;
+
+ demuxer->filetype = meta->filetype ? meta->filetype : meta->desc->name;
+
diff --git a/media-video/mpv/mpv-0.16.0-r1.ebuild b/media-video/mpv/mpv-0.16.0-r1.ebuild
new file mode 100644
index 0000000..ca8e4a1
--- /dev/null
+++ b/media-video/mpv/mpv-0.16.0-r1.ebuild
@@ -0,0 +1,281 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+PYTHON_REQ_USE='threads(+)'
+
+WAF_PV='1.8.12'
+
+inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-utils
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="https://mpv.io/"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
+ DOCS=( RELEASE_NOTES )
+else
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+fi
+SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+DOCS+=( README.md )
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="+alsa archive bluray cdda +cli doc drm dvb +dvd +egl +enca encode gbm
+ +iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua luajit
+ openal +opengl oss pulseaudio raspberry-pi rubberband samba -sdl selinux
+ test uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver
+ +xv zsh-completion"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ egl? ( || ( gbm X wayland ) )
+ enca? ( iconv )
+ gbm? ( drm egl )
+ lcms? ( || ( opengl egl ) )
+ libguess? ( iconv )
+ luajit? ( lua )
+ uchardet? ( iconv )
+ v4l? ( || ( alsa oss ) )
+ vaapi? ( || ( gbm X wayland ) )
+ vdpau? ( X )
+ wayland? ( egl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ zsh-completion? ( cli )
+"
+
+COMMON_DEPEND="
+ !libav? ( >=media-video/ffmpeg-2.4:0=[encode?,threads,vaapi?,vdpau?] )
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ archive? ( >=app-arch/libarchive-3.0.0:= )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ cdda? ( dev-libs/libcdio-paranoia )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdnav-4.2.0
+ >=media-libs/libdvdread-4.1.0
+ )
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
+ iconv? (
+ virtual/libiconv
+ enca? ( app-i18n/enca )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ uchardet? ( dev-libs/uchardet )
+ )
+ jack? ( virtual/jack )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ libass? (
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ lua? (
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ opengl? ( virtual/opengl )
+ pulseaudio? ( media-sound/pulseaudio )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? ( x11-libs/libXdamage )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ virtual/pkgconfig
+ doc? ( dev-python/rst2pdf )
+ test? ( >=dev-util/cmocka-1.0.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-fix-srt-subtitles-on-libav.patch"
+ "${FILESDIR}/${P}-avoid-NULL-dereference-on-wayland.patch"
+ "${FILESDIR}/${P}-set-correct-seekable-flags.patch"
+ "${FILESDIR}/${P}-fix-bitrate-calculation.patch"
+ "${FILESDIR}/${P}-fix-coverart-decoding.patch"
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
+ fi
+}
+
+src_prepare() {
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
+ chmod +x "${S}"/waf || die
+ default
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ --disable-gpl3 # Unclear license info. See Gentoo bug 571728.
+
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+
+ # See deep down below for build-date
+ --disable-libmpv-static
+ --disable-static-build
+ --disable-optimize # Do not add '-O2' to CFLAGS
+ --disable-debug-build # Do not add '-g' to CFLAGS
+
+ $(use_enable doc html-build)
+ $(use_enable doc pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable zsh-completion zsh-comp)
+ $(use_enable test)
+
+ $(use_enable iconv)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(usex luajit '--lua=luajit' '')
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdda)
+ $(use_enable enca)
+ $(use_enable libguess)
+ $(use_enable uchardet)
+ $(use_enable rubberband)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # Only available in overlays
+ --disable-vapoursynth-lazy
+ $(use_enable archive libarchive)
+
+ --enable-libavdevice
+
+ # Audio outputs
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # Only available in overlays
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ --disable-opensles
+ $(use_enable alsa)
+ --disable-coreaudio
+
+ # Video outputs
+ --disable-cocoa
+ $(use_enable drm)
+ $(use_enable gbm)
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
+ $(use_enable wayland gl-wayland)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
+ $(use_enable libcaca caca)
+ $(use_enable jpeg)
+ --disable-android
+ $(use_enable raspberry-pi rpi)
+ $(use_enable opengl desktop-gl)
+
+ # HWaccels
+ $(use_enable vaapi vaapi-hwaccel)
+ # Automagic VDPAU HW acceleration. See Gentoo bug 558870.
+
+ # TV features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l audio-input)
+ $(use_enable dvb dvbin)
+ )
+
+ if use vaapi && use X; then
+ mywafargs+=(
+ $(use_enable opengl vaapi-glx)
+ $(use_enable egl vaapi-x-egl)
+ )
+ fi
+
+ # Create reproducible non-live builds
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}usr/bin/${PN}"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+src_test() {
+ cd "${S}"/build/test || die
+ for test in *; do
+ if [[ -x ${test} ]]; then
+ ./"${test}" || die "Test suite failed"
+ fi
+ done
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-04-12 18:47 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-04-12 18:47 UTC (permalink / raw
To: gentoo-commits
commit: 2b9a83e615e5bcb728dd0421348381402678bf97
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Tue Apr 12 10:06:04 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Tue Apr 12 18:33:35 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b9a83e6
media-video/mpv: verbump to 0.17.0
Package-Manager: portage-2.2.28
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
media-video/mpv/Manifest | 1 +
...7.0-fix-seeking-without-first-index-entry.patch | 42 +++
media-video/mpv/mpv-0.17.0.ebuild | 285 +++++++++++++++++++++
3 files changed, 328 insertions(+)
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index 57e84db..2ad0738 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -1,4 +1,5 @@
DIST mpv-0.16.0.tar.gz 2877026 SHA256 fc3619de0ede16fbb023ac72589090e8e77fd9d9e03a81adc728105d50ef38ba SHA512 d328dba2cc68bd3ae2e14bfcf2b4f69f076691bb40db77036e716f783d7683fde668b652829106661dfeea46d66b4a7ad61b58610411b69bd5265adea4f20bd6 WHIRLPOOL 09af632453788c9251a595f7ea18a15876c2bab2e393d32e8cc9eebf7e2ecc459873022234a98f97840223c7cb613e05039dbc987f13839d3210f284300ce312
+DIST mpv-0.17.0.tar.gz 2882629 SHA256 602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e SHA512 fb79738a16dbc12b60199a68836aca121a800958af4eaf6c2bdf1114bde36c156bafc232e814045a16fd738d2de1e2d8392bc98507961e5a73fa692e270dc7a2 WHIRLPOOL 704133b4033a5a2be8db92a4f1e52397d5b261a99a035d38e33b91d2c478e0e9bfcb2ba0e24ee03d37fffe693b275f50f7f1e453263a5afe61e8944f51eefa61
DIST mpv-0.9.2.tar.gz 2701306 SHA256 c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751 SHA512 4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967 WHIRLPOOL 1512bacc2ce50e875770c76106a1bb2bc1d0cc5f6e2bdce91ff8c5cfc8bf13ffb48519858a5fa2a7d57880820dc12e5eb20f34ab71eca5d76ec303618da8f3fe
DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b
DIST waf-1.8.4 96179 SHA256 f02035fa5d8814f33f19b2b20d43822ddef6bb39b955ca196c2a247a1f9ffaa8 SHA512 3a132d8b1cba0af0e3df046c0204c5df706fae4e0fac41cf74b53f6cdea6210ed798671c7a3cb3fee70573aacab16d4c0cc699cc4b7aa74c8a416346c5513f4c WHIRLPOOL fe8d7f42e5118a1f9490a0c9add1355c969185376b57d0bab024068dd6e7364632d862bf9432e1209165c5313ae843479ef334f4bd6285db05dfebff9a1b640e
diff --git a/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch b/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch
new file mode 100644
index 0000000..82c6d37
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.17.0-fix-seeking-without-first-index-entry.patch
@@ -0,0 +1,42 @@
+commit f4142ab9ad1d929b60ff134754f482754b63043a
+Author: wm4 <wm4@nowhere>
+Date: Tue Apr 12 15:41:44 2016 +0200
+
+demux_mkv: fix seeking with files that miss the first index entry
+
+Now it will always be able to seek back to the start, even if the index
+is sparse or misses the first entry.
+
+This can be achieved by reusing the logic for incremental index
+generation (for files with no index), and start time probing (for making
+sure the first block is always indexed).
+---
+
+diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
+index b0a910b..210f4d6 100644
+--- a/demux/demux_mkv.c
++++ b/demux/demux_mkv.c
+@@ -773,8 +773,9 @@ static int demux_mkv_read_cues(demuxer_t *demuxer)
+ if (cues.n_cue_point <= 3) // probably too sparse and will just break seeking
+ goto done;
+
+- // Discard incremental index.
+- mkv_d->num_indexes = 0;
++ // Discard incremental index. (Keep the first entry, which must be the
++ // start of the file - helps with files that miss the first index entry.)
++ mkv_d->num_indexes = MPMIN(1, mkv_d->num_indexes);
+ mkv_d->index_has_durations = false;
+
+ for (int i = 0; i < cues.n_cue_point; i++) {
+@@ -2963,8 +2964,10 @@ static void probe_first_timestamp(struct demuxer *demuxer)
+ return;
+
+ struct block_info block;
+- if (read_next_block(demuxer, &block) > 0)
++ if (read_next_block(demuxer, &block) > 0) {
++ index_block(demuxer, &block);
+ mkv_d->tmp_block = block;
++ }
+
+ demuxer->start_time = mkv_d->cluster_tc / 1e9;
+
diff --git a/media-video/mpv/mpv-0.17.0.ebuild b/media-video/mpv/mpv-0.17.0.ebuild
new file mode 100644
index 0000000..4b22f41
--- /dev/null
+++ b/media-video/mpv/mpv-0.17.0.ebuild
@@ -0,0 +1,285 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
+PYTHON_REQ_USE='threads(+)'
+
+WAF_PV='1.8.12'
+
+inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-utils
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="https://mpv.io/"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
+ DOCS=( RELEASE_NOTES )
+else
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+fi
+SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+DOCS+=( README.md )
+
+# See Copyright in source tarball and bug #506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="aqua +alsa archive bluray cdda +cli coreaudio doc drm dvb +dvd +egl +enca
+ encode gbm +iconv jack jpeg lcms +libass libav libcaca libguess libmpv lua
+ luajit openal +opengl oss pulseaudio raspberry-pi rubberband samba -sdl
+ selinux test uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama
+ +xscreensaver +xv zsh-completion"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ aqua? ( opengl )
+ egl? ( || ( gbm X wayland ) )
+ enca? ( iconv )
+ gbm? ( drm egl )
+ lcms? ( || ( opengl egl ) )
+ libguess? ( iconv )
+ luajit? ( lua )
+ uchardet? ( iconv )
+ v4l? ( || ( alsa oss ) )
+ vaapi? ( || ( gbm X wayland ) )
+ vdpau? ( X )
+ wayland? ( egl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ zsh-completion? ( cli )
+"
+
+COMMON_DEPEND="
+ !libav? ( >=media-video/ffmpeg-2.4:0=[encode?,threads,vaapi?,vdpau?] )
+ libav? ( >=media-video/libav-11:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ archive? ( >=app-arch/libarchive-3.0.0:= )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ cdda? ( dev-libs/libcdio-paranoia )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdnav-4.2.0
+ >=media-libs/libdvdread-4.1.0
+ )
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
+ iconv? (
+ virtual/libiconv
+ enca? ( app-i18n/enca )
+ libguess? ( >=app-i18n/libguess-1.0 )
+ uchardet? ( dev-libs/uchardet )
+ )
+ jack? ( virtual/jack )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ libass? (
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ lua? (
+ !luajit? ( || ( =dev-lang/lua-5.1*:= =dev-lang/lua-5.2*:= ) )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ opengl? ( !aqua? ( virtual/opengl ) )
+ pulseaudio? ( media-sound/pulseaudio )
+ raspberry-pi? (
+ >=media-libs/raspberrypi-userland-0_pre20160305-r1
+ media-libs/mesa[egl,gles2]
+ )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba )
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? ( x11-libs/libXdamage )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ >=dev-lang/perl-5.8
+ dev-python/docutils
+ virtual/pkgconfig
+ doc? ( dev-python/rst2pdf )
+ test? ( >=dev-util/cmocka-1.0.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-seeking-without-first-index-entry.patch" )
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
+ fi
+}
+
+src_prepare() {
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
+ chmod +x "${S}"/waf || die
+ default
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}"/etc/${PN}
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ --disable-gpl3 # Unclear license info. See Gentoo bug 571728.
+
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+
+ # See deep down below for build-date
+ --disable-libmpv-static
+ --disable-static-build
+ --disable-optimize # Do not add '-O2' to CFLAGS
+ --disable-debug-build # Do not add '-g' to CFLAGS
+
+ $(use_enable doc html-build)
+ $(use_enable doc pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable zsh-completion zsh-comp)
+ $(use_enable test)
+
+ $(use_enable iconv)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(usex luajit '--lua=luajit' '')
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdda)
+ $(use_enable enca)
+ $(use_enable libguess)
+ $(use_enable uchardet)
+ $(use_enable rubberband)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # Only available in overlays
+ --disable-vapoursynth-lazy
+ $(use_enable archive libarchive)
+
+ --enable-libavdevice
+
+ # Audio outputs
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # Only available in overlays
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ --disable-opensles
+ $(use_enable alsa)
+ $(use_enable coreaudio)
+
+ # Video outputs
+ $(use_enable aqua cocoa)
+ $(use_enable drm)
+ $(use_enable gbm)
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
+ $(use_enable wayland gl-wayland)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
+ $(use_enable libcaca caca)
+ $(use_enable jpeg)
+ --disable-android
+ $(use_enable raspberry-pi rpi)
+ $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
+
+ # HWaccels
+ # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
+ $(use_enable vaapi vaapi-hwaccel)
+ # Automagic VDPAU HW acceleration. See Gentoo bug 558870.
+
+ # TV features
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l audio-input)
+ $(use_enable dvb dvbin)
+
+ # Miscellaneous features
+ --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
+ )
+
+ if use vaapi && use X; then
+ mywafargs+=(
+ $(use_enable opengl vaapi-glx)
+ $(use_enable egl vaapi-x-egl)
+ )
+ fi
+
+ # Create reproducible non-live builds
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}usr/bin/${PN}"
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+src_test() {
+ cd "${S}"/build/test || die
+ for test in *; do
+ if [[ -x ${test} ]]; then
+ ./"${test}" || die "Test suite failed"
+ fi
+ done
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-04-25 7:45 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-04-25 7:45 UTC (permalink / raw
To: gentoo-commits
commit: 0a9e410949da33e7d72a81b49549fe0aed63666b
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sun Apr 24 23:45:25 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 07:30:47 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a9e4109
media-video/mpv: replace math.h patch with upstream equivalent in 0.17.0
It's the very same patch, but with an upstream commit reference.
Closes: https://github.com/gentoo/gentoo/pull/1341
Package-Manager: portage-2.2.28
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
.../files/mpv-0.17.0-add-missing-math-include.patch | 21 +++++++++++++++++++++
media-video/mpv/files/mpv-0.17.0-glibc-2.23.patch | 14 --------------
media-video/mpv/mpv-0.17.0.ebuild | 6 ++++--
3 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/media-video/mpv/files/mpv-0.17.0-add-missing-math-include.patch b/media-video/mpv/files/mpv-0.17.0-add-missing-math-include.patch
new file mode 100644
index 0000000..9f04fbe
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.17.0-add-missing-math-include.patch
@@ -0,0 +1,21 @@
+commit b735c0e2077cb37df6764350472cbc68a9142d91
+Author: wm4 <wm4@nowhere>
+Date: Fri Apr 15 13:58:41 2016 +0200
+
+lcms: include math.h
+
+Fixes #3053.
+---
+
+diff --git a/video/out/opengl/lcms.c b/video/out/opengl/lcms.c
+index 7db8da6..a2030d3 100644
+--- a/video/out/opengl/lcms.c
++++ b/video/out/opengl/lcms.c
+@@ -16,6 +16,7 @@
+ */
+
+ #include <string.h>
++#include <math.h>
+
+ #include "mpv_talloc.h"
+
diff --git a/media-video/mpv/files/mpv-0.17.0-glibc-2.23.patch b/media-video/mpv/files/mpv-0.17.0-glibc-2.23.patch
deleted file mode 100644
index ecd02aa..0000000
--- a/media-video/mpv/files/mpv-0.17.0-glibc-2.23.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Fixes build failure on glibc-2.23
-
-../video/out/opengl/lcms.c: In function 'get_vid_profile':
-../video/out/opengl/lcms.c:235:27: error: implicit declaration of function 'pow' [-Werror=implicit-function-declaration]
- double binv = pow(src_black[i], 1.0/gamma);
- ^
-diff --git a/video/out/opengl/lcms.c b/video/out/opengl/lcms.c
-index 7db8da6..3eb3d53 100644
---- a/video/out/opengl/lcms.c
-+++ b/video/out/opengl/lcms.c
-@@ -17,2 +17,3 @@
-
-+#include <math.h> /* pow() */
- #include <string.h>
diff --git a/media-video/mpv/mpv-0.17.0.ebuild b/media-video/mpv/mpv-0.17.0.ebuild
index 7562eb5..7c3cfbb 100644
--- a/media-video/mpv/mpv-0.17.0.ebuild
+++ b/media-video/mpv/mpv-0.17.0.ebuild
@@ -126,8 +126,10 @@ RDEPEND="${COMMON_DEPEND}
selinux? ( sec-policy/selinux-mplayer )
"
-PATCHES=( "${FILESDIR}/${P}-fix-seeking-without-first-index-entry.patch"
- "${FILESDIR}/${P}-glibc-2.23.patch")
+PATCHES=(
+ "${FILESDIR}/${P}-fix-seeking-without-first-index-entry.patch"
+ "${FILESDIR}/${P}-add-missing-math-include.patch"
+)
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-07-25 13:04 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-07-25 13:04 UTC (permalink / raw
To: gentoo-commits
commit: d4cc84d23091c58cfd1bd339cdc7aa7258a6ab3e
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sun Jul 17 21:56:37 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 13:02:18 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4cc84d2
media-video/mpv: warn re softvol, non-fatal ffmpeg version check in 9999
Package-Manager: portage-2.3.0
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
....18.1-make-ffmpeg-version-check-non-fatal.patch | 28 ++++++++++++++++++++++
media-video/mpv/mpv-9999.ebuild | 24 ++++++++++++++++++-
2 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/media-video/mpv/files/mpv-0.18.1-make-ffmpeg-version-check-non-fatal.patch b/media-video/mpv/files/mpv-0.18.1-make-ffmpeg-version-check-non-fatal.patch
new file mode 100644
index 0000000..fcdd4d5
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.18.1-make-ffmpeg-version-check-non-fatal.patch
@@ -0,0 +1,28 @@
+player: make ffmpeg/libav version check non-fatal
+
+We already enforce mpv rebuilds when ffmpeg/libav SONAME changes.
+
+diff --git a/player/main.c b/player/main.c
+index 88b60e1..1d12679 100644
+--- a/player/main.c
++++ b/player/main.c
+@@ -421,13 +421,12 @@ int mp_initialize(struct MPContext *mpctx, char **options)
+ if (!print_libav_versions(mp_null_log, 0)) {
+ // Using mismatched libraries can be legitimate, but even then it's
+ // a bad idea. We don't acknowledge its usefulness and stability.
+- print_libav_versions(mpctx->log, MSGL_FATAL);
+- MP_FATAL(mpctx, "\nmpv was compiled against a different version of "
+- "FFmpeg/Libav than the shared\nlibrary it is linked against. "
+- "This is most likely a broken build and could\nresult in "
+- "misbehavior and crashes.\n\nmpv does not support this "
+- "configuration and will not run - rebuild mpv instead.\n");
+- return -1;
++ print_libav_versions(mpctx->log, MSGL_WARN);
++ MP_WARN(mpctx, "\nmpv was compiled against a different version of "
++ "FFmpeg/Libav than the shared\nlibrary it is linked against. "
++ "This is most likely a broken build and could\nresult in "
++ "misbehavior and crashes.\n\nUpstream does not support this "
++ "configuration.\nPlease rebuild mpv in case of any problems.\n");
+ }
+
+ if (opts->dump_stats && opts->dump_stats[0]) {
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index ccb8073..fbbb674 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -9,7 +9,7 @@ PYTHON_REQ_USE='threads(+)'
WAF_PV=1.8.12
-inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs waf-utils
+inherit fdo-mime gnome2-utils pax-utils python-any-r1 toolchain-funcs versionator waf-utils
DESCRIPTION="Media player based on MPlayer and mplayer2"
HOMEPAGE="https://mpv.io/"
@@ -126,6 +126,8 @@ RDEPEND="${COMMON_DEPEND}
selinux? ( sec-policy/selinux-mplayer )
"
+PATCHES=( "${FILESDIR}/${PN}-0.18.1-make-ffmpeg-version-check-non-fatal.patch" )
+
pkg_pretend() {
if [[ ${MERGE_TYPE} != "binary" ]] && ! tc-has-tls && use vaapi && use egl; then
die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
@@ -269,6 +271,26 @@ pkg_postinst() {
fdo-mime_desktop_database_update
gnome2_icon_cache_update
+ local softvol_0_18_1=0
+ for rv in ${REPLACING_VERSIONS}; do
+ version_compare ${rv} 0.18.1
+ [[ $? -eq 1 ]] && softvol_0_18_1=1
+ done
+
+ if [[ ${softvol_0_18_1} -eq 1 ]]; then
+ echo
+ elog "Starting from version 0.18.1 the software volume control is"
+ elog "enabled by default, see:"
+ elog "https://github.com/mpv-player/mpv/blob/v0.18.1/DOCS/interface-changes.rst"
+ elog "https://github.com/mpv-player/mpv/issues/3322"
+ elog
+ elog "This means that volume controls don't change the system volume,"
+ elog "e.g. per-application volume with PulseAudio."
+ elog "If you want to restore the old behaviour, please refer to"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=588492#c4"
+ echo
+ fi
+
# bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
! has_version 'app-shells/mpv-bash-completion'; then
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2016-12-28 0:18 Patrice Clement
0 siblings, 0 replies; 17+ messages in thread
From: Patrice Clement @ 2016-12-28 0:18 UTC (permalink / raw
To: gentoo-commits
commit: af245b43dbcb450b4a3c5dc99eb0c7c52312e54d
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Sun Dec 25 23:23:16 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 00:10:08 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af245b43
media-video/mpv: verbump to 0.23.0.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/3247
media-video/mpv/Manifest | 1 +
....23.0-make-libavdevice-check-accept-libav.patch | 20 ++
media-video/mpv/mpv-0.23.0.ebuild | 345 +++++++++++++++++++++
3 files changed, 366 insertions(+)
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index 24739ac..16564e8 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -1,5 +1,6 @@
DIST mpv-0.18.0.tar.gz 2758960 SHA256 b656638d4f6bce2621baaacb60d8be384aa492fcd86dfd43996aaa2c16fee02b SHA512 5a899ea680b4da6d668a6e77a254e623bafef16f376ee46639e40f151da5a000de84b382f2b07f3a1e87b60fc8e524132767fdf243e36474966af11a88277437 WHIRLPOOL c491e61cb2d7f453cfc23605120048e81c2b7621b8d9591cad6415d3b550f55db6a6c8c6f90d27c7ce214ff89f92a9861d202b457c2de25c5b7de11d8d1d40af
DIST mpv-0.22.0.tar.gz 2822645 SHA256 c0f9ac8f0e37a391d19007b333ef8787c2f45d75a0d4401c0098cde52c5082f6 SHA512 6c021bfb79cbedee842bf122ebb29df56e8b1cbfcb038bd54bf6e2f2db2a6550b71fd9fe8998dbd79b4ceeab3fbcab65ec60695f255c5cb36fb1feae17b797c0 WHIRLPOOL 3458dfe646bab65408a7fe45f98ae168f439b4939064b009ba87d0ae08c1f2067bd252558a92f9fdb0822bf5a35b2377bce7f46aeb190d60a4e115394f0506c9
+DIST mpv-0.23.0.tar.gz 2812103 SHA256 8aeefe5970587dfc454d2b89726b603f156bd7a9ae427654eef0d60c68d94998 SHA512 16304a729684ba177cb902e2508bdba09b344228c44ac78b27302ee4e0bcfb344b3522969e834516547bf82825009afd3bef1701327fdcaa42a9696065cca591 WHIRLPOOL fa214186ae80f4b26d967b8d6c68f0c4c56a77caaf06088249d30551e2cd5efbfc4f0a06e1944ef24ac679f1a3d47faa0d6152d192f032b3d279d5ada6567c8e
DIST mpv-0.9.2.tar.gz 2701306 SHA256 c0148f55dbd17705f49bb496d0ce374419de62e1b17195d91409d7727cbd4751 SHA512 4f652a8e78d65b0ef44a06287b05250dfdfbce4cf5a6e21d3b446eedec268d83cf98afcc687272e2da2cfac9e9f69a303847dffdfd45cecdd4273b943ce50967 WHIRLPOOL 1512bacc2ce50e875770c76106a1bb2bc1d0cc5f6e2bdce91ff8c5cfc8bf13ffb48519858a5fa2a7d57880820dc12e5eb20f34ab71eca5d76ec303618da8f3fe
DIST waf-1.8.12 97567 SHA256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b SHA512 8e47112abb134f965f15a27a600b4453cad3075afb5dadc17f2f6dac33d80ec68b679ac0ebc5f8a0245cbd07ae9fc7b899e69afc1bd021cce74e7af2ab457939 WHIRLPOOL c36d37c2d8c08e4048b4800f511611af5cf534304fcb58388ca491ff308bfcbcdd959d153edfd6ff8c118404e7293d8b786e43b07486139bf915a82aa75d792b
DIST waf-1.8.4 96179 SHA256 f02035fa5d8814f33f19b2b20d43822ddef6bb39b955ca196c2a247a1f9ffaa8 SHA512 3a132d8b1cba0af0e3df046c0204c5df706fae4e0fac41cf74b53f6cdea6210ed798671c7a3cb3fee70573aacab16d4c0cc699cc4b7aa74c8a416346c5513f4c WHIRLPOOL fe8d7f42e5118a1f9490a0c9add1355c969185376b57d0bab024068dd6e7364632d862bf9432e1209165c5313ae843479ef334f4bd6285db05dfebff9a1b640e
diff --git a/media-video/mpv/files/mpv-0.23.0-make-libavdevice-check-accept-libav.patch b/media-video/mpv/files/mpv-0.23.0-make-libavdevice-check-accept-libav.patch
new file mode 100644
index 00000000..de70a4f
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.23.0-make-libavdevice-check-accept-libav.patch
@@ -0,0 +1,20 @@
+build: make libavdevice configure check accept libav-12
+
+libav-12 is supported, but configure script expects
+a higher libavdevice version than libav-12 provides.
+
+Gentoo-Bug: 603122
+
+diff --git a/wscript b/wscript
+index 94db7e296..7f61f54cc 100644
+--- a/wscript
++++ b/wscript
+@@ -444,7 +444,7 @@ FFmpeg/Libav libraries. You need at least {0}. Aborting.".format(libav_versions_
+ }, {
+ 'name': '--libavdevice',
+ 'desc': 'libavdevice',
+- 'func': check_pkg_config('libavdevice', '>= 57.0.0'),
++ 'func': check_pkg_config('libavdevice', '>= 56.1.0'),
+ }, {
+ 'name': 'avcodec-chroma-pos-api',
+ 'desc': 'libavcodec avcodec_enum_to_chroma_pos API',
diff --git a/media-video/mpv/mpv-0.23.0.ebuild b/media-video/mpv/mpv-0.23.0.ebuild
new file mode 100644
index 00000000..0069f84
--- /dev/null
+++ b/media-video/mpv/mpv-0.23.0.ebuild
@@ -0,0 +1,345 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE='threads(+)'
+
+WAF_PV=1.8.12
+
+inherit gnome2-utils pax-utils python-r1 toolchain-funcs versionator waf-utils xdg-utils
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="https://mpv.io/"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+ DOCS=( RELEASE_NOTES )
+else
+ EGIT_REPO_URI=( {https,git}://github.com/mpv-player/mpv.git )
+ inherit git-r3
+fi
+SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+DOCS+=( README.md )
+
+# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="aqua +alsa archive bluray cdda +cli coreaudio doc drm dvb dvd +egl encode
+ gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua luajit openal
+ +opengl oss pulseaudio raspberry-pi rubberband samba -sdl selinux test
+ tools +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama +xscreensaver
+ +xv zsh-completion"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ aqua? ( opengl )
+ egl? ( || ( gbm X wayland ) )
+ gbm? ( drm egl )
+ lcms? ( || ( opengl egl ) )
+ luajit? ( lua )
+ tools? ( cli )
+ uchardet? ( iconv )
+ v4l? ( || ( alsa oss ) )
+ vaapi? ( || ( gbm X wayland ) )
+ vdpau? ( X )
+ wayland? ( egl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ zsh-completion? ( cli )
+"
+
+COMMON_DEPEND="
+ !libav? ( >=media-video/ffmpeg-3.2.2:=[encode?,threads,vaapi?,vdpau?] )
+ libav? ( >=media-video/libav-12:=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ archive? ( >=app-arch/libarchive-3.0.0:= )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ cdda? ( dev-libs/libcdio-paranoia )
+ drm? ( x11-libs/libdrm )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ dvd? (
+ >=media-libs/libdvdnav-4.2.0
+ >=media-libs/libdvdread-4.1.0
+ )
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
+ iconv? (
+ virtual/libiconv
+ uchardet? ( dev-libs/uchardet )
+ )
+ jack? ( virtual/jack )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ libass? (
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ lua? (
+ !luajit? ( <dev-lang/lua-5.3:= )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ opengl? ( !aqua? ( virtual/opengl ) )
+ pulseaudio? ( media-sound/pulseaudio )
+ raspberry-pi? (
+ >=media-libs/raspberrypi-userland-0_pre20160305-r1
+ media-libs/mesa[egl,gles2]
+ )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba[smbclient(+)] )
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? ( x11-libs/libXdamage )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/docutils
+ virtual/pkgconfig
+ doc? ( dev-python/rst2pdf )
+ test? ( >=dev-util/cmocka-1.0.0 )
+ zsh-completion? ( dev-lang/perl )
+"
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+ tools? ( ${PYTHON_DEPS} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
+ "${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+)
+
+mpv_check_compiler() {
+ if [[ ${MERGE_TYPE} != "binary" ]] && use vaapi && use egl && ! tc-has-tls; then
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8.0 or Clang>=3.3."
+ fi
+}
+
+pkg_pretend() {
+ mpv_check_compiler
+}
+
+pkg_setup() {
+ mpv_check_compiler
+ [[ ${MERGE_TYPE} != "binary" ]] && python_setup
+}
+
+src_prepare() {
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
+ chmod +x "${S}"/waf || die
+ default_src_prepare
+}
+
+src_configure() {
+ local mywafargs=(
+ --confdir="${EPREFIX}/etc/${PN}"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+
+ # See deep down below for build-date.
+ --disable-libmpv-static
+ --disable-static-build
+ --disable-optimize # Don't add '-O2' to CFLAGS.
+ --disable-debug-build # Don't add '-g' to CFLAGS.
+ --enable-html-build
+
+ $(use_enable doc pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable zsh-completion zsh-comp)
+ $(use_enable test)
+
+ $(use_enable iconv)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(usex luajit '--lua=luajit' '')
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdda)
+ $(use_enable uchardet)
+ $(use_enable rubberband)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # Only available in overlays.
+ --disable-vapoursynth-lazy
+ $(use_enable archive libarchive)
+
+ --enable-libavdevice
+
+ # Audio outputs:
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video.
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # Only available in overlays.
+ --disable-sndio # Only available in overlays.
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ --disable-opensles
+ $(use_enable alsa)
+ $(use_enable coreaudio)
+
+ # Video outputs:
+ $(use_enable aqua cocoa)
+ $(use_enable drm)
+ $(use_enable gbm)
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
+ $(use_enable wayland gl-wayland)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
+ $(use_enable libcaca caca)
+ $(use_enable jpeg)
+ --disable-android
+ $(use_enable raspberry-pi rpi)
+ --disable-ios-gl
+ $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
+ --disable-mali-fbdev # Only available in overlays.
+
+ # HWaccels:
+ # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
+ $(use_enable vaapi vaapi-hwaccel)
+ $(use_enable vdpau vdpau-hwaccel)
+ --disable-cuda-hwaccel # No support in ffmpeg. See Gentoo bug 595450.
+
+ # TV features:
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l audio-input)
+ $(use_enable dvb dvbin)
+
+ # Miscellaneous features:
+ --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
+ )
+
+ if use vaapi && use X; then
+ mywafargs+=(
+ $(use_enable opengl vaapi-glx)
+ $(use_enable egl vaapi-x-egl)
+ )
+ fi
+
+ if ! use egl && ! use opengl && ! use raspberry-pi; then
+ mywafargs+=(--disable-gl)
+ fi
+
+ # Create reproducible non-live builds.
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use lua; then
+ insinto /usr/share/${PN}
+ doins -r TOOLS/lua
+ fi
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}"usr/bin/${PN}
+ fi
+
+ if use tools; then
+ dobin TOOLS/{mpv_identify.sh,umpv}
+ newbin TOOLS/idet.sh mpv_idet.sh
+ python_replicate_script "${ED}"usr/bin/umpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ local rv softvol_0_18_1=0
+ for rv in ${REPLACING_VERSIONS}; do
+ version_compare ${rv} 0.18.1-r1
+ [[ $? -eq 1 ]] && softvol_0_18_1=1
+ done
+
+ if [[ ${softvol_0_18_1} -eq 1 ]]; then
+ elog "Starting from version 0.18.1 the software volume control is"
+ elog "enabled by default, see:"
+ elog "https://github.com/mpv-player/mpv/blob/v0.18.1/DOCS/interface-changes.rst"
+ elog "https://github.com/mpv-player/mpv/issues/3322"
+ elog
+ elog "This means that volume controls don't change the system volume,"
+ elog "e.g. per-application volume with PulseAudio."
+ elog "If you want to restore the old behaviour, please refer to"
+ elog
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=588492#c7"
+ elog
+ fi
+
+ # bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
+ if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
+ ! has_version 'app-shells/mpv-bash-completion'; then
+ elog "If you want to have command-line completion via bash-completion,"
+ elog "please install app-shells/mpv-bash-completion."
+ fi
+
+ if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
+ has_version 'app-shells/mpv-bash-completion'; then
+ elog "If command-line completion doesn't work after mpv update,"
+ elog "please rebuild app-shells/mpv-bash-completion."
+ fi
+
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+src_test() {
+ cd "${S}"/build/test || die
+ local test
+ for test in *; do
+ if [[ -x ${test} ]]; then
+ ./"${test}" || die "Test suite failed"
+ fi
+ done
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2017-02-04 21:25 David Seifert
0 siblings, 0 replies; 17+ messages in thread
From: David Seifert @ 2017-02-04 21:25 UTC (permalink / raw
To: gentoo-commits
commit: 7ebdf748b6c4e9869c6c984093153e14614ba19d
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Thu Feb 2 15:05:49 2017 +0000
Commit: David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb 4 21:24:52 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ebdf748
media-video/mpv: revbump to 0.23.0-r1 to sync with 9999
Among other things this brings cuda support to non-live ebuilds.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
...-pkgconfig-for-raspberrypi-compiler-flags.patch | 97 ++++++
media-video/mpv/mpv-0.23.0-r1.ebuild | 378 +++++++++++++++++++++
2 files changed, 475 insertions(+)
diff --git a/media-video/mpv/files/mpv-rely-on-pkgconfig-for-raspberrypi-compiler-flags.patch b/media-video/mpv/files/mpv-rely-on-pkgconfig-for-raspberrypi-compiler-flags.patch
new file mode 100644
index 00000000..1545743
--- /dev/null
+++ b/media-video/mpv/files/mpv-rely-on-pkgconfig-for-raspberrypi-compiler-flags.patch
@@ -0,0 +1,97 @@
+commit ea40fa36eef15384b4c0218fb102f92f5cd1cdff
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date: Fri Jan 27 21:20:29 2017 +0300
+
+build: rpi: rely on pkgconfig for compiler flags
+
+Upstream provides pkgconfig files for quite some time now [1,2].
+Use them to determine the required flags instead of hard coding.
+
+This makes cross-compilation easy, which I dare to say is important for
+many raspberry-pi users. This also prevents picking libEGL and libGLESv2
+from mesa when they are present, which can happen with the current code.
+
+Good distros should put these pkgconfig files into default pkg-config
+search path or populate PKG_CONFIG_PATH for users. However, be nice to
+everybody and manually look into '/opt/vc/lib/pkgconfig' just in case.
+Hence the PKG_CONFIG_PATH mangling.
+
+[1]: https://github.com/raspberrypi/userland/issues/245
+[2]: https://github.com/raspberrypi/userland/commit/05d60a01d53dca363bb4286594db1826ffff8762
+
+diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
+index 50a16ce26..bf8e5a0b0 100644
+--- a/waftools/checks/custom.py
++++ b/waftools/checks/custom.py
+@@ -4,7 +4,7 @@ from waflib import Utils
+ import os
+
+ __all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front",
+- "check_cocoa", "check_openal"]
++ "check_cocoa", "check_openal", "check_rpi"]
+
+ pthreads_program = load_fragment('pthreads.c')
+
+@@ -127,3 +127,29 @@ def check_openal(ctx, dependency_identifier):
+ if fn(ctx, dependency_identifier):
+ return True
+ return False
++
++def check_rpi(ctx, dependency_identifier):
++ # We need MMAL/bcm_host/dispmanx APIs.
++ # Upstream keeps pkgconfig files in '/opt/vc/lib/pkgconfig'.
++ # See https://github.com/raspberrypi/userland/issues/245
++ # PKG_CONFIG_SYSROOT_DIR helps with cross compilation.
++ prev_pkg_path = os.getenv('PKG_CONFIG_PATH', '')
++ os.environ['PKG_CONFIG_PATH'] = os.pathsep.join(
++ filter(None, [os.path.join(os.getenv('PKG_CONFIG_SYSROOT_DIR', '/'),
++ 'opt/vc/lib/pkgconfig'),
++ prev_pkg_path]))
++
++ checks = [
++ check_pkg_config('bcm_host', uselib_store='bcm_host'),
++ check_pkg_config('egl'),
++ check_pkg_config('glesv2'),
++ check_cc(lib=['mmal_core', 'mmal_util', 'mmal_vc_client'], use=['bcm_host']),
++ # We still need all OpenGL symbols, because the vo_opengl code is
++ # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core.
++ check_statement('GL/gl.h', '(void)GL_RGB32F'), # arbitrary OpenGL 3.0 symbol
++ check_statement('GL/gl.h', '(void)GL_LUMINANCE16') # arbitrary OpenGL legacy-only symbol
++ ]
++
++ ret = all((fn(ctx, dependency_identifier) for fn in checks))
++ os.environ['PKG_CONFIG_PATH'] = prev_pkg_path
++ return ret
+diff --git a/wscript b/wscript
+index 81a048df5..ab853e7ad 100644
+--- a/wscript
++++ b/wscript
+@@ -738,27 +738,9 @@ video_output_features = [
+ 'desc': 'Android support',
+ 'func': check_statement('android/api-level.h', '(void)__ANDROID__'), # arbitrary android-specific header
+ }, {
+- # We need MMAL/bcm_host/dispmanx APIs. Also, most RPI distros require
+- # every project to hardcode the paths to the include directories. Also,
+- # these headers are so broken that they spam tons of warnings by merely
+- # including them (compensate with -isystem and -fgnu89-inline).
+ 'name': '--rpi',
+ 'desc': 'Raspberry Pi support',
+- 'func': compose_checks(
+- check_cc(cflags="-isystem/opt/vc/include/ "+
+- "-isystem/opt/vc/include/interface/vcos/pthreads " +
+- "-isystem/opt/vc/include/interface/vmcs_host/linux " +
+- "-fgnu89-inline",
+- linkflags="-L/opt/vc/lib",
+- header_name="bcm_host.h",
+- lib=['mmal_core', 'mmal_util', 'mmal_vc_client', 'bcm_host']),
+- # We still need all OpenGL symbols, because the vo_opengl code is
+- # generic and supports anything from GLES2/OpenGL 2.1 to OpenGL 4 core.
+- check_cc(lib="EGL"),
+- check_cc(lib="GLESv2"),
+- check_statement('GL/gl.h', '(void)GL_RGB32F'), # arbitrary OpenGL 3.0 symbol
+- check_statement('GL/gl.h', '(void)GL_LUMINANCE16') # arbitrary OpenGL legacy-only symbol
+- ),
++ 'func': check_rpi,
+ }, {
+ 'name': '--standard-gl',
+ 'desc': 'Desktop standard OpenGL support',
diff --git a/media-video/mpv/mpv-0.23.0-r1.ebuild b/media-video/mpv/mpv-0.23.0-r1.ebuild
new file mode 100644
index 00000000..e24ca42
--- /dev/null
+++ b/media-video/mpv/mpv-0.23.0-r1.ebuild
@@ -0,0 +1,378 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+PYTHON_REQ_USE='threads(+)'
+
+WAF_PV=1.8.12
+
+inherit gnome2-utils pax-utils python-r1 toolchain-funcs versionator waf-utils xdg-utils
+
+DESCRIPTION="Media player based on MPlayer and mplayer2"
+HOMEPAGE="https://mpv.io/"
+
+if [[ ${PV} != *9999* ]]; then
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86 ~amd64-linux"
+ DOCS=( RELEASE_NOTES )
+else
+ EGIT_REPO_URI=( {https,git}://github.com/mpv-player/mpv.git )
+ inherit git-r3
+fi
+SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+DOCS+=( README.md )
+
+# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
+LICENSE="GPL-2+ BSD ISC"
+SLOT="0"
+IUSE="+alsa aqua archive bluray cdda +cli coreaudio cuda doc drm dvb dvd +egl
+ encode gbm +iconv jack jpeg lcms +libass libav libcaca libmpv +lua luajit
+ openal +opengl oss pulseaudio raspberry-pi rubberband samba sdl selinux
+ test tools +uchardet v4l vaapi vdpau vf-dlopen wayland +X xinerama
+ +xscreensaver +xv zsh-completion"
+IUSE+=" cpu_flags_x86_sse4_1"
+
+REQUIRED_USE="
+ || ( cli libmpv )
+ aqua? ( opengl )
+ cuda? ( !libav || ( opengl egl ) )
+ egl? ( || ( gbm X wayland ) )
+ gbm? ( drm egl )
+ lcms? ( || ( opengl egl ) )
+ luajit? ( lua )
+ opengl? ( || ( aqua X !cli? ( libmpv ) ) )
+ test? ( || ( opengl egl ) )
+ tools? ( cli )
+ uchardet? ( iconv )
+ v4l? ( || ( alsa oss ) )
+ vaapi? ( || ( gbm X wayland ) )
+ vdpau? ( X )
+ wayland? ( egl )
+ xinerama? ( X )
+ xscreensaver? ( X )
+ xv? ( X )
+ zsh-completion? ( cli )
+"
+
+COMMON_DEPEND="
+ !libav? ( >=media-video/ffmpeg-3.2.2:0=[encode?,threads,vaapi?,vdpau?] )
+ libav? ( >=media-video/libav-12:0=[encode?,threads,vaapi?,vdpau?] )
+ sys-libs/zlib
+ alsa? ( >=media-libs/alsa-lib-1.0.18 )
+ archive? ( >=app-arch/libarchive-3.0.0:= )
+ bluray? ( >=media-libs/libbluray-0.3.0 )
+ cdda? ( dev-libs/libcdio-paranoia )
+ cuda? ( >=media-video/ffmpeg-3.3:0 )
+ drm? ( x11-libs/libdrm )
+ dvd? (
+ >=media-libs/libdvdnav-4.2.0
+ >=media-libs/libdvdread-4.1.0
+ )
+ egl? ( media-libs/mesa[egl,gbm(-)?,wayland(-)?] )
+ iconv? (
+ virtual/libiconv
+ uchardet? ( dev-libs/uchardet )
+ )
+ jack? ( virtual/jack )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ libass? (
+ >=media-libs/libass-0.12.1:=[fontconfig,harfbuzz]
+ virtual/ttf-fonts
+ )
+ libcaca? ( >=media-libs/libcaca-0.99_beta18 )
+ lua? (
+ !luajit? ( <dev-lang/lua-5.3:= )
+ luajit? ( dev-lang/luajit:2 )
+ )
+ openal? ( >=media-libs/openal-1.13 )
+ opengl? ( X? ( virtual/opengl ) )
+ pulseaudio? ( media-sound/pulseaudio )
+ raspberry-pi? (
+ >=media-libs/raspberrypi-userland-0_pre20160305-r1
+ virtual/opengl
+ )
+ rubberband? ( >=media-libs/rubberband-1.8.0 )
+ samba? ( net-fs/samba[smbclient(+)] )
+ sdl? ( media-libs/libsdl2[sound,threads,video,X?,wayland?] )
+ v4l? ( media-libs/libv4l )
+ vaapi? ( >=x11-libs/libva-1.4.0[drm?,X?,wayland?] )
+ vdpau? ( >=x11-libs/libvdpau-0.2 )
+ wayland? (
+ >=dev-libs/wayland-1.6.0
+ >=x11-libs/libxkbcommon-0.3.0
+ )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ >=x11-libs/libXrandr-1.2.0
+ opengl? ( x11-libs/libXdamage )
+ xinerama? ( x11-libs/libXinerama )
+ xscreensaver? ( x11-libs/libXScrnSaver )
+ xv? ( x11-libs/libXv )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ ${PYTHON_DEPS}
+ dev-python/docutils
+ virtual/pkgconfig
+ doc? ( dev-python/rst2pdf )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ test? ( >=dev-util/cmocka-1.0.0 )
+ v4l? ( virtual/os-headers )
+ zsh-completion? ( dev-lang/perl )
+"
+RDEPEND="${COMMON_DEPEND}
+ cuda? ( x11-drivers/nvidia-drivers[X] )
+ selinux? ( sec-policy/selinux-mplayer )
+ tools? ( ${PYTHON_DEPS} )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
+ "${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+ "${FILESDIR}/${PN}-rely-on-pkgconfig-for-raspberrypi-compiler-flags.patch"
+)
+
+mpv_check_compiler() {
+ if [[ ${MERGE_TYPE} != "binary" ]]; then
+ if tc-is-gcc && ( [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -lt 5 ]] ) ); then
+ die "${PN} requires GCC>=4.5."
+ fi
+ if ( use opengl || use egl ) && ! tc-has-tls; then
+ die "Your compiler lacks C++11 TLS support. Use GCC>=4.8 or Clang>=3.3."
+ fi
+ if use vaapi && use cpu_flags_x86_sse4_1 && ! tc-is-gcc; then
+ die "${PN} requires GCC for SSE4.1 intrinsics."
+ fi
+ fi
+}
+
+pkg_pretend() {
+ mpv_check_compiler
+}
+
+pkg_setup() {
+ mpv_check_compiler
+ [[ ${MERGE_TYPE} != "binary" ]] && python_setup
+}
+
+src_prepare() {
+ cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
+ chmod +x "${S}"/waf || die
+ default_src_prepare
+}
+
+src_configure() {
+ tc-export CC PKG_CONFIG AR
+
+ if tc-is-cross-compiler && use raspberry-pi; then
+ export EXTRA_PKG_CONFIG_LIBDIR="${SYSROOT%/}${EPREFIX}/opt/vc/lib/pkgconfig"
+ # Drop next line when Gentoo bug 607344 is fixed or if you fixed it locally.
+ die "${PN} can't be cross built with raspberry-pi USE enabled. See Gentoo bug 607344."
+ fi
+
+ local mywafargs=(
+ --confdir="${EPREFIX}/etc/${PN}"
+ --docdir="${EPREFIX}/usr/share/doc/${PF}"
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+
+ $(usex cli '' '--disable-cplayer')
+ $(use_enable libmpv libmpv-shared)
+
+ # See deep down below for build-date.
+ --disable-libmpv-static
+ --disable-static-build
+ --disable-optimize # Don't add '-O2' to CFLAGS.
+ --disable-debug-build # Don't add '-g' to CFLAGS.
+ --enable-html-build
+
+ $(use_enable doc pdf-build)
+ $(use_enable vf-dlopen vf-dlopen-filters)
+ $(use_enable zsh-completion zsh-comp)
+ $(use_enable test)
+
+ $(use_enable iconv)
+ $(use_enable samba libsmbclient)
+ $(use_enable lua)
+ $(usex luajit '--lua=luajit' '')
+ $(use_enable libass)
+ $(use_enable libass libass-osd)
+ $(use_enable encode encoding)
+ $(use_enable bluray libbluray)
+ $(use_enable dvd dvdread)
+ $(use_enable dvd dvdnav)
+ $(use_enable cdda)
+ $(use_enable uchardet)
+ $(use_enable rubberband)
+ $(use_enable lcms lcms2)
+ --disable-vapoursynth # Only available in overlays.
+ --disable-vapoursynth-lazy
+ $(use_enable archive libarchive)
+
+ --enable-libavdevice
+
+ # Audio outputs:
+ $(use_enable sdl sdl2) # Listed under audio, but also includes video.
+ --disable-sdl1
+ $(use_enable oss oss-audio)
+ --disable-rsound # Only available in overlays.
+ --disable-sndio # Only available in overlays.
+ $(use_enable pulseaudio pulse)
+ $(use_enable jack)
+ $(use_enable openal)
+ --disable-opensles
+ $(use_enable alsa)
+ $(use_enable coreaudio)
+
+ # Video outputs:
+ $(use_enable aqua cocoa)
+ $(use_enable drm)
+ $(use_enable gbm)
+ $(use_enable wayland)
+ $(use_enable X x11)
+ $(use_enable xscreensaver xss)
+ $(use_enable X xext)
+ $(use_enable xv)
+ $(use_enable xinerama)
+ $(use_enable X xrandr)
+ $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
+ $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
+ $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
+ $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
+ $(use_enable wayland gl-wayland)
+ $(use_enable vdpau)
+ $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
+ $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
+ $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
+ $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
+ $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
+ $(use_enable libcaca caca)
+ $(use_enable jpeg)
+ --disable-android
+ $(use_enable raspberry-pi rpi)
+ $(usex opengl "$(use_enable !aqua standard-gl)" '--disable-standard-gl')
+ --disable-ios-gl
+ $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
+ --disable-mali-fbdev # Only available in overlays.
+
+ # HWaccels:
+ # Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
+ $(use_enable vaapi vaapi-hwaccel)
+ $(use_enable vdpau vdpau-hwaccel)
+ $(use_enable cuda cuda-hwaccel)
+
+ # TV features:
+ $(use_enable v4l tv)
+ $(use_enable v4l tv-v4l2)
+ $(use_enable v4l libv4l2)
+ $(use_enable v4l audio-input)
+ $(use_enable dvb dvbin)
+
+ # Miscellaneous features:
+ --disable-apple-remote # Needs testing first. See Gentoo bug 577332.
+ )
+
+ if use vaapi && use X; then
+ mywafargs+=(
+ $(use_enable opengl vaapi-glx)
+ $(use_enable egl vaapi-x-egl)
+ )
+ fi
+
+ if ! use egl && ! use opengl && ! use raspberry-pi; then
+ mywafargs+=(--disable-gl)
+ fi
+
+ # Create reproducible non-live builds.
+ [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+
+ waf-utils_src_configure "${mywafargs[@]}"
+}
+
+src_install() {
+ waf-utils_src_install
+
+ if use lua; then
+ insinto /usr/share/${PN}
+ doins -r TOOLS/lua
+ fi
+
+ if use cli && use luajit; then
+ pax-mark -m "${ED}"usr/bin/${PN}
+ fi
+
+ if use tools; then
+ dobin TOOLS/{mpv_identify.sh,umpv}
+ newbin TOOLS/idet.sh mpv_idet.sh
+ python_replicate_script "${ED}"usr/bin/umpv
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ local rv softvol_0_18_1=0 osc_0_21_0=0
+
+ for rv in ${REPLACING_VERSIONS}; do
+ version_compare ${rv} 0.18.1
+ [[ $? -eq 1 ]] && softvol_0_18_1=1
+ version_compare ${rv} 0.21.0
+ [[ $? -eq 1 ]] && osc_0_21_0=1
+ done
+
+ if [[ ${softvol_0_18_1} -eq 1 ]]; then
+ elog "Since version 0.18.1 the software volume control is always enabled."
+ elog "This means that volume controls don't change the system volume,"
+ elog "e.g. per-application volume with PulseAudio."
+ elog "If you want to restore the previous behaviour, please refer to"
+ elog
+ elog "https://wiki.gentoo.org/wiki/Mpv#Volume_in_0.18.1"
+ elog
+ fi
+
+ if [[ ${osc_0_21_0} -eq 1 ]]; then
+ elog "In version 0.21.0 the default OSC layout was changed."
+ elog "If you want to restore the previous layout, please refer to"
+ elog
+ elog "https://wiki.gentoo.org/wiki/Mpv#OSC_in_0.21.0"
+ elog
+ fi
+
+ # bash-completion < 2.3-r1 already installs (mostly broken) mpv completion.
+ if use cli && ! has_version '<app-shells/bash-completion-2.3-r1' && \
+ ! has_version 'app-shells/mpv-bash-completion'; then
+ elog "If you want to have command-line completion via bash-completion,"
+ elog "please install app-shells/mpv-bash-completion."
+ fi
+
+ if use cli && [[ -n ${REPLACING_VERSIONS} ]] && \
+ has_version 'app-shells/mpv-bash-completion'; then
+ elog "If command-line completion doesn't work after mpv update,"
+ elog "please rebuild app-shells/mpv-bash-completion."
+ fi
+
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ xdg_desktop_database_update
+}
+
+src_test() {
+ cd "${S}"/build/test || die
+ local test
+ for test in *; do
+ if [[ -x ${test} ]]; then
+ ./"${test}" || die "Test suite failed"
+ fi
+ done
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2017-12-17 3:30 Lars Wendler
0 siblings, 0 replies; 17+ messages in thread
From: Lars Wendler @ 2017-12-17 3:30 UTC (permalink / raw
To: gentoo-commits
commit: 3e0c93bdde8b684243f8abcdf69fe15f1dcaea55
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 17 03:26:33 2017 +0000
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Dec 17 03:28:40 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e0c93bd
media-video/mpv: Fixed compilation against libva2.
Closes: https://bugs.gentoo.org/641384
Package-Manager: Portage-2.3.19, Repoman-2.3.6
media-video/mpv/files/mpv-libva2.patch | 88 ++++++++++++++++++++++++++++++++++
media-video/mpv/mpv-0.27.0.ebuild | 3 +-
2 files changed, 90 insertions(+), 1 deletion(-)
diff --git a/media-video/mpv/files/mpv-libva2.patch b/media-video/mpv/files/mpv-libva2.patch
new file mode 100644
index 00000000000..843e8449454
--- /dev/null
+++ b/media-video/mpv/files/mpv-libva2.patch
@@ -0,0 +1,88 @@
+From 2ecf240b1cd20875991a5b18efafbe799864ff7f Mon Sep 17 00:00:00 2001
+From: Mark Thompson <sw@jkqxz.net>
+Date: Mon, 9 Oct 2017 20:10:26 +0100
+Subject: [PATCH] vaapi: Use libva2 message callbacks
+
+They are no longer global, so they work vaguely sensibly.
+---
+ video/vaapi.c | 32 +++++++++++++++++++++++++++++---
+ 1 file changed, 29 insertions(+), 3 deletions(-)
+
+diff --git a/video/vaapi.c b/video/vaapi.c
+index 6bedbbaa18..3b1cb9cc41 100644
+--- a/video/vaapi.c
++++ b/video/vaapi.c
+@@ -40,9 +40,27 @@ int va_get_colorspace_flag(enum mp_csp csp)
+ return 0;
+ }
+
+-// VA message callbacks are global and do not have a context parameter, so it's
+-// impossible to know from which VADisplay they originate. Try to route them
+-// to existing mpv/libmpv instances within this process.
++#if VA_CHECK_VERSION(1, 0, 0)
++static void va_message_callback(void *context, const char *msg, int mp_level)
++{
++ struct mp_vaapi_ctx *res = context;
++ mp_msg(res->log, mp_level, "libva: %s", msg);
++}
++
++static void va_error_callback(void *context, const char *msg)
++{
++ va_message_callback(context, msg, MSGL_ERR);
++}
++
++static void va_info_callback(void *context, const char *msg)
++{
++ va_message_callback(context, msg, MSGL_V);
++}
++#else
++// Pre-libva2 VA message callbacks are global and do not have a context
++// parameter, so it's impossible to know from which VADisplay they
++// originate. Try to route them to existing mpv/libmpv instances within
++// this process.
+ static pthread_mutex_t va_log_mutex = PTHREAD_MUTEX_INITIALIZER;
+ static struct mp_vaapi_ctx **va_mpv_clients;
+ static int num_va_mpv_clients;
+@@ -77,6 +95,7 @@ static void va_info_callback(const char *msg)
+ {
+ va_message_callback(msg, MSGL_V);
+ }
++#endif
+
+ static void open_lavu_vaapi_device(struct mp_vaapi_ctx *ctx)
+ {
+@@ -108,6 +127,10 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
+ },
+ };
+
++#if VA_CHECK_VERSION(1, 0, 0)
++ vaSetErrorCallback(display, va_error_callback, res);
++ vaSetInfoCallback(display, va_info_callback, res);
++#else
+ pthread_mutex_lock(&va_log_mutex);
+ MP_TARRAY_APPEND(NULL, va_mpv_clients, num_va_mpv_clients, res);
+ pthread_mutex_unlock(&va_log_mutex);
+@@ -117,6 +140,7 @@ struct mp_vaapi_ctx *va_initialize(VADisplay *display, struct mp_log *plog,
+ #ifdef VA_FOURCC_I010
+ vaSetErrorCallback(va_error_callback);
+ vaSetInfoCallback(va_info_callback);
++#endif
+ #endif
+
+ int major, minor;
+@@ -154,6 +178,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
+ if (ctx->destroy_native_ctx)
+ ctx->destroy_native_ctx(ctx->native_ctx);
+
++#if !VA_CHECK_VERSION(1, 0, 0)
+ pthread_mutex_lock(&va_log_mutex);
+ for (int n = 0; n < num_va_mpv_clients; n++) {
+ if (va_mpv_clients[n] == ctx) {
+@@ -164,6 +189,7 @@ void va_destroy(struct mp_vaapi_ctx *ctx)
+ if (num_va_mpv_clients == 0)
+ TA_FREEP(&va_mpv_clients); // avoid triggering leak detectors
+ pthread_mutex_unlock(&va_log_mutex);
++#endif
+
+ talloc_free(ctx);
+ }
diff --git a/media-video/mpv/mpv-0.27.0.ebuild b/media-video/mpv/mpv-0.27.0.ebuild
index 6981ed0d09a..0edb3df22f3 100644
--- a/media-video/mpv/mpv-0.27.0.ebuild
+++ b/media-video/mpv/mpv-0.27.0.ebuild
@@ -141,6 +141,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
"${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+ "${FILESDIR}/${PN}-libva2.patch" #641384
)
pkg_setup() {
@@ -151,7 +152,7 @@ src_prepare() {
cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
chmod +x "${S}"/waf || die
eapply "${FILESDIR}/${PV}"
- default_src_prepare
+ default
}
src_configure() {
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2018-02-05 22:21 Thomas Deutschmann
0 siblings, 0 replies; 17+ messages in thread
From: Thomas Deutschmann @ 2018-02-05 22:21 UTC (permalink / raw
To: gentoo-commits
commit: bcdc0b042764a52730954c29fda8d3aa36674c24
Author: Ilya Tumaykin <itumaykin <AT> gmail <DOT> com>
AuthorDate: Mon Feb 5 22:19:31 2018 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Feb 5 22:21:25 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcdc0b04
media-video/mpv: fix float comparisons in tests
Closes: https://bugs.gentoo.org/628252
Closes: https://github.com/gentoo/gentoo/pull/7052
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
...mpv-0.25.0-fix-float-comparisons-in-tests.patch | 61 ++++++++++++++++++++++
media-video/mpv/mpv-0.25.0-r2.ebuild | 3 +-
media-video/mpv/mpv-0.26.0.ebuild | 3 +-
media-video/mpv/mpv-0.27.0-r1.ebuild | 3 +-
media-video/mpv/mpv-0.28.0.ebuild | 1 +
5 files changed, 68 insertions(+), 3 deletions(-)
diff --git a/media-video/mpv/files/mpv-0.25.0-fix-float-comparisons-in-tests.patch b/media-video/mpv/files/mpv-0.25.0-fix-float-comparisons-in-tests.patch
new file mode 100644
index 00000000000..5498b99a3c7
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.25.0-fix-float-comparisons-in-tests.patch
@@ -0,0 +1,61 @@
+commit f4f24c105f9c132e84cba9a9707acc261033a816
+Author: Ilya Tumaykin <itumaykin@gmail.com>
+Date: Thu Feb 1 14:05:06 2018 +0300
+
+tests: stop comparing floats against DBL_EPSILON, use FLT_EPSILON
+
+Fixes #5253.
+
+diff --git a/test/gl_video.c b/test/gl_video.c
+index a2d2577e25..6b5f3a7060 100644
+--- a/test/gl_video.c
++++ b/test/gl_video.c
+@@ -4,22 +4,22 @@
+ static void test_scale_ambient_lux_limits(void **state) {
+ float x;
+ x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 16.0);
+- assert_double_equal(x, 2.40f);
++ assert_float_equal(x, 2.40f);
+
+ x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 64.0);
+- assert_double_equal(x, 1.961f);
++ assert_float_equal(x, 1.961f);
+ }
+
+ static void test_scale_ambient_lux_sign(void **state) {
+ float x;
+ x = gl_video_scale_ambient_lux(16.0, 64.0, 1.961, 2.40, 64.0);
+- assert_double_equal(x, 2.40f);
++ assert_float_equal(x, 2.40f);
+ }
+
+ static void test_scale_ambient_lux_clamping(void **state) {
+ float x;
+ x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 0.0);
+- assert_double_equal(x, 2.40f);
++ assert_float_equal(x, 2.40f);
+ }
+
+ static void test_scale_ambient_lux_log10_midpoint(void **state) {
+@@ -27,7 +27,7 @@ static void test_scale_ambient_lux_log10_midpoint(void **state) {
+ // 32 corresponds to the the midpoint after converting lux to the log10 scale
+ x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 32.0);
+ float mid_gamma = (2.40 - 1.961) / 2 + 1.961;
+- assert_double_equal(x, mid_gamma);
++ assert_float_equal(x, mid_gamma);
+ }
+
+ int main(void) {
+diff --git a/test/test_helpers.h b/test/test_helpers.h
+index 7a61da82ea..49328f623f 100644
+--- a/test/test_helpers.h
++++ b/test/test_helpers.h
+@@ -10,6 +10,7 @@
+ #include <math.h>
+ #include <float.h>
+
+-#define assert_double_equal(a, b) assert_true(fabs(a - b) <= DBL_EPSILON)
++#define assert_double_equal(a, b) assert_true(fabs((a) - (b)) <= DBL_EPSILON * fmax(fabs(a), fabs(b)))
++#define assert_float_equal(a, b) assert_true(fabsf((a) - (b)) <= FLT_EPSILON * fmaxf(fabsf(a), fabsf(b)))
+
+ #endif
diff --git a/media-video/mpv/mpv-0.25.0-r2.ebuild b/media-video/mpv/mpv-0.25.0-r2.ebuild
index c5ddc81267d..c57ddd036dc 100644
--- a/media-video/mpv/mpv-0.25.0-r2.ebuild
+++ b/media-video/mpv/mpv-0.25.0-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -136,6 +136,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
"${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+ "${FILESDIR}/${PN}-0.25.0-fix-float-comparisons-in-tests.patch"
)
mpv_check_compiler() {
diff --git a/media-video/mpv/mpv-0.26.0.ebuild b/media-video/mpv/mpv-0.26.0.ebuild
index 164672738f8..c3ff2f124af 100644
--- a/media-video/mpv/mpv-0.26.0.ebuild
+++ b/media-video/mpv/mpv-0.26.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -141,6 +141,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
"${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+ "${FILESDIR}/${PN}-0.25.0-fix-float-comparisons-in-tests.patch"
)
pkg_setup() {
diff --git a/media-video/mpv/mpv-0.27.0-r1.ebuild b/media-video/mpv/mpv-0.27.0-r1.ebuild
index fd90c09f204..558adb5ce72 100644
--- a/media-video/mpv/mpv-0.27.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.27.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -141,6 +141,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
"${FILESDIR}/${PN}-0.23.0-make-libavdevice-check-accept-libav.patch"
+ "${FILESDIR}/${PN}-0.25.0-fix-float-comparisons-in-tests.patch"
)
pkg_setup() {
diff --git a/media-video/mpv/mpv-0.28.0.ebuild b/media-video/mpv/mpv-0.28.0.ebuild
index 9e4020ca823..23b6694770d 100644
--- a/media-video/mpv/mpv-0.28.0.ebuild
+++ b/media-video/mpv/mpv-0.28.0.ebuild
@@ -132,6 +132,7 @@ RDEPEND="${COMMON_DEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.19.0-make-ffmpeg-version-check-non-fatal.patch"
+ "${FILESDIR}/${PN}-0.25.0-fix-float-comparisons-in-tests.patch"
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2022-07-09 2:41 Sam James
0 siblings, 0 replies; 17+ messages in thread
From: Sam James @ 2022-07-09 2:41 UTC (permalink / raw
To: gentoo-commits
commit: 15ec35a786aaa2db6b77ff3af468353441b7dffd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 9 02:31:23 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 9 02:39:15 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15ec35a7
media-video/mpv: port live ebuild to meson
Closes: https://bugs.gentoo.org/856943
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-video/mpv/files/mpv-9999-docdir.patch | 11 ++
media-video/mpv/metadata.xml | 3 +
media-video/mpv/mpv-9999.ebuild | 273 +++++++++++++---------------
3 files changed, 145 insertions(+), 142 deletions(-)
diff --git a/media-video/mpv/files/mpv-9999-docdir.patch b/media-video/mpv/files/mpv-9999-docdir.patch
new file mode 100644
index 000000000000..62a57415163b
--- /dev/null
+++ b/media-video/mpv/files/mpv-9999-docdir.patch
@@ -0,0 +1,11 @@
+--- a/meson.build
++++ b/meson.build
+@@ -1856,7 +1856,7 @@ if get_option('cplayer')
+
+ conf_files = ['etc/mpv.conf', 'etc/input.conf',
+ 'etc/mplayer-input.conf', 'etc/restore-old-bindings.conf']
+- install_data(conf_files, install_dir: join_paths(datadir, 'doc', 'mpv'))
++ install_data(conf_files, install_dir: join_paths(datadir, 'mpv'))
+
+ bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
+ install_data('etc/mpv.bash-completion', install_dir: bash_install_dir, rename: 'mpv')
diff --git a/media-video/mpv/metadata.xml b/media-video/mpv/metadata.xml
index 8f8efa409921..46da6fbe4743 100644
--- a/media-video/mpv/metadata.xml
+++ b/media-video/mpv/metadata.xml
@@ -20,11 +20,14 @@
<flag name="opengl" restrict="<media-video/mpv-0.28.0">Enable the recommended 'opengl' video output</flag>
<flag name="opengl" restrict=">=media-video/mpv-0.28.0">Enable support for various OpenGL-based video backends</flag>
<flag name="raspberry-pi">Enable support for the Raspberry Pi</flag>
+ <flag name="pipewire">Enable sound support via native PipeWire backend</flag>
<flag name="rubberband">Enable high quality pitch correction via <pkg>media-libs/rubberband</pkg></flag>
<flag name="sdl">Enable <pkg>media-libs/libsdl2</pkg> based video and audio outputs
(Note: these outputs exist for compatibility reasons only, avoid if possible)</flag>
+ <flag name="sndio">Enable sound support via <pkg>media-sound/sndio</pkg></flag>
<flag name="tools">Install extra tools: mpv_identify.sh, mpv_idet.sh, and umpv</flag>
<flag name="uchardet">Enable subtitles charset discovery via <pkg>app-i18n/uchardet</pkg></flag>
+ <flag name="vector">Use function implementations more amenable to vectorization (gives speedup). Made optional in case of bugs.</flag>
<flag name="vulkan">Enable support for various Vulkan-based video backends</flag>
<flag name="zimg">Enable libzimg support (for vf_fingerprint)</flag>
</use>
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 647b7976525a..be6ab3bcae5b 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -1,38 +1,40 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
LUA_COMPAT=( lua5-{1..2} luajit )
PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE='threads(+)'
-WAF_PV=2.0.22
-
-inherit bash-completion-r1 flag-o-matic lua-single optfeature pax-utils python-r1 toolchain-funcs waf-utils xdg-utils
+inherit edo flag-o-matic lua-single optfeature meson pax-utils python-single-r1 toolchain-funcs xdg
DESCRIPTION="Media player based on MPlayer and mplayer2"
HOMEPAGE="https://mpv.io/ https://github.com/mpv-player/mpv"
-if [[ ${PV} != *9999* ]]; then
+if [[ ${PV} == *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+ inherit git-r3
+
+ DOCS=()
+else
SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+
DOCS=( RELEASE_NOTES )
-else
- EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
- inherit git-r3
- DOCS=(); SRC_URI=""
fi
-SRC_URI+=" https://waf.io/waf-${WAF_PV}"
+
DOCS+=( README.md DOCS/{client-api,interface}-changes.rst )
-# See Copyright in sources and Gentoo bug 506946. Waf is BSD, libmpv is ISC.
-LICENSE="LGPL-2.1+ GPL-2+ BSD ISC"
+# See Copyright in sources and Gentoo bug #506946. libmpv is ISC.
+# See https://github.com/mpv-player/mpv/blob/6265724f3331e3dee8d9ec2b6639def5004a5fa2/Copyright which
+# says other files may be BSD/MIT/ISC.
+LICENSE="LGPL-2.1+ GPL-2+ BSD MIT ISC"
SLOT="0"
IUSE="+alsa aqua archive bluray cdda +cli coreaudio cplugins debug doc drm dvb
dvd +egl gamepad gbm +iconv jack javascript jpeg lcms libcaca libmpv +lua
- nvenc openal +opengl pulseaudio raspberry-pi rubberband sdl
- selinux test tools +uchardet vaapi vdpau vulkan wayland +X +xv zlib zimg"
+ nvenc openal +opengl pipewire pulseaudio raspberry-pi rubberband sdl
+ selinux sndio test tools +uchardet vaapi vdpau +vector vulkan wayland +X +xv zlib zimg"
REQUIRED_USE="
|| ( cli libmpv )
@@ -79,17 +81,19 @@ COMMON_DEPEND="
)
jack? ( virtual/jack )
javascript? ( >=dev-lang/mujs-1.0.0 )
- jpeg? ( virtual/jpeg:0 )
+ jpeg? ( media-libs/libjpeg-turbo:= )
lcms? ( >=media-libs/lcms-2.6:2 )
>=media-libs/libass-0.12.1:=[fontconfig,harfbuzz(+)]
virtual/ttf-fonts
libcaca? ( >=media-libs/libcaca-0.99_beta18 )
lua? ( ${LUA_DEPS} )
openal? ( >=media-libs/openal-1.13 )
- pulseaudio? ( media-sound/pulseaudio )
+ pulseaudio? ( media-libs/libpulse )
+ pipewire? ( media-video/pipewire:= )
raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 )
rubberband? ( >=media-libs/rubberband-1.8.0 )
sdl? ( media-libs/libsdl2[sound,threads,video] )
+ sndio? ( media-sound/sndio )
vaapi? ( x11-libs/libva:=[drm(+)?,X?,wayland?] )
vdpau? ( x11-libs/libvdpau )
vulkan? (
@@ -118,7 +122,6 @@ COMMON_DEPEND="
zimg? ( >=media-libs/zimg-2.9.2 )
"
DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
dvb? ( virtual/linuxtv-dvb-headers )
nvenc? ( >=media-libs/nv-codec-headers-8.2.15.7 )
"
@@ -129,21 +132,18 @@ RDEPEND="${COMMON_DEPEND}
"
BDEPEND="dev-python/docutils
virtual/pkgconfig
- test? ( >=dev-util/cmocka-1.0.0 )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-9999-docdir.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
-}
-
-src_prepare() {
- cp "${DISTDIR}/waf-${WAF_PV}" "${S}"/waf || die
- chmod +x "${S}"/waf || die
- default
+ use tools && python-single-r1_pkg_setup
}
src_configure() {
- python_setup
tc-export CC PKG_CONFIG AR
if use raspberry-pi; then
@@ -151,133 +151,137 @@ src_configure() {
append-ldflags -L"${ESYSROOT}/opt/vc/lib"
fi
- local mywafargs=(
- --confdir="${EPREFIX}/etc/${PN}"
-
- $(usex cli '' '--disable-cplayer')
- $(use_enable libmpv libmpv-shared)
-
- --disable-libmpv-static
- --disable-static-build
- # See deep down below for build-date.
- --disable-optimize # Don't add '-O2' to CFLAGS.
- $(usex debug '' '--disable-debug-build')
-
- $(use_enable doc html-build)
- --disable-pdf-build
- --enable-manpage-build
- $(use_enable cplugins)
- $(use_enable test)
-
- $(use_enable iconv)
- $(use_enable lua)
- $(use_enable javascript)
- $(use_enable zlib)
- $(use_enable bluray libbluray)
- $(use_enable dvd dvdnav)
- $(use_enable cdda)
- $(use_enable uchardet)
- $(use_enable rubberband)
- $(use_enable lcms lcms2)
- --disable-vapoursynth # Only available in overlays.
- $(use_enable archive libarchive)
-
- --enable-libavdevice
+ if use debug && ! use test; then
+ append-cppflags -DNDEBUG
+ fi
+
+ local emesonargs=(
+ -Dbuild-date=false
+ $(meson_use cli cplayer)
+ $(meson_use libmpv)
+ $(meson_use test tests)
+
+ $(meson_feature doc html-build)
+ -Dmanpage-build=enabled
+ -Dpdf-build=disabled
+
+ $(meson_feature cplugins)
+ $(meson_feature iconv)
+ $(meson_feature javascript)
+ $(meson_feature zlib)
+ $(meson_feature bluray libbluray)
+ $(meson_feature dvd dvdnav)
+
+ $(meson_feature cdda)
+
+ $(meson_feature uchardet)
+ $(meson_feature rubberband)
+ $(meson_feature lcms lcms2)
+
+ # Only available in overlays.
+ -Dvapoursynth=disabled
+
+ $(meson_feature vector)
+
+ $(meson_feature archive libarchive)
+
+ -Dlibavdevice=enabled
# Audio outputs:
- $(use_enable sdl sdl2) # Listed under audio, but also includes video.
- $(use_enable pulseaudio pulse)
- $(use_enable jack)
- $(use_enable openal)
- --disable-opensles
- $(use_enable alsa)
- $(use_enable coreaudio)
+ $(meson_feature sdl sdl2-audio)
+ $(meson_feature pulseaudio pulse)
+ $(meson_feature jack)
+ $(meson_feature openal)
+ $(meson_feature pipewire)
+ -Dopensles=disabled
+ $(meson_feature alsa)
+ $(meson_feature coreaudio)
+ $(meson_feature sndio)
# Video outputs:
- $(use_enable aqua cocoa)
- $(use_enable drm)
- $(use_enable gbm)
- $(use_enable wayland wayland-scanner)
- $(use_enable wayland wayland-protocols)
- $(use_enable wayland)
- $(use_enable X x11)
- $(use_enable xv)
- $(usex opengl "$(use_enable aqua gl-cocoa)" '--disable-gl-cocoa')
- $(usex opengl "$(use_enable X gl-x11)" '--disable-gl-x11')
- $(usex egl "$(use_enable X egl-x11)" '--disable-egl-x11')
- $(usex egl "$(use_enable gbm egl-drm)" '--disable-egl-drm')
- $(usex opengl "$(use_enable wayland gl-wayland)" '--disable-gl-wayland')
- $(use_enable vdpau)
- $(usex vdpau "$(use_enable opengl vdpau-gl-x11)" '--disable-vdpau-gl-x11')
- $(use_enable vaapi) # See below for vaapi-glx, vaapi-x-egl.
- $(usex vaapi "$(use_enable X vaapi-x11)" '--disable-vaapi-x11')
- $(usex vaapi "$(use_enable wayland vaapi-wayland)" '--disable-vaapi-wayland')
- $(usex vaapi "$(use_enable gbm vaapi-drm)" '--disable-vaapi-drm')
- $(use_enable libcaca caca)
- $(use_enable jpeg)
- $(use_enable vulkan shaderc)
- $(use_enable vulkan libplacebo)
- $(use_enable raspberry-pi rpi)
- $(usex libmpv "$(use_enable opengl plain-gl)" '--disable-plain-gl')
- $(usex opengl '' '--disable-gl')
- $(use_enable vulkan)
- $(use_enable gamepad sdl2-gamepad)
+ $(meson_feature sdl sdl2-video)
+ $(meson_feature aqua cocoa)
+ $(meson_feature drm)
+ $(meson_feature gbm)
+ $(meson_feature wayland)
+ $(meson_feature X x11)
+ $(meson_feature xv)
+
+ $(meson_feature opengl gl)
+ $(usex opengl "$(meson_feature aqua gl-cocoa)" '-Dgl-cocoa=disabled')
+ $(usex opengl "$(meson_feature X gl-x11)" '-Dgl-x11=disabled')
+
+ $(meson_feature egl)
+ $(usex egl "$(meson_feature X egl-x11)" "-Degl-x11=disabled")
+ $(usex egl "$(meson_feature gbm egl-drm)" "-Degl-drm=disabled")
+ $(usex opengl "$(meson_feature wayland egl-wayland)" '-Degl-wayland=disabled')
+
+ $(meson_feature vdpau)
+ $(usex vdpau "$(meson_feature opengl vdpau-gl-x11)" '-Dvdpau-gl-x11=disabled')
+
+ $(meson_feature vaapi) # See below for vaapi-glx, vaapi-x-egl.
+ $(usex vaapi "$(meson_feature X vaapi-x11)" "-Dvaapi-x11=disabled")
+ $(usex vaapi "$(meson_feature wayland vaapi-wayland)" "-Dvaapi-wayland=disabled")
+ $(usex vaapi "$(meson_feature gbm vaapi-drm)" "-Dvaapi-drm=disabled")
+
+ $(meson_feature libcaca caca)
+ $(meson_feature jpeg)
+ $(meson_feature vulkan shaderc)
+ $(meson_feature vulkan libplacebo)
+ $(meson_feature raspberry-pi rpi)
+
+ -Dsixel=disabled
+ -Dspirv-cross=disabled
+
+ $(usex libmpv "$(meson_feature opengl plain-gl)" "-Dplain-gl=disabled")
+ $(meson_feature opengl gl)
+ $(meson_feature vulkan)
+ $(meson_feature gamepad sdl2-gamepad)
# HWaccels:
# Automagic Video Toolbox HW acceleration. See Gentoo bug 577332.
- $(use_enable nvenc cuda-hwaccel)
- $(use_enable nvenc cuda-interop)
+ $(meson_feature nvenc cuda-hwaccel)
+ $(meson_feature nvenc cuda-interop)
# TV features:
- $(use_enable dvb dvbin)
+ $(meson_feature dvb dvbin)
# Miscellaneous features:
- $(use_enable zimg)
+ $(meson_feature zimg)
)
+
if use lua; then
- if use lua_single_target_luajit; then
- mywafargs+=( --lua="luajit" )
- else
- # Because it would be too simple to just let the user directly
- # specify the package name to check, wouldn't it.
- mywafargs+=( --lua="$(ver_rs 1 '' $(ver_cut 1-2 $(lua_get_version)))" )
- fi
+ emesonargs+=( -Dlua="${ELUA}" )
+ else
+ emesonargs+=( -Dlua=disabled )
fi
if use vaapi && use X; then
- mywafargs+=(
- $(use_enable egl vaapi-x-egl)
+ emesonargs+=(
+ $(meson_feature egl vaapi-x-egl)
)
fi
# Not for us
- mywafargs+=(
- --disable-android
- --disable-egl-android
- --disable-uwp
- --disable-audiounit
- --disable-macos-media-player
- --disable-wasapi
- --disable-ios-gl
- --disable-macos-touchbar
- --disable-macos-cocoa-cb
- --disable-tvos
- --disable-egl-angle-win32
+ emesonargs+=(
+ -Duwp=disabled
+ -Daudiounit=disabled
+ -Doss-audio=disabled
+ -Dwasapi=disabled
+
+ -Dd3d11=disabled
+ -Ddirect3d=disabled
)
- mywafargs+=(
- --bashdir="$(get_bashcompdir)"
- --zshdir="${EPREFIX}"/usr/share/zsh/site-functions
-)
-
- # Create reproducible non-live builds.
- [[ ${PV} != *9999* ]] && mywafargs+=(--disable-build-date)
+ meson_src_configure
+}
- waf-utils_src_configure "${mywafargs[@]}"
+src_test() {
+ edo "${BUILD_DIR}"/mpv --no-config -v --unittest=all-simple
}
src_install() {
- waf-utils_src_install
+ meson_src_install
if use lua; then
insinto /usr/share/${PN}
@@ -291,7 +295,7 @@ src_install() {
if use tools; then
dobin TOOLS/{mpv_identify.sh,umpv}
newbin TOOLS/idet.sh mpv_idet.sh
- python_replicate_script "${ED}"/usr/bin/umpv
+ python_fix_shebang "${ED}"/usr/bin/umpv
fi
}
@@ -342,18 +346,3 @@ pkg_postinst() {
xdg_icon_cache_update
xdg_desktop_database_update
}
-
-pkg_postrm() {
- xdg_icon_cache_update
- xdg_desktop_database_update
-}
-
-src_test() {
- cd "${S}"/build/test || die
- local test
- for test in *; do
- if [[ -x ${test} ]]; then
- ./"${test}" || die "Test suite failed"
- fi
- done
-}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2022-11-11 0:47 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2022-11-11 0:47 UTC (permalink / raw
To: gentoo-commits
commit: 7fb1614a93bdb50808a6de8cec2da308184bb85c
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 11 00:36:01 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Nov 11 00:45:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb1614a
media-video/mpv: fix build when gnustep-gui is installed
quick fix by ensuring macos_touchbar['deps'].found()
('and' check is fine there, right? .. well it works)
Closes: https://bugs.gentoo.org/880737
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
media-video/mpv/files/mpv-0.34.1_p20221105-macos-touchbar.patch | 8 ++++++++
media-video/mpv/mpv-0.34.1_p20221105.ebuild | 4 ++++
media-video/mpv/mpv-9999.ebuild | 4 ++++
3 files changed, 16 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.34.1_p20221105-macos-touchbar.patch b/media-video/mpv/files/mpv-0.34.1_p20221105-macos-touchbar.patch
new file mode 100644
index 000000000000..bbf931167b2b
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.34.1_p20221105-macos-touchbar.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/880737
+--- a/meson.build
++++ b/meson.build
+@@ -1538,3 +1538,3 @@
+ }
+-features += {'macos-touchbar': cc.compiles(macos_touchbar['fragment'], name: 'macos-touchbar check')}
++features += {'macos-touchbar': macos_touchbar['deps'].found() and cc.compiles(macos_touchbar['fragment'], name: 'macos-touchbar check')}
+ if features['macos-touchbar']
diff --git a/media-video/mpv/mpv-0.34.1_p20221105.ebuild b/media-video/mpv/mpv-0.34.1_p20221105.ebuild
index 44b6c139ad77..a7f3bb4b505f 100644
--- a/media-video/mpv/mpv-0.34.1_p20221105.ebuild
+++ b/media-video/mpv/mpv-0.34.1_p20221105.ebuild
@@ -125,6 +125,10 @@ BDEPEND="
cli? ( dev-python/docutils )
wayland? ( dev-util/wayland-scanner )"
+PATCHES=(
+ "${FILESDIR}"/${P}-macos-touchbar.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
python-single-r1_pkg_setup
diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild
index 44b6c139ad77..210b3b42bc51 100644
--- a/media-video/mpv/mpv-9999.ebuild
+++ b/media-video/mpv/mpv-9999.ebuild
@@ -125,6 +125,10 @@ BDEPEND="
cli? ( dev-python/docutils )
wayland? ( dev-util/wayland-scanner )"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.34.1_p20221105-macos-touchbar.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
python-single-r1_pkg_setup
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2023-07-23 15:22 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2023-07-23 15:22 UTC (permalink / raw
To: gentoo-commits
commit: cd1fd1800adb5b92006acc74cad8e3e4e782416b
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 23 14:17:35 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 23 15:22:09 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd1fd180
media-video/mpv: backport fix for use with pipewire-0.3.75
Albeit, regardless of this patch or stable pipewire, ao=pipewire on
0.35.1 seems to have several other issues (in my VM it results in
horribly crackling audio), and I personally recommend ao=pulse
(or jack/alsa) instead to use with pipewire. Pipewire does work
great in mpv-9999, so next release should be better.
Considered a ~arch revbump, but given this only touch pipewire
code and that ao=pipewire is already a bit bad on 0.35.1 I'm not
sure it's worth the stabilization trouble (aka current keywords
are intentional).
Tested with both 0.3.75 and stable 0.3.71, but will keep -r1 for
a bit in case of something I missed.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../mpv/files/mpv-0.35.1-pipewire-0.3.75.patch | 86 ++++++
media-video/mpv/mpv-0.35.1-r2.ebuild | 304 +++++++++++++++++++++
2 files changed, 390 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch b/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch
new file mode 100644
index 000000000000..41392ab0839c
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch
@@ -0,0 +1,86 @@
+Issue point that pipewire itself may apply a workaround for mpv,
+so this may or may not be necessary for future pipewire versions.
+Albeit the actual issue seems to be in mpv, so let's backport the
+fix which appears to work properly for old 0.35.1 as well.
+
+Note that (unrelated to this issue), 0.35.1 is still a bit flaky
+with pipewire. If have other issues with ao=pipewire you may want
+to consider mpv-9999 until next release, or use ao=pulse/alsa/jack
+to use through pipewire meanwhile.
+
+https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3374
+https://github.com/mpv-player/mpv/issues/11995
+
+https://github.com/mpv-player/mpv/pull/11996
+https://github.com/mpv-player/mpv/commit/007019a303a09b098a387f607ae149705b57dc1c
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 23 Jul 2023 09:10:55 +0200
+Subject: [PATCH] ao_pipewire: for_each_sink: properly check termination
+ condition
+
+Doing a pw_thread_loop_wait() without checking conditions is invalid.
+The thread loop could be signalled for other reasons and in this case
+the wait needs to continue.
+
+PipeWire added such additional signaling in
+commit 33be898130f0 ("thread-loop: signal when started").
+
+This meant that for_each_sink would return before the callbacks have
+fired and session_has_sink() would incorrectly return "false", failing
+the initialization of ao_pipewire.
+
+Fixes #11995
+--- a/audio/out/ao_pipewire.c
++++ b/audio/out/ao_pipewire.c
+@@ -337,6 +337,11 @@
+ }
+
+
++struct for_each_done_ctx {
++ struct pw_thread_loop *loop;
++ bool done;
++};
++
+ static const struct pw_registry_events for_each_sink_registry_events = {
+ .version = PW_VERSION_REGISTRY_EVENTS,
+ .global = for_each_sink_registry_event_global,
+@@ -344,8 +349,9 @@
+
+ static void for_each_sink_done(void *data, uint32_t it, int seq)
+ {
+- struct pw_thread_loop *loop = data;
+- pw_thread_loop_signal(loop, false);
++ struct for_each_done_ctx *ctx = data;
++ ctx->done = true;
++ pw_thread_loop_signal(ctx->loop, false);
+ }
+
+ static const struct pw_core_events for_each_sink_core_events = {
+@@ -359,12 +365,16 @@
+ struct priv *priv = ao->priv;
+ struct pw_registry *registry;
+ struct spa_hook core_listener;
++ struct for_each_done_ctx done_ctx = {
++ .loop = priv->loop,
++ .done = false,
++ };
+ int ret = -1;
+
+ pw_thread_loop_lock(priv->loop);
+
+ spa_zero(core_listener);
+- if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, priv->loop) < 0)
++ if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, &done_ctx) < 0)
+ goto unlock_loop;
+
+ registry = pw_core_get_registry(priv->core, PW_VERSION_REGISTRY, 0);
+@@ -383,7 +393,8 @@
+ if (pw_registry_add_listener(registry, ®istry_listener, &for_each_sink_registry_events, &revents_ctx) < 0)
+ goto destroy_registry;
+
+- pw_thread_loop_wait(priv->loop);
++ while (!done_ctx.done)
++ pw_thread_loop_wait(priv->loop);
+
+ spa_hook_remove(®istry_listener);
+
diff --git a/media-video/mpv/mpv-0.35.1-r2.ebuild b/media-video/mpv/mpv-0.35.1-r2.ebuild
new file mode 100644
index 000000000000..f41aea9d7e6f
--- /dev/null
+++ b/media-video/mpv/mpv-0.35.1-r2.ebuild
@@ -0,0 +1,304 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 luajit )
+PYTHON_COMPAT=( python3_{10..12} )
+inherit edo flag-o-matic lua-single meson optfeature pax-utils python-single-r1 xdg
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+else
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ppc ppc64 ~riscv x86 ~amd64-linux"
+fi
+
+DESCRIPTION="Media player for the command line"
+HOMEPAGE="https://mpv.io/"
+
+LICENSE="LGPL-2.1+ GPL-2+ BSD ISC MIT" #506946
+SLOT="0/2" # soname
+IUSE="
+ +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb
+ dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv
+ +libplacebo +lua mmal nvenc openal opengl pipewire pulseaudio
+ raspberry-pi rubberband sdl selinux sixel sndio test tools +uchardet
+ vaapi vdpau vulkan wayland +xv zimg zlib"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( cli libmpv )
+ egl? ( || ( X drm wayland ) )
+ libplacebo? ( || ( egl opengl vulkan ) )
+ lua? ( ${LUA_REQUIRED_USE} )
+ nvenc? ( || ( egl opengl vulkan ) )
+ opengl? ( || ( X aqua ) )
+ test? ( cli )
+ tools? ( cli )
+ uchardet? ( iconv )
+ vaapi? (
+ || ( X egl libplacebo wayland )
+ wayland? ( drm )
+ )
+ vdpau? ( X )
+ vulkan? ( || ( X wayland ) libplacebo )
+ xv? ( X )"
+RESTRICT="!test? ( test )"
+
+# raspberry-pi: default to -bin given non-bin is known broken (bug #893422)
+COMMON_DEPEND="
+ media-libs/libass:=[fontconfig]
+ media-video/ffmpeg:=[encode,threads,vaapi?,vdpau?]
+ X? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXpresent
+ x11-libs/libXrandr
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( media-libs/alsa-lib )
+ archive? ( app-arch/libarchive:= )
+ bluray? ( media-libs/libbluray:= )
+ cdda? (
+ dev-libs/libcdio-paranoia:=
+ dev-libs/libcdio:=
+ )
+ drm? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ dvd? (
+ media-libs/libdvdnav
+ media-libs/libdvdread:=
+ )
+ egl? ( media-libs/libglvnd )
+ gamepad? ( media-libs/libsdl2[joystick] )
+ iconv? (
+ virtual/libiconv
+ uchardet? ( app-i18n/uchardet )
+ )
+ jack? ( virtual/jack )
+ javascript? ( dev-lang/mujs:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ lcms? ( media-libs/lcms:2 )
+ libcaca? ( media-libs/libcaca )
+ libplacebo? (
+ >=media-libs/libplacebo-4.202:=[opengl?,vulkan?]
+ <media-libs/libplacebo-6
+ egl? ( media-libs/libplacebo[opengl] )
+ )
+ lua? ( ${LUA_DEPS} )
+ openal? ( media-libs/openal )
+ opengl? ( media-libs/libglvnd[X?] )
+ pipewire? ( media-video/pipewire:= )
+ pulseaudio? ( media-libs/libpulse )
+ raspberry-pi? (
+ || (
+ media-libs/raspberrypi-userland-bin
+ media-libs/raspberrypi-userland
+ )
+ )
+ rubberband? ( media-libs/rubberband )
+ sdl? ( media-libs/libsdl2[sound,threads,video] )
+ sixel? ( media-libs/libsixel )
+ sndio? ( media-sound/sndio:= )
+ vaapi? ( media-libs/libva:=[X?,drm(+)?,wayland?] )
+ vdpau? ( x11-libs/libvdpau )
+ vulkan? (
+ media-libs/shaderc
+ media-libs/vulkan-loader[X?,wayland?]
+ )
+ wayland? (
+ dev-libs/wayland
+ dev-libs/wayland-protocols
+ x11-libs/libxkbcommon
+ )
+ zimg? ( media-libs/zimg )
+ zlib? ( sys-libs/zlib:= )"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+ tools? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ nvenc? ( media-libs/nv-codec-headers )
+ wayland? ( dev-libs/wayland-protocols )"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ cli? ( dev-python/docutils )
+ wayland? ( dev-util/wayland-scanner )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-yt-dlp-edl-fragments.patch
+ "${FILESDIR}"/${P}-pipewire-0.3.75.patch
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ if use !debug; then
+ if use test; then
+ einfo "Skipping -DNDEBUG due to USE=test"
+ else
+ append-cppflags -DNDEBUG # treated specially
+ fi
+ fi
+
+ mpv_feature_multi() {
+ local use set
+ for use in ${1} ${2}; do
+ use ${use} || set=disabled
+ done
+ echo -D${3-${2}}=${set-enabled}
+ }
+
+ local emesonargs=(
+ $(meson_use cli cplayer)
+ $(meson_use libmpv)
+ $(meson_use test tests)
+
+ $(meson_feature cli html-build)
+ $(meson_feature cli manpage-build)
+ -Dpdf-build=disabled
+
+ -Dbuild-date=false
+
+ # misc options
+ $(meson_feature archive libarchive)
+ $(meson_feature bluray libbluray)
+ $(meson_feature cdda)
+ -Dcplugins=enabled
+ $(meson_feature dvb dvbin)
+ $(meson_feature dvd dvdnav)
+ $(meson_feature gamepad sdl2-gamepad)
+ $(meson_feature iconv)
+ $(meson_feature javascript)
+ -Dlibavdevice=enabled
+ $(meson_feature lcms lcms2)
+ -Dlua=$(usex lua "${ELUA}" disabled)
+ $(meson_feature rubberband)
+ -Dsdl2=$(use gamepad || use sdl && echo enabled || echo disabled) #857156
+ $(meson_feature uchardet)
+ -Dvapoursynth=disabled # only available in overlays
+ $(meson_feature zimg)
+ $(meson_feature zlib)
+
+ # audio output
+ $(meson_feature alsa)
+ $(meson_feature coreaudio)
+ $(meson_feature jack)
+ $(meson_feature openal)
+ $(meson_feature pipewire)
+ $(meson_feature pulseaudio pulse)
+ $(meson_feature sdl sdl2-audio)
+ $(meson_feature sndio)
+
+ # video output
+ $(meson_feature X x11)
+ $(meson_feature aqua cocoa)
+ $(meson_feature drm)
+ $(meson_feature drm gbm)
+ $(meson_feature jpeg)
+ $(meson_feature libcaca caca)
+ $(meson_feature libplacebo)
+ $(meson_feature mmal rpi-mmal)
+ $(meson_feature sdl sdl2-video)
+ $(meson_feature sixel)
+ $(meson_feature wayland)
+ $(meson_feature xv)
+
+ -Dgl=$(use egl || use libmpv || use opengl || use raspberry-pi &&
+ echo enabled || echo disabled)
+ $(meson_feature egl)
+ $(mpv_feature_multi egl X egl-x11)
+ $(mpv_feature_multi egl drm egl-drm)
+ $(mpv_feature_multi egl wayland egl-wayland)
+ $(meson_feature libmpv plain-gl)
+ $(mpv_feature_multi opengl X gl-x11)
+ $(mpv_feature_multi opengl aqua gl-cocoa)
+ $(meson_feature raspberry-pi rpi)
+
+ $(meson_feature vulkan)
+ $(meson_feature vulkan shaderc)
+
+ # hardware decoding
+ $(meson_feature nvenc cuda-hwaccel)
+ $(meson_feature nvenc cuda-interop)
+
+ $(meson_feature vaapi)
+ $(mpv_feature_multi vaapi X vaapi-x11)
+ $(mpv_feature_multi 'vaapi X' egl vaapi-x-egl)
+ $(mpv_feature_multi 'vaapi egl' drm vaapi-drm)
+ $(mpv_feature_multi 'vaapi egl' wayland vaapi-wayland)
+
+ $(meson_feature vdpau)
+ $(mpv_feature_multi vdpau opengl vdpau-gl-x11)
+
+ $(mpv_feature_multi aqua opengl videotoolbox-gl)
+ )
+
+ meson_src_configure
+}
+
+src_test() {
+ # https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst#debugging
+ local tests=($("${BUILD_DIR}"/mpv --no-config --unittest=help | tail -n +2; assert))
+ (( ${#tests[@]} )) || die "failed to gather any tests"
+
+ local skip=(
+ all-simple
+
+ # fails on non-issue minor inconsistencies (bug #888639)
+ img_format
+ repack_sws
+ )
+
+ local test
+ for test in "${tests[@]}"; do
+ [[ ${test} == @($(IFS='|'; echo "${skip[*]}")) ]] ||
+ edo "${BUILD_DIR}"/mpv -v --no-config --unittest="${test}"
+ done
+}
+
+src_install() {
+ meson_src_install
+
+ if use lua; then
+ insinto /usr/share/${PN}
+ doins -r TOOLS/lua
+
+ if use cli && use lua_single_target_luajit; then
+ pax-mark -m "${ED}"/usr/bin/${PN}
+ fi
+ fi
+
+ if use tools; then
+ dobin TOOLS/{mpv_identify.sh,umpv}
+ newbin TOOLS/idet.sh mpv_idet.sh
+ python_fix_shebang "${ED}"/usr/bin/umpv
+ fi
+
+ if use cli; then
+ dodir /usr/share/doc/${PF}/html
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/html}/mpv.html || die
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
+ fi
+
+ local GLOBIGNORE=*/*build*:*/*policy*
+ dodoc RELEASE_NOTES DOCS/*.{md,rst}
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "URL support with USE=lua" net-misc/yt-dlp
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2023-07-23 19:09 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2023-07-23 19:09 UTC (permalink / raw
To: gentoo-commits
commit: 40df9a529bbb5075b565b3b1e092348ac7802472
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 23 18:22:43 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 23 19:08:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40df9a52
media-video/mpv: add 0.36.0
Neither me nor pipewire upstream expected a release soon, but
turns out did not have to worry about that. Also includes more
pipewire fixes than just the emergency one so ao=pipewire users
should upgrade ahead of stable.
Note that this needs the latest version of libplacebo or else
gpu-next won't be enabled (that version is however incompatible
with <ffmpeg-6.1 and <vlc-4 -- not that it's currently enabled in
Gentoo for vlc-3 and is off-by-default on ffmpeg).
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
media-video/mpv/Manifest | 1 +
media-video/mpv/files/mpv-0.36.0-tests-odr.patch | 30 +++
media-video/mpv/mpv-0.36.0.ebuild | 291 +++++++++++++++++++++++
3 files changed, 322 insertions(+)
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index 6ac1915445ce..2848b9c4a196 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -1 +1,2 @@
DIST mpv-0.35.1.tar.gz 3367913 BLAKE2B 706a2031a2ca973eb3a092ec7f62ba40ca4dfd78e3ffe5d6e432486b0018852b034152a21805be594054178ccb17856dafe2b860cddcc22d27df895d163871de SHA512 42f3564a9ed4d972d14b2c697b0163f06a8bb68a0606a86c34935181247c783e3cb62286b445799998def0919fb13fce8b8f6453f82652d5bfaea5929119127a
+DIST mpv-0.36.0.tar.gz 3409178 BLAKE2B 7260c265f02918d4caf72d8d8ecc9d4ab9783d66d675bd683a2f9c228404ad978c6fe0aa50f486b5257740176bc26f8abde7eff20d89019d5f701ec78c7743e1 SHA512 51f455a425ea5aac47acb3582d0f958a34248a2290a8d6887d22bcb9385fe8d1ab5d7f09d5408cfecfb73c1ec85d1b8ec8958e45a4941d3f711a2e580187472f
diff --git a/media-video/mpv/files/mpv-0.36.0-tests-odr.patch b/media-video/mpv/files/mpv-0.36.0-tests-odr.patch
new file mode 100644
index 000000000000..1c7c05c20f78
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.36.0-tests-odr.patch
@@ -0,0 +1,30 @@
+Quickfix for USE=test with -Werror=odr (stubs, so have no real consequences).
+
+timer.h gets indirectly included and can declare these differently, have not
+looked closer yet.
+--- a/test/test_utils.c
++++ b/test/test_utils.c
+@@ -110,6 +110,6 @@
+ #ifndef WIN32_TESTS
+-void mp_add_timeout(void) {};
+-void mp_rel_time_to_timespec(void) {};
+-void mp_time_us(void) {};
+-void mp_time_us_to_timespec(void) {};
++void mp_add_timeout(int64_t time_us, double timeout_sec) {};
++struct timespec mp_rel_time_to_timespec(double timeout_sec) {return (struct timespec){0};};
++int64_t mp_time_us(void) {return 0;};
++struct timespec mp_time_us_to_timespec(int64_t time_us) {return (struct timespec){0};};
+ #endif
+--- a/test/test_utils.h
++++ b/test/test_utils.h
+@@ -61,6 +61,6 @@
+ #ifndef WIN32_TESTS
+-void mp_add_timeout(void);
+-void mp_rel_time_to_timespec(void);
+-void mp_time_us(void);
+-void mp_time_us_to_timespec(void);
++void mp_add_timeout(int64_t time_us, double timeout_sec);
++struct timespec mp_rel_time_to_timespec(double timeout_sec);
++int64_t mp_time_us(void);
++struct timespec mp_time_us_to_timespec(int64_t time_us);
+ #endif
diff --git a/media-video/mpv/mpv-0.36.0.ebuild b/media-video/mpv/mpv-0.36.0.ebuild
new file mode 100644
index 000000000000..67d67e316531
--- /dev/null
+++ b/media-video/mpv/mpv-0.36.0.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-1 luajit )
+PYTHON_COMPAT=( python3_{10..12} )
+inherit flag-o-matic lua-single meson optfeature pax-utils python-single-r1 xdg
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
+else
+ SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux"
+fi
+
+DESCRIPTION="Media player for the command line"
+HOMEPAGE="https://mpv.io/"
+
+LICENSE="LGPL-2.1+ GPL-2+ BSD ISC MIT" #506946
+SLOT="0/2" # soname
+IUSE="
+ +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb
+ dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv
+ +libplacebo +lua mmal nvenc openal opengl pipewire pulseaudio
+ raspberry-pi rubberband sdl selinux sixel sndio test tools +uchardet
+ vaapi vdpau vulkan wayland +xv zimg zlib"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( cli libmpv )
+ egl? ( || ( X drm wayland ) )
+ libplacebo? ( || ( egl opengl vulkan ) )
+ lua? ( ${LUA_REQUIRED_USE} )
+ nvenc? ( || ( egl opengl vulkan ) )
+ opengl? ( || ( X aqua ) )
+ test? ( cli )
+ tools? ( cli )
+ uchardet? ( iconv )
+ vaapi? (
+ || ( X egl libplacebo wayland )
+ wayland? ( drm )
+ )
+ vdpau? ( X )
+ vulkan? ( || ( X wayland ) libplacebo )
+ xv? ( X )"
+RESTRICT="!test? ( test )"
+
+# raspberry-pi: default to -bin given non-bin is known broken (bug #893422)
+COMMON_DEPEND="
+ media-libs/libass:=[fontconfig]
+ >=media-video/ffmpeg-4.4:=[encode,threads,vaapi?,vdpau?]
+ X? (
+ x11-libs/libX11
+ x11-libs/libXScrnSaver
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXpresent
+ x11-libs/libXrandr
+ xv? ( x11-libs/libXv )
+ )
+ alsa? ( media-libs/alsa-lib )
+ archive? ( app-arch/libarchive:= )
+ bluray? ( media-libs/libbluray:= )
+ cdda? (
+ dev-libs/libcdio-paranoia:=
+ dev-libs/libcdio:=
+ )
+ drm? (
+ media-libs/mesa[gbm(+)]
+ x11-libs/libdrm
+ )
+ dvd? (
+ media-libs/libdvdnav
+ media-libs/libdvdread:=
+ )
+ egl? ( media-libs/libglvnd )
+ gamepad? ( media-libs/libsdl2[joystick] )
+ iconv? (
+ virtual/libiconv
+ uchardet? ( app-i18n/uchardet )
+ )
+ jack? ( virtual/jack )
+ javascript? ( dev-lang/mujs:= )
+ jpeg? ( media-libs/libjpeg-turbo:= )
+ lcms? ( media-libs/lcms:2 )
+ libcaca? ( media-libs/libcaca )
+ libplacebo? (
+ >=media-libs/libplacebo-4.157:=[opengl?,vulkan?]
+ egl? ( media-libs/libplacebo[opengl] )
+ )
+ lua? ( ${LUA_DEPS} )
+ openal? ( media-libs/openal )
+ opengl? ( media-libs/libglvnd[X?] )
+ pipewire? ( media-video/pipewire:= )
+ pulseaudio? ( media-libs/libpulse )
+ raspberry-pi? (
+ || (
+ media-libs/raspberrypi-userland-bin
+ media-libs/raspberrypi-userland
+ )
+ )
+ rubberband? ( media-libs/rubberband )
+ sdl? ( media-libs/libsdl2[sound,threads,video] )
+ sixel? ( media-libs/libsixel )
+ sndio? ( media-sound/sndio:= )
+ vaapi? ( media-libs/libva:=[X?,drm(+)?,wayland?] )
+ vdpau? ( x11-libs/libvdpau )
+ vulkan? (
+ media-libs/shaderc
+ media-libs/vulkan-loader[X?,wayland?]
+ )
+ wayland? (
+ dev-libs/wayland
+ dev-libs/wayland-protocols
+ x11-libs/libxkbcommon
+ )
+ zimg? ( media-libs/zimg )
+ zlib? ( sys-libs/zlib:= )"
+RDEPEND="
+ ${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-mplayer )
+ tools? ( ${PYTHON_DEPS} )"
+DEPEND="
+ ${COMMON_DEPEND}
+ X? ( x11-base/xorg-proto )
+ dvb? ( virtual/linuxtv-dvb-headers )
+ nvenc? ( media-libs/nv-codec-headers )
+ wayland? ( dev-libs/wayland-protocols )"
+BDEPEND="
+ ${PYTHON_DEPS}
+ virtual/pkgconfig
+ cli? ( dev-python/docutils )
+ wayland? ( dev-util/wayland-scanner )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.36.0-tests-odr.patch
+)
+
+pkg_setup() {
+ use lua && lua-single_pkg_setup
+ python-single-r1_pkg_setup
+}
+
+src_configure() {
+ if use !debug; then
+ if use test; then
+ einfo "Skipping -DNDEBUG due to USE=test"
+ else
+ append-cppflags -DNDEBUG # treated specially
+ fi
+ fi
+
+ mpv_feature_multi() {
+ local use set
+ for use in ${1} ${2}; do
+ use ${use} || set=disabled
+ done
+ echo -D${3-${2}}=${set-enabled}
+ }
+
+ local emesonargs=(
+ $(meson_use cli cplayer)
+ $(meson_use libmpv)
+ $(meson_use test tests)
+
+ $(meson_feature cli html-build)
+ $(meson_feature cli manpage-build)
+ -Dpdf-build=disabled
+
+ -Dbuild-date=false
+
+ # misc options
+ $(meson_feature archive libarchive)
+ $(meson_feature bluray libbluray)
+ $(meson_feature cdda)
+ -Dcplugins=enabled
+ $(meson_feature dvb dvbin)
+ $(meson_feature dvd dvdnav)
+ $(meson_feature gamepad sdl2-gamepad)
+ $(meson_feature iconv)
+ $(meson_feature javascript)
+ -Dlibavdevice=enabled
+ $(meson_feature lcms lcms2)
+ -Dlua=$(usex lua "${ELUA}" disabled)
+ $(meson_feature rubberband)
+ -Dsdl2=$(use gamepad || use sdl && echo enabled || echo disabled) #857156
+ $(meson_feature uchardet)
+ -Dvapoursynth=disabled # only available in overlays
+ $(meson_feature zimg)
+ $(meson_feature zlib)
+
+ # audio output
+ $(meson_feature alsa)
+ $(meson_feature coreaudio)
+ $(meson_feature jack)
+ $(meson_feature openal)
+ $(meson_feature pipewire)
+ $(meson_feature pulseaudio pulse)
+ $(meson_feature sdl sdl2-audio)
+ $(meson_feature sndio)
+
+ # video output
+ $(meson_feature X x11)
+ $(meson_feature aqua cocoa)
+ $(meson_feature drm)
+ $(meson_feature drm gbm)
+ $(meson_feature jpeg)
+ $(meson_feature libcaca caca)
+ $(meson_feature libplacebo)
+ $(meson_feature mmal rpi-mmal)
+ $(meson_feature sdl sdl2-video)
+ $(meson_feature sixel)
+ $(meson_feature wayland)
+ $(meson_feature xv)
+
+ -Dgl=$(use egl || use libmpv || use opengl || use raspberry-pi &&
+ echo enabled || echo disabled)
+ $(meson_feature egl)
+ $(mpv_feature_multi egl X egl-x11)
+ $(mpv_feature_multi egl drm egl-drm)
+ $(mpv_feature_multi egl wayland egl-wayland)
+ $(meson_feature libmpv plain-gl)
+ $(mpv_feature_multi opengl X gl-x11)
+ $(mpv_feature_multi opengl aqua gl-cocoa)
+ $(meson_feature raspberry-pi rpi)
+
+ $(meson_feature vulkan)
+ $(meson_feature vulkan shaderc)
+
+ # hardware decoding
+ $(meson_feature nvenc cuda-hwaccel)
+ $(meson_feature nvenc cuda-interop)
+
+ $(meson_feature vaapi)
+ $(mpv_feature_multi vaapi X vaapi-x11)
+ $(mpv_feature_multi 'vaapi X' egl vaapi-x-egl)
+ $(mpv_feature_multi 'vaapi egl' drm vaapi-drm)
+ $(mpv_feature_multi 'vaapi egl' wayland vaapi-wayland)
+
+ $(meson_feature vdpau)
+ $(mpv_feature_multi vdpau opengl vdpau-gl-x11)
+
+ $(mpv_feature_multi aqua opengl videotoolbox-gl)
+
+ # notable options left to automagic
+ #dmabuf-wayland: USE="drm wayland" + plus memfd_create support
+ #libplacebo-next: USE="libplacebo" + >=libplacebo-5.266
+ #vulkan-interop: USE="libplacebo vulkan" + ffmpeg-9999 currently
+ # TODO?: perhaps few more similar compound options should be left auto
+ )
+
+ has_version '>=media-libs/libplacebo-5.266' ||
+ ewarn "${PN}'s gpu-next video output requires ${_} to be used"
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install
+
+ if use lua; then
+ insinto /usr/share/${PN}
+ doins -r TOOLS/lua
+
+ if use cli && use lua_single_target_luajit; then
+ pax-mark -m "${ED}"/usr/bin/${PN}
+ fi
+ fi
+
+ if use tools; then
+ dobin TOOLS/{mpv_identify.sh,umpv}
+ newbin TOOLS/idet.sh mpv_idet.sh
+ python_fix_shebang "${ED}"/usr/bin/umpv
+ fi
+
+ if use cli; then
+ dodir /usr/share/doc/${PF}/html
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/html}/mpv.html || die
+ mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
+ fi
+
+ local GLOBIGNORE=*/*build*:*/*policy*
+ dodoc RELEASE_NOTES DOCS/*.{md,rst}
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "URL support with USE=lua" net-misc/yt-dlp
+}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2023-08-03 6:45 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2023-08-03 6:45 UTC (permalink / raw
To: gentoo-commits
commit: 709e2ffb08e3c920ab8f3e01b750fa3d6c1ad736
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 3 06:28:43 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Aug 3 06:43:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=709e2ffb
media-video/mpv: backport old sub select behavior in 0.36.0
Unsure if a 0.36.1 is coming, but if not it may be worth
it before consider stabling this one.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../mpv/files/mpv-0.36.0-sub-match-audio.patch | 35 ++++++++++++++++++++++
.../{mpv-0.36.0.ebuild => mpv-0.36.0-r1.ebuild} | 1 +
2 files changed, 36 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.36.0-sub-match-audio.patch b/media-video/mpv/files/mpv-0.36.0-sub-match-audio.patch
new file mode 100644
index 000000000000..d893b7b78c12
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.36.0-sub-match-audio.patch
@@ -0,0 +1,35 @@
+Backport to restore --subs-with-matching-audio back to "yes" by default
+like it was in <0.36 to spare users from confusion and/or needlessly
+adjusting their configs until next version.
+
+https://github.com/mpv-player/mpv/issues/11854
+https://github.com/mpv-player/mpv/pull/12015
+https://github.com/mpv-player/mpv/commit/a2dd78fbc0932a4f47edbe4c41fe268095075c88
+--- a/DOCS/man/options.rst
++++ b/DOCS/man/options.rst
+@@ -140,11 +140,11 @@ Track Selection
+
+ ``--subs-with-matching-audio=<yes|no>``
+ When autoselecting a subtitle track, select a full/non-forced one even if the selected
+- audio stream matches your preferred subtitle language (default: no).
++ audio stream matches your preferred subtitle language (default: yes).
+
+ ``--subs-fallback=<yes|default|no>``
+ When autoselecting a subtitle track, if no tracks match your preferred languages,
+- select a full track even if it doesn't match your preferred subtitle language (default: no).
++ select a full track even if it doesn't match your preferred subtitle language (default: default).
+ Setting this to `default` means that only streams flagged as `default` will be selected.
+
+ ``--subs-fallback-forced=<yes|no>``
+--- a/options/options.c
++++ b/options/options.c
+@@ -1040,7 +1040,8 @@ static const struct MPOpts mp_default_opts = {
+ [STREAM_SUB] = (char *[]){ "auto", NULL },
+ },
+ .stream_auto_sel = true,
+- .subs_with_matching_audio = false,
++ .subs_with_matching_audio = true,
++ .subs_fallback = 1,
+ .subs_fallback_forced = true,
+ .audio_display = 1,
+ .audio_output_format = 0, // AF_FORMAT_UNKNOWN
diff --git a/media-video/mpv/mpv-0.36.0.ebuild b/media-video/mpv/mpv-0.36.0-r1.ebuild
similarity index 99%
rename from media-video/mpv/mpv-0.36.0.ebuild
rename to media-video/mpv/mpv-0.36.0-r1.ebuild
index 1c181bdcbf33..5761951972fc 100644
--- a/media-video/mpv/mpv-0.36.0.ebuild
+++ b/media-video/mpv/mpv-0.36.0-r1.ebuild
@@ -135,6 +135,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.36.0-tests-odr.patch
+ "${FILESDIR}"/${PN}-0.36.0-sub-match-audio.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2023-11-09 15:49 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2023-11-09 15:49 UTC (permalink / raw
To: gentoo-commits
commit: 156ba410354704aaec994b031eeaadec4acb13f3
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 9 15:17:27 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Nov 9 15:17:27 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=156ba410
media-video/mpv: drop 0.35.1-r2
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
media-video/mpv/Manifest | 1 -
.../mpv/files/mpv-0.35.1-pipewire-0.3.75.patch | 86 ------
.../files/mpv-0.35.1-yt-dlp-edl-fragments.patch | 55 ----
media-video/mpv/mpv-0.35.1-r2.ebuild | 304 ---------------------
4 files changed, 446 deletions(-)
diff --git a/media-video/mpv/Manifest b/media-video/mpv/Manifest
index 2848b9c4a196..f2d8620668dc 100644
--- a/media-video/mpv/Manifest
+++ b/media-video/mpv/Manifest
@@ -1,2 +1 @@
-DIST mpv-0.35.1.tar.gz 3367913 BLAKE2B 706a2031a2ca973eb3a092ec7f62ba40ca4dfd78e3ffe5d6e432486b0018852b034152a21805be594054178ccb17856dafe2b860cddcc22d27df895d163871de SHA512 42f3564a9ed4d972d14b2c697b0163f06a8bb68a0606a86c34935181247c783e3cb62286b445799998def0919fb13fce8b8f6453f82652d5bfaea5929119127a
DIST mpv-0.36.0.tar.gz 3409178 BLAKE2B 7260c265f02918d4caf72d8d8ecc9d4ab9783d66d675bd683a2f9c228404ad978c6fe0aa50f486b5257740176bc26f8abde7eff20d89019d5f701ec78c7743e1 SHA512 51f455a425ea5aac47acb3582d0f958a34248a2290a8d6887d22bcb9385fe8d1ab5d7f09d5408cfecfb73c1ec85d1b8ec8958e45a4941d3f711a2e580187472f
diff --git a/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch b/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch
deleted file mode 100644
index 41392ab0839c..000000000000
--- a/media-video/mpv/files/mpv-0.35.1-pipewire-0.3.75.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Issue point that pipewire itself may apply a workaround for mpv,
-so this may or may not be necessary for future pipewire versions.
-Albeit the actual issue seems to be in mpv, so let's backport the
-fix which appears to work properly for old 0.35.1 as well.
-
-Note that (unrelated to this issue), 0.35.1 is still a bit flaky
-with pipewire. If have other issues with ao=pipewire you may want
-to consider mpv-9999 until next release, or use ao=pulse/alsa/jack
-to use through pipewire meanwhile.
-
-https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3374
-https://github.com/mpv-player/mpv/issues/11995
-
-https://github.com/mpv-player/mpv/pull/11996
-https://github.com/mpv-player/mpv/commit/007019a303a09b098a387f607ae149705b57dc1c
-From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
-Date: Sun, 23 Jul 2023 09:10:55 +0200
-Subject: [PATCH] ao_pipewire: for_each_sink: properly check termination
- condition
-
-Doing a pw_thread_loop_wait() without checking conditions is invalid.
-The thread loop could be signalled for other reasons and in this case
-the wait needs to continue.
-
-PipeWire added such additional signaling in
-commit 33be898130f0 ("thread-loop: signal when started").
-
-This meant that for_each_sink would return before the callbacks have
-fired and session_has_sink() would incorrectly return "false", failing
-the initialization of ao_pipewire.
-
-Fixes #11995
---- a/audio/out/ao_pipewire.c
-+++ b/audio/out/ao_pipewire.c
-@@ -337,6 +337,11 @@
- }
-
-
-+struct for_each_done_ctx {
-+ struct pw_thread_loop *loop;
-+ bool done;
-+};
-+
- static const struct pw_registry_events for_each_sink_registry_events = {
- .version = PW_VERSION_REGISTRY_EVENTS,
- .global = for_each_sink_registry_event_global,
-@@ -344,8 +349,9 @@
-
- static void for_each_sink_done(void *data, uint32_t it, int seq)
- {
-- struct pw_thread_loop *loop = data;
-- pw_thread_loop_signal(loop, false);
-+ struct for_each_done_ctx *ctx = data;
-+ ctx->done = true;
-+ pw_thread_loop_signal(ctx->loop, false);
- }
-
- static const struct pw_core_events for_each_sink_core_events = {
-@@ -359,12 +365,16 @@
- struct priv *priv = ao->priv;
- struct pw_registry *registry;
- struct spa_hook core_listener;
-+ struct for_each_done_ctx done_ctx = {
-+ .loop = priv->loop,
-+ .done = false,
-+ };
- int ret = -1;
-
- pw_thread_loop_lock(priv->loop);
-
- spa_zero(core_listener);
-- if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, priv->loop) < 0)
-+ if (pw_core_add_listener(priv->core, &core_listener, &for_each_sink_core_events, &done_ctx) < 0)
- goto unlock_loop;
-
- registry = pw_core_get_registry(priv->core, PW_VERSION_REGISTRY, 0);
-@@ -383,7 +393,8 @@
- if (pw_registry_add_listener(registry, ®istry_listener, &for_each_sink_registry_events, &revents_ctx) < 0)
- goto destroy_registry;
-
-- pw_thread_loop_wait(priv->loop);
-+ while (!done_ctx.done)
-+ pw_thread_loop_wait(priv->loop);
-
- spa_hook_remove(®istry_listener);
-
diff --git a/media-video/mpv/files/mpv-0.35.1-yt-dlp-edl-fragments.patch b/media-video/mpv/files/mpv-0.35.1-yt-dlp-edl-fragments.patch
deleted file mode 100644
index 058c608233d4..000000000000
--- a/media-video/mpv/files/mpv-0.35.1-yt-dlp-edl-fragments.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-https://bugs.gentoo.org/899956
-https://github.com/mpv-player/mpv/pull/11398
-
-From 985655ebfd77ceddc44d76f8cc6dc446002f34ee Mon Sep 17 00:00:00 2001
-From: Christoph Heinrich <christoph.heinrich@student.tugraz.at>
-Date: Fri, 3 Mar 2023 00:45:45 +0100
-Subject: [PATCH 1/2] ytdl_hook: init fragment requires other fragments
-
-With dash the first fragment was always considered an init fragment if
-there wasn't a duration. However that only makes sense when there are
-also other fragments, so check if there are other fragments in addition
-to the lack of a duration.
---- a/player/lua/ytdl_hook.lua
-+++ b/player/lua/ytdl_hook.lua
-@@ -297,7 +297,7 @@ local function edl_track_joined(fragments, protocol, is_live, base)
- local args = ""
-
- -- assume MP4 DASH initialization segment
-- if not fragments[1].duration then
-+ if not fragments[1].duration and #fragments > 1 then
- msg.debug("Using init segment")
- args = args .. ",init=" .. edl_escape(join_url(base, fragments[1]))
- offset = 2
-
-From a5961ad096b1361a12f836c8b170fc748f46962a Mon Sep 17 00:00:00 2001
-From: Christoph Heinrich <christoph.heinrich@student.tugraz.at>
-Date: Fri, 3 Mar 2023 00:50:58 +0100
-Subject: [PATCH 2/2] ytdl_hook: only log error when no fallback url available
-
-An error indicates that something doesn't work, but as long as a
-safe url is available, playback is still expected to work.
-
-Thus reduce logging level of MP4 DASH without fragments message and
-add a new error message for when there is no safe url available either.
-
-Also adds a missing space.
---- a/player/lua/ytdl_hook.lua
-+++ b/player/lua/ytdl_hook.lua
-@@ -309,7 +309,7 @@ local function edl_track_joined(fragments, protocol, is_live, base)
- -- if not available in all, give up.
- for i = offset, #fragments do
- if not fragments[i].duration then
-- msg.error("EDL doesn't support fragments" ..
-+ msg.verbose("EDL doesn't support fragments " ..
- "without duration with MP4 DASH")
- return nil
- end
-@@ -423,6 +423,7 @@ local function formats_to_edl(json, formats, use_all_formats)
- track.protocol, json.is_live,
- track.fragment_base_url)
- if not edl_track and not url_is_safe(track.url) then
-+ msg.error("No safe URL or supported fragmented stream available")
- return nil
- end
-
diff --git a/media-video/mpv/mpv-0.35.1-r2.ebuild b/media-video/mpv/mpv-0.35.1-r2.ebuild
deleted file mode 100644
index f41aea9d7e6f..000000000000
--- a/media-video/mpv/mpv-0.35.1-r2.ebuild
+++ /dev/null
@@ -1,304 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-LUA_COMPAT=( lua5-1 luajit )
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo flag-o-matic lua-single meson optfeature pax-utils python-single-r1 xdg
-
-if [[ ${PV} == 9999 ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/mpv-player/mpv.git"
-else
- SRC_URI="https://github.com/mpv-player/mpv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="amd64 ~arm ~arm64 ~hppa ~loong ppc ppc64 ~riscv x86 ~amd64-linux"
-fi
-
-DESCRIPTION="Media player for the command line"
-HOMEPAGE="https://mpv.io/"
-
-LICENSE="LGPL-2.1+ GPL-2+ BSD ISC MIT" #506946
-SLOT="0/2" # soname
-IUSE="
- +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb
- dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv
- +libplacebo +lua mmal nvenc openal opengl pipewire pulseaudio
- raspberry-pi rubberband sdl selinux sixel sndio test tools +uchardet
- vaapi vdpau vulkan wayland +xv zimg zlib"
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- || ( cli libmpv )
- egl? ( || ( X drm wayland ) )
- libplacebo? ( || ( egl opengl vulkan ) )
- lua? ( ${LUA_REQUIRED_USE} )
- nvenc? ( || ( egl opengl vulkan ) )
- opengl? ( || ( X aqua ) )
- test? ( cli )
- tools? ( cli )
- uchardet? ( iconv )
- vaapi? (
- || ( X egl libplacebo wayland )
- wayland? ( drm )
- )
- vdpau? ( X )
- vulkan? ( || ( X wayland ) libplacebo )
- xv? ( X )"
-RESTRICT="!test? ( test )"
-
-# raspberry-pi: default to -bin given non-bin is known broken (bug #893422)
-COMMON_DEPEND="
- media-libs/libass:=[fontconfig]
- media-video/ffmpeg:=[encode,threads,vaapi?,vdpau?]
- X? (
- x11-libs/libX11
- x11-libs/libXScrnSaver
- x11-libs/libXext
- x11-libs/libXinerama
- x11-libs/libXpresent
- x11-libs/libXrandr
- xv? ( x11-libs/libXv )
- )
- alsa? ( media-libs/alsa-lib )
- archive? ( app-arch/libarchive:= )
- bluray? ( media-libs/libbluray:= )
- cdda? (
- dev-libs/libcdio-paranoia:=
- dev-libs/libcdio:=
- )
- drm? (
- media-libs/mesa[gbm(+)]
- x11-libs/libdrm
- )
- dvd? (
- media-libs/libdvdnav
- media-libs/libdvdread:=
- )
- egl? ( media-libs/libglvnd )
- gamepad? ( media-libs/libsdl2[joystick] )
- iconv? (
- virtual/libiconv
- uchardet? ( app-i18n/uchardet )
- )
- jack? ( virtual/jack )
- javascript? ( dev-lang/mujs:= )
- jpeg? ( media-libs/libjpeg-turbo:= )
- lcms? ( media-libs/lcms:2 )
- libcaca? ( media-libs/libcaca )
- libplacebo? (
- >=media-libs/libplacebo-4.202:=[opengl?,vulkan?]
- <media-libs/libplacebo-6
- egl? ( media-libs/libplacebo[opengl] )
- )
- lua? ( ${LUA_DEPS} )
- openal? ( media-libs/openal )
- opengl? ( media-libs/libglvnd[X?] )
- pipewire? ( media-video/pipewire:= )
- pulseaudio? ( media-libs/libpulse )
- raspberry-pi? (
- || (
- media-libs/raspberrypi-userland-bin
- media-libs/raspberrypi-userland
- )
- )
- rubberband? ( media-libs/rubberband )
- sdl? ( media-libs/libsdl2[sound,threads,video] )
- sixel? ( media-libs/libsixel )
- sndio? ( media-sound/sndio:= )
- vaapi? ( media-libs/libva:=[X?,drm(+)?,wayland?] )
- vdpau? ( x11-libs/libvdpau )
- vulkan? (
- media-libs/shaderc
- media-libs/vulkan-loader[X?,wayland?]
- )
- wayland? (
- dev-libs/wayland
- dev-libs/wayland-protocols
- x11-libs/libxkbcommon
- )
- zimg? ( media-libs/zimg )
- zlib? ( sys-libs/zlib:= )"
-RDEPEND="
- ${COMMON_DEPEND}
- selinux? ( sec-policy/selinux-mplayer )
- tools? ( ${PYTHON_DEPS} )"
-DEPEND="
- ${COMMON_DEPEND}
- X? ( x11-base/xorg-proto )
- dvb? ( virtual/linuxtv-dvb-headers )
- nvenc? ( media-libs/nv-codec-headers )
- wayland? ( dev-libs/wayland-protocols )"
-BDEPEND="
- ${PYTHON_DEPS}
- virtual/pkgconfig
- cli? ( dev-python/docutils )
- wayland? ( dev-util/wayland-scanner )"
-
-PATCHES=(
- "${FILESDIR}"/${P}-yt-dlp-edl-fragments.patch
- "${FILESDIR}"/${P}-pipewire-0.3.75.patch
-)
-
-pkg_setup() {
- use lua && lua-single_pkg_setup
- python-single-r1_pkg_setup
-}
-
-src_configure() {
- if use !debug; then
- if use test; then
- einfo "Skipping -DNDEBUG due to USE=test"
- else
- append-cppflags -DNDEBUG # treated specially
- fi
- fi
-
- mpv_feature_multi() {
- local use set
- for use in ${1} ${2}; do
- use ${use} || set=disabled
- done
- echo -D${3-${2}}=${set-enabled}
- }
-
- local emesonargs=(
- $(meson_use cli cplayer)
- $(meson_use libmpv)
- $(meson_use test tests)
-
- $(meson_feature cli html-build)
- $(meson_feature cli manpage-build)
- -Dpdf-build=disabled
-
- -Dbuild-date=false
-
- # misc options
- $(meson_feature archive libarchive)
- $(meson_feature bluray libbluray)
- $(meson_feature cdda)
- -Dcplugins=enabled
- $(meson_feature dvb dvbin)
- $(meson_feature dvd dvdnav)
- $(meson_feature gamepad sdl2-gamepad)
- $(meson_feature iconv)
- $(meson_feature javascript)
- -Dlibavdevice=enabled
- $(meson_feature lcms lcms2)
- -Dlua=$(usex lua "${ELUA}" disabled)
- $(meson_feature rubberband)
- -Dsdl2=$(use gamepad || use sdl && echo enabled || echo disabled) #857156
- $(meson_feature uchardet)
- -Dvapoursynth=disabled # only available in overlays
- $(meson_feature zimg)
- $(meson_feature zlib)
-
- # audio output
- $(meson_feature alsa)
- $(meson_feature coreaudio)
- $(meson_feature jack)
- $(meson_feature openal)
- $(meson_feature pipewire)
- $(meson_feature pulseaudio pulse)
- $(meson_feature sdl sdl2-audio)
- $(meson_feature sndio)
-
- # video output
- $(meson_feature X x11)
- $(meson_feature aqua cocoa)
- $(meson_feature drm)
- $(meson_feature drm gbm)
- $(meson_feature jpeg)
- $(meson_feature libcaca caca)
- $(meson_feature libplacebo)
- $(meson_feature mmal rpi-mmal)
- $(meson_feature sdl sdl2-video)
- $(meson_feature sixel)
- $(meson_feature wayland)
- $(meson_feature xv)
-
- -Dgl=$(use egl || use libmpv || use opengl || use raspberry-pi &&
- echo enabled || echo disabled)
- $(meson_feature egl)
- $(mpv_feature_multi egl X egl-x11)
- $(mpv_feature_multi egl drm egl-drm)
- $(mpv_feature_multi egl wayland egl-wayland)
- $(meson_feature libmpv plain-gl)
- $(mpv_feature_multi opengl X gl-x11)
- $(mpv_feature_multi opengl aqua gl-cocoa)
- $(meson_feature raspberry-pi rpi)
-
- $(meson_feature vulkan)
- $(meson_feature vulkan shaderc)
-
- # hardware decoding
- $(meson_feature nvenc cuda-hwaccel)
- $(meson_feature nvenc cuda-interop)
-
- $(meson_feature vaapi)
- $(mpv_feature_multi vaapi X vaapi-x11)
- $(mpv_feature_multi 'vaapi X' egl vaapi-x-egl)
- $(mpv_feature_multi 'vaapi egl' drm vaapi-drm)
- $(mpv_feature_multi 'vaapi egl' wayland vaapi-wayland)
-
- $(meson_feature vdpau)
- $(mpv_feature_multi vdpau opengl vdpau-gl-x11)
-
- $(mpv_feature_multi aqua opengl videotoolbox-gl)
- )
-
- meson_src_configure
-}
-
-src_test() {
- # https://github.com/mpv-player/mpv/blob/master/DOCS/man/options.rst#debugging
- local tests=($("${BUILD_DIR}"/mpv --no-config --unittest=help | tail -n +2; assert))
- (( ${#tests[@]} )) || die "failed to gather any tests"
-
- local skip=(
- all-simple
-
- # fails on non-issue minor inconsistencies (bug #888639)
- img_format
- repack_sws
- )
-
- local test
- for test in "${tests[@]}"; do
- [[ ${test} == @($(IFS='|'; echo "${skip[*]}")) ]] ||
- edo "${BUILD_DIR}"/mpv -v --no-config --unittest="${test}"
- done
-}
-
-src_install() {
- meson_src_install
-
- if use lua; then
- insinto /usr/share/${PN}
- doins -r TOOLS/lua
-
- if use cli && use lua_single_target_luajit; then
- pax-mark -m "${ED}"/usr/bin/${PN}
- fi
- fi
-
- if use tools; then
- dobin TOOLS/{mpv_identify.sh,umpv}
- newbin TOOLS/idet.sh mpv_idet.sh
- python_fix_shebang "${ED}"/usr/bin/umpv
- fi
-
- if use cli; then
- dodir /usr/share/doc/${PF}/html
- mv "${ED}"/usr/share/doc/{mpv,${PF}/html}/mpv.html || die
- mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
- fi
-
- local GLOBIGNORE=*/*build*:*/*policy*
- dodoc RELEASE_NOTES DOCS/*.{md,rst}
-}
-
-pkg_postinst() {
- xdg_pkg_postinst
-
- optfeature "URL support with USE=lua" net-misc/yt-dlp
-}
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/
@ 2024-04-05 3:13 Ionen Wolkens
0 siblings, 0 replies; 17+ messages in thread
From: Ionen Wolkens @ 2024-04-05 3:13 UTC (permalink / raw
To: gentoo-commits
commit: d57dc127880c0528ac9f1da04cd86ffef5425887
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 5 03:05:29 2024 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Apr 5 03:11:50 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d57dc127
media-video/mpv: backport build fix for ffmpeg-7.0
Not that ffmpeg-7.0 is in tree yet (just released), and when it
is it'll start out masked.
Odds are that mpv-0.38 will release before ffmpeg-7.0 is unmasked,
but it'll be one less issue to hit for those testing it early.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch | 45 ++++++++++++++++++++++++++
media-video/mpv/mpv-0.37.0-r1.ebuild | 1 +
2 files changed, 46 insertions(+)
diff --git a/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch b/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch
new file mode 100644
index 000000000000..3ac8d9b7b8dc
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.37.0-ffmpeg7.patch
@@ -0,0 +1,45 @@
+https://github.com/mpv-player/mpv/pull/13659
+From: Dudemanguy <random342@airmail.cc>
+Date: Thu, 7 Mar 2024 13:42:25 -0600
+Subject: [PATCH 1/2] ad_spdif: handle const buf pointee in avio_alloc_context
+
+ffmpeg recently changed this field to be const which causes our CI to
+fail on newer versions.
+
+See: https://github.com/FFmpeg/FFmpeg/commit/2a68d945cd74265bb71c3d38b7a2e7f7d7e87be5
+--- a/audio/decode/ad_spdif.c
++++ b/audio/decode/ad_spdif.c
+@@ -59,7 +59,11 @@ struct spdifContext {
+ struct mp_decoder public;
+ };
+
++#if LIBAVCODEC_VERSION_MAJOR < 61
+ static int write_packet(void *p, uint8_t *buf, int buf_size)
++#else
++static int write_packet(void *p, const uint8_t *buf, int buf_size)
++#endif
+ {
+ struct spdifContext *ctx = p;
+
+
+From 7f9eabfb023611565db8b6cce9a3473a6eb6c731 Mon Sep 17 00:00:00 2001
+From: Dudemanguy <random342@airmail.cc>
+Date: Thu, 7 Mar 2024 14:12:15 -0600
+Subject: [PATCH 2/2] filters/f_lavfi: handle removed
+ AV_OPT_TYPE_CHANNEL_LAYOUT
+
+See: https://github.com/FFmpeg/FFmpeg/commit/65ddc74988245a01421a63c5cffa4d900c47117c
+--- a/filters/f_lavfi.c
++++ b/filters/f_lavfi.c
+@@ -1034,7 +1034,11 @@ static const char *get_avopt_type_name(enum AVOptionType type)
+ case AV_OPT_TYPE_VIDEO_RATE: return "fps";
+ case AV_OPT_TYPE_DURATION: return "duration";
+ case AV_OPT_TYPE_COLOR: return "color";
++#if LIBAVUTIL_VERSION_MAJOR < 59
+ case AV_OPT_TYPE_CHANNEL_LAYOUT: return "channellayout";
++#else
++ case AV_OPT_TYPE_CHLAYOUT: return "channellayout";
++#endif
+ case AV_OPT_TYPE_BOOL: return "bool";
+ case AV_OPT_TYPE_CONST: // fallthrough
+ default:
diff --git a/media-video/mpv/mpv-0.37.0-r1.ebuild b/media-video/mpv/mpv-0.37.0-r1.ebuild
index 9ac7b7e545b7..a0cb7dee8450 100644
--- a/media-video/mpv/mpv-0.37.0-r1.ebuild
+++ b/media-video/mpv/mpv-0.37.0-r1.ebuild
@@ -129,6 +129,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-0.37.0-drm-fix.patch
+ "${FILESDIR}"/${PN}-0.37.0-ffmpeg7.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 17+ messages in thread
end of thread, other threads:[~2024-04-05 3:13 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-12 18:47 [gentoo-commits] repo/gentoo:master commit in: media-video/mpv/, media-video/mpv/files/ Patrice Clement
-- strict thread matches above, loose matches on Subject: below --
2024-04-05 3:13 Ionen Wolkens
2023-11-09 15:49 Ionen Wolkens
2023-08-03 6:45 Ionen Wolkens
2023-07-23 19:09 Ionen Wolkens
2023-07-23 15:22 Ionen Wolkens
2022-11-11 0:47 Ionen Wolkens
2022-07-09 2:41 Sam James
2018-02-05 22:21 Thomas Deutschmann
2017-12-17 3:30 Lars Wendler
2017-02-04 21:25 David Seifert
2016-12-28 0:18 Patrice Clement
2016-07-25 13:04 Patrice Clement
2016-04-25 7:45 Patrice Clement
2016-03-10 21:51 Patrice Clement
2016-01-21 9:16 Patrice Clement
2015-12-28 13:27 Ian Delaney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox