Bug 278806 - multimedia/mpv: Fix yt-dlp option
Summary: multimedia/mpv: Fix yt-dlp option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Christos Margiolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-06 03:03 UTC by Sean Farley
Modified: 2025-04-16 09:18 UTC (History)
4 users (show)

See Also:
makc: maintainer-feedback+


Attachments
Fix YTDLP option (935 bytes, patch)
2024-05-06 03:03 UTC, Sean Farley
no flags Details | Diff
Fix YTDLP option (1.43 KB, patch)
2025-04-15 04:35 UTC, Sean Farley
no flags Details | Diff
Fix YTDLP option (1.40 KB, patch)
2025-04-15 04:44 UTC, Sean Farley
no flags Details | Diff
Fix YTDLP option (1.35 KB, patch)
2025-04-16 05:41 UTC, Sean Farley
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Farley freebsd_committer freebsd_triage 2024-05-06 03:03:08 UTC
Created attachment 250483 [details]
Fix YTDLP option

While mpv does have a YTDLP option as a default option, it is not being included in the available options.  I am not sure if this patch is the best way to fix it, so alter this patch as needed.  It adds YTDLP to OPTIONS_DEFINE and adds a description for the option.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-06 08:06:39 UTC
Look correct, but I'm not in multimedia@ - can't approve.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-05-06 08:09:00 UTC
Add PORTREVISION - changed default option.
Comment 3 Piotr Smyrak 2025-04-14 20:11:56 UTC
I have stumbled upon the same issue, and made almost exactly identical patch for the port. One suggestion from my part would be to enforce LUA option dependency via YTDLP_IMPLIES since otherwise the scripting support indispensable for YT playback is not compiled in.
Comment 4 Christos Margiolis freebsd_committer freebsd_triage 2025-04-14 20:12:57 UTC
(In reply to Piotr Smyrak from comment #3)
I'm seconding Piotr. Also please rebase the patch on top of main, and bump PORTREVISION if needed. I will commit it right away once ready.
Comment 5 Sean Farley freebsd_committer freebsd_triage 2025-04-15 04:35:31 UTC
Created attachment 259568 [details]
Fix YTDLP option

Here is an updated patch.  I used _PREVENTS (LUA_NONE) to allow either Lua or LuaJIT to be configured.
Comment 6 Sean Farley freebsd_committer freebsd_triage 2025-04-15 04:36:28 UTC
(In reply to Sean Farley from comment #5)

But I need to fix it to make portlint happy...
Comment 7 Sean Farley freebsd_committer freebsd_triage 2025-04-15 04:44:51 UTC
Created attachment 259569 [details]
Fix YTDLP option

New and improved patch.  I am not quite sure how to satisfy portlint for this warning, but it configures and builds correctly under poudriere.

WARN: Makefile: LUA_NONE is listed in OPTIONS_DEFINE, but no PORT_OPTIONS:MLUA_NONE appears.
0 fatal errors and 1 warning found.
Comment 8 Max Brazhnikov freebsd_committer freebsd_triage 2025-04-15 09:01:23 UTC
(In reply to Sean Farley from comment #7)
Considering Lua is more general feature, which could be required not by YTDLP only, I would invert the logic: selecting LUA_NONE should prevent YTDLP from being enabled:
LUA_NONE_PREVENTS=	YTDLP
LUA_PREVENTS_MSG=	Lua scripting is required for YTDLP

You may ignore portlint warning. Apparently portlint lacks ability to handle grouped options.
Comment 9 Sean Farley freebsd_committer freebsd_triage 2025-04-16 05:41:35 UTC
Created attachment 259599 [details]
Fix YTDLP option

I went with makc@'s suggestion and updated the patch.  How does this look?
Comment 10 Christos Margiolis freebsd_committer freebsd_triage 2025-04-16 09:03:33 UTC
If everything works properly now I can commit the patch. Let me know.
Comment 11 Max Brazhnikov freebsd_committer freebsd_triage 2025-04-16 09:08:28 UTC
Looks good, please commit!
Comment 12 commit-hook freebsd_committer freebsd_triage 2025-04-16 09:17:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=46f994464dd298e42095c20540259d8cd457dcd3

commit 46f994464dd298e42095c20540259d8cd457dcd3
Author:     Sean Farley <scf@FreeBSD.org>
AuthorDate: 2025-04-16 09:14:31 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-04-16 09:17:24 +0000

    multimedia/mpv: Fix YTDLP option

    PR:             278806
    Reviewed by:    christos, makc, Piotr Smyrak <ps.ports@smyrak.com>

 multimedia/mpv/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
Comment 13 Christos Margiolis freebsd_committer freebsd_triage 2025-04-16 09:18:38 UTC
Thank you!