aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/mpv/APKBUILD34
-rw-r--r--community/mpv/placebo_upstream_api_changes.patch84
-rw-r--r--community/mpv/yt-dlp.patch139
3 files changed, 7 insertions, 250 deletions
diff --git a/community/mpv/APKBUILD b/community/mpv/APKBUILD
index 82cc6f2e58f..4a36d9fb283 100644
--- a/community/mpv/APKBUILD
+++ b/community/mpv/APKBUILD
@@ -4,12 +4,12 @@
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mpv
-pkgver=0.33.1
-pkgrel=6
+pkgver=0.34.0
+pkgrel=0
pkgdesc="Video player based on MPlayer/mplayer2"
url="https://mpv.io/"
-arch="all"
license="GPL-2.0-or-later"
+arch="all"
makedepends="
alsa-lib-dev
cmocka-dev
@@ -58,13 +58,10 @@ subpackages="
$pkgname-doc
$pkgname-libs
$pkgname-dev
- $pkgname-bash-completion:bashcomp:noarch
- $pkgname-zsh-completion:zshcomp:noarch
- "
-source="mpv-$pkgver.tar.gz::https://github.com/mpv-player/mpv/archive/v$pkgver.tar.gz
- placebo_upstream_api_changes.patch
- yt-dlp.patch
+ $pkgname-bash-completion
+ $pkgname-zsh-completion
"
+source="https://github.com/mpv-player/mpv/archive/v$pkgver/mpv-$pkgver.tar.gz"
# secfixes:
# 0.27.0-r3:
@@ -115,23 +112,6 @@ package() {
"$pkgdir"/usr/share/doc/mpv/examples/
}
-# NOTE(maxice8): Remove these 2 functions once the default functions as defined
-# in https://gitlab.alpinelinux.org/alpine/abuild/merge_requests/16 are merged
-bashcomp() {
- pkgdesc="Bash completions for $pkgname"
- install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
- amove usr/share/bash-completion
-}
-
-zshcomp() {
- pkgdesc="Zsh completions for $pkgname"
- install_if="$pkgname=$pkgver-r$pkgrel zsh"
-
- amove usr/share/zsh/site-functions
-}
-
sha512sums="
-99d6c40d18c5cf83814b44ec6d8eade229800c5b51a734c9bbe831c3aeb95f8931124c94f6ae2360ffff62053c163bc3c55b254df021e005b350ebc3df7e952b mpv-0.33.1.tar.gz
-92833a516fe995289a4de40703bdf57925d86d644404a4c37b6455d952605a83872898575ae0b44432a1eeb178476079ac53ccb5487cbb9b2704fbcd460fa4ad placebo_upstream_api_changes.patch
-400f3f2aca612b76ca49214a5dd2e5c540df9691cfc663c48d0b104fb547931925232bc5f4c5a5c9aa87747b0122dc22f188122a98f41df6da250b787e323e1d yt-dlp.patch
+9935a20730dbb8fbf4cd11fe2fc38b1981882fc85c93046837a9b99cae089b3f710e6af7d7ea977c177de5479aa24e413f76cab9b995e8b7e66d6b77c524fdf0 mpv-0.34.0.tar.gz
"
diff --git a/community/mpv/placebo_upstream_api_changes.patch b/community/mpv/placebo_upstream_api_changes.patch
deleted file mode 100644
index b684df8c9fe..00000000000
--- a/community/mpv/placebo_upstream_api_changes.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 7c4465cefb27d4e0d07535d368febdf77b579566 Mon Sep 17 00:00:00 2001
-From: Niklas Haas <git@haasn.xyz>
-Date: Thu, 3 Dec 2020 08:25:23 +0100
-Subject: [PATCH] vo_gpu: placebo: update for upstream API changes
-
-The concept of sample/address modes was moved from `pl_tex` to
-`pl_desc_binding`.
-
-The `pl_tex_blit()` function also underwent an API change.
----
- video/out/placebo/ra_pl.c | 31 +++++++++++++++++++++++++++++--
- 1 file changed, 29 insertions(+), 2 deletions(-)
-
-diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c
-index f8df590511d..8244acff261 100644
---- a/video/out/placebo/ra_pl.c
-+++ b/video/out/placebo/ra_pl.c
-@@ -144,8 +144,14 @@ bool mppl_wrap_tex(struct ra *ra, const struct pl_tex *pltex,
- .blit_dst = pltex->params.blit_dst,
- .host_mutable = pltex->params.host_writable,
- .downloadable = pltex->params.host_readable,
-+#if PL_API_VER >= 103
-+ // These don't exist upstream, so just pick something reasonable
-+ .src_linear = pltex->params.format->caps & PL_FMT_CAP_LINEAR,
-+ .src_repeat = false,
-+#else
- .src_linear = pltex->params.sample_mode == PL_TEX_SAMPLE_LINEAR,
- .src_repeat = pltex->params.address_mode == PL_TEX_ADDRESS_REPEAT,
-+#endif
- },
- .priv = (void *) pltex,
- };
-@@ -195,10 +201,12 @@ static struct ra_tex *tex_create_pl(struct ra *ra,
- .blit_dst = params->blit_dst || params->render_dst,
- .host_writable = params->host_mutable,
- .host_readable = params->downloadable,
-+#if PL_API_VER < 103
- .sample_mode = params->src_linear ? PL_TEX_SAMPLE_LINEAR
- : PL_TEX_SAMPLE_NEAREST,
- .address_mode = params->src_repeat ? PL_TEX_ADDRESS_REPEAT
- : PL_TEX_ADDRESS_CLAMP,
-+#endif
- .initial_data = params->initial_data,
- });
-
-@@ -399,7 +407,18 @@ static void blit_pl(struct ra *ra, struct ra_tex *dst, struct ra_tex *src,
- pldst.y1 = MPMIN(MPMAX(dst_rc->y1, 0), dst->params.h);
- }
-
-+#if PL_API_VER >= 103
-+ pl_tex_blit(get_gpu(ra), &(struct pl_tex_blit_params) {
-+ .src = src->priv,
-+ .dst = dst->priv,
-+ .src_rc = plsrc,
-+ .dst_rc = pldst,
-+ .sample_mode = src->params.src_linear ? PL_TEX_SAMPLE_LINEAR
-+ : PL_TEX_SAMPLE_NEAREST,
-+ });
-+#else
- pl_tex_blit(get_gpu(ra), dst->priv, src->priv, pldst, plsrc);
-+#endif
- }
-
- static const enum pl_var_type var_type[RA_VARTYPE_COUNT] = {
-@@ -627,9 +646,17 @@ static void renderpass_run_pl(struct ra *ra,
- struct pl_desc_binding bind;
- switch (inp->type) {
- case RA_VARTYPE_TEX:
-- case RA_VARTYPE_IMG_W:
-- bind.object = (* (struct ra_tex **) val->data)->priv;
-+ case RA_VARTYPE_IMG_W: {
-+ struct ra_tex *tex = *((struct ra_tex **) val->data);
-+ bind.object = tex->priv;
-+#if PL_API_VER >= 103
-+ bind.sample_mode = tex->params.src_linear ? PL_TEX_SAMPLE_LINEAR
-+ : PL_TEX_SAMPLE_NEAREST;
-+ bind.address_mode = tex->params.src_repeat ? PL_TEX_ADDRESS_REPEAT
-+ : PL_TEX_ADDRESS_CLAMP;
-+#endif
- break;
-+ }
- case RA_VARTYPE_BUF_RO:
- case RA_VARTYPE_BUF_RW:
- bind.object = (* (struct ra_buf **) val->data)->priv;
diff --git a/community/mpv/yt-dlp.patch b/community/mpv/yt-dlp.patch
deleted file mode 100644
index 80b8a1bd270..00000000000
--- a/community/mpv/yt-dlp.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From d1c92bfd79ef81ac804fcc20aee2ed24e8d587aa Mon Sep 17 00:00:00 2001
-From: Guido Cella <guido@guidocella.xyz>
-Date: Fri, 17 Sep 2021 09:37:09 +0200
-Subject: [PATCH] ytdl_hook.lua: search for yt-dlp by default
-
-Because youtube-dl is inactive and the yt-dlp fork is becoming more
-popular, make mpv use yt-dlp without any extra configuration.
-
-yt-dlp is ordered before youtube-dl because it's more obscure, so users
-who have yt-dlp installed are more likely to want to use it rather than
-youtube-dl.
-
-Fixes #9208.
----
- DOCS/man/options.rst | 8 +++--
- player/lua/ytdl_hook.lua | 66 +++++++++++++++++++++++++++++-----------
- 2 files changed, 53 insertions(+), 21 deletions(-)
-
-diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
-index c216f88edef..34d29db083a 100644
---- a/DOCS/man/options.rst
-+++ b/DOCS/man/options.rst
-@@ -995,9 +995,11 @@ Program Behavior
- no). It's disabled ("no") by default for performance reasons.
-
- ``ytdl_path=youtube-dl``
-- Configure path to youtube-dl executable or a compatible fork's.
-- The default "youtube-dl" looks for the executable in PATH. In a Windows
-- environment the suffix extension ".exe" is always appended.
-+ Configure paths to youtube-dl's executable or a compatible fork's. The
-+ paths should be separated by : on Unix and ; on Windows. mpv looks in
-+ order for the configured paths in PATH and in mpv's config directory.
-+ The defaults are "yt-dlp", "yt-dlp_x86" and "youtube-dl". On Windows
-+ the suffix extension ".exe" is always appended.
-
- .. admonition:: Why do the option names mix ``_`` and ``-``?
-
-diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
-index b9cb04645e4..27d39afb753 100644
---- a/player/lua/ytdl_hook.lua
-+++ b/player/lua/ytdl_hook.lua
-@@ -8,11 +8,12 @@ local o = {
- use_manifests = false,
- all_formats = false,
- force_all_formats = true,
-- ytdl_path = "youtube-dl",
-+ ytdl_path = "",
- }
-
- local ytdl = {
-- path = nil,
-+ path = "",
-+ paths_to_search = {"yt-dlp", "yt-dlp_x86", "youtube-dl"},
- searched = false,
- blacklisted = {}
- }
-@@ -88,7 +89,13 @@ local function map_codec_to_mpv(codec)
- return nil
- end
-
-+local function platform_is_windows()
-+ return package.config:sub(1,1) == "\\"
-+end
-+
- local function exec(args)
-+ msg.debug("Running: " .. table.concat(args, " "))
-+
- local ret = mp.command_native({name = "subprocess",
- args = args,
- capture_stdout = true,
-@@ -718,20 +725,6 @@ end
- function run_ytdl_hook(url)
- local start_time = os.clock()
-
-- -- check for youtube-dl in mpv's config dir
-- if not (ytdl.searched) then
-- local exesuf = (package.config:sub(1,1) == '\\') and '.exe' or ''
-- local ytdl_mcd = mp.find_config_file(o.ytdl_path .. exesuf)
-- if ytdl_mcd == nil then
-- msg.verbose("No youtube-dl found with path "..o.ytdl_path..exesuf.." in config directories")
-- ytdl.path = o.ytdl_path
-- else
-- msg.verbose("found youtube-dl at: " .. ytdl_mcd)
-- ytdl.path = ytdl_mcd
-- end
-- ytdl.searched = true
-- end
--
- -- strip ytdl://
- if (url:find("ytdl://") == 1) then
- url = url:sub(8)
-@@ -786,8 +779,45 @@ function run_ytdl_hook(url)
- end
- table.insert(command, "--")
- table.insert(command, url)
-- msg.debug("Running: " .. table.concat(command,' '))
-- local es, json, result, aborted = exec(command)
-+
-+ local es, json, result, aborted
-+ if ytdl.searched then
-+ es, json, result, aborted = exec(command)
-+ else
-+ local separator = platform_is_windows() and ";" or ":"
-+ if o.ytdl_path:match("[^" .. separator .. "]") then
-+ ytdl.paths_to_search = {}
-+ for path in o.ytdl_path:gmatch("[^" .. separator .. "]+") do
-+ table.insert(ytdl.paths_to_search, path)
-+ end
-+ end
-+
-+ for _, path in pairs(ytdl.paths_to_search) do
-+ -- search for youtube-dl in mpv's config dir
-+ local exesuf = platform_is_windows() and ".exe" or ""
-+ local ytdl_cmd = mp.find_config_file(path .. exesuf)
-+ if ytdl_cmd then
-+ msg.verbose("Found youtube-dl at: " .. ytdl_cmd)
-+ ytdl.path = ytdl_cmd
-+ command[1] = ytdl.path
-+ es, json, result, aborted = exec(command)
-+ break
-+ else
-+ msg.verbose("No youtube-dl found with path " .. path .. exesuf .. " in config directories")
-+ command[1] = path
-+ es, json, result, aborted = exec(command)
-+ if result.error_string == "init" then
-+ msg.verbose("youtube-dl with path " .. path .. exesuf .. " not found in PATH or not enough permissions")
-+ else
-+ msg.verbose("Found youtube-dl with path " .. path .. exesuf .. " in PATH")
-+ ytdl.path = path
-+ break
-+ end
-+ end
-+ end
-+
-+ ytdl.searched = true
-+ end
-
- if aborted then
- return