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.
Look correct, but I'm not in multimedia@ - can't approve.
Add PORTREVISION - changed default option.
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.
(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.
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.
(In reply to Sean Farley from comment #5) But I need to fix it to make portlint happy...
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.
(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.
Created attachment 259599 [details] Fix YTDLP option I went with makc@'s suggestion and updated the patch. How does this look?
If everything works properly now I can commit the patch. Let me know.
Looks good, please commit!
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(-)
Thank you!