media-video/mpv: strip ffnvcodec from mpv.pc for now

Dropped a note in #mpv-devel and seems being included is only because
it does not make the distinction between build-only and runtime. Would
need a fix like libplacebo did for xxhash.

For now, just force drop it here. The sed is re-used from libplacebo
for (another) similar issue, and should be proven to work fine by now.

Revbump is not super worth it, but mpv does not take long to build.

Closes: https://bugs.gentoo.org/971646
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2026-03-28 22:52:43 -04:00
parent e5a51edcd6
commit 0be221509d
2 changed files with 12 additions and 0 deletions
@@ -243,6 +243,12 @@ src_install() {
mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
fi
# prevent build-only ffnvcodec from leaking into the .pc (bug #971646)
if use nvenc; then
sed -Ee '/^Requires/s/ffnvcodec[^,]*,? ?//;s/, $//;/^Requires[^:]*: $/d' \
-i "${ED}"/usr/$(get_libdir)/pkgconfig/mpv.pc || die
fi
local GLOBIGNORE=*/*build*:*/*policy*
dodoc RELEASE_NOTES DOCS/*.{md,rst}
}
+6
View File
@@ -245,6 +245,12 @@ src_install() {
mv "${ED}"/usr/share/doc/{mpv,${PF}/examples} || die
fi
# prevent build-only ffnvcodec from leaking into the .pc (bug #971646)
if use nvenc; then
sed -Ee '/^Requires/s/ffnvcodec[^,]*,? ?//;s/, $//;/^Requires[^:]*: $/d' \
-i "${ED}"/usr/$(get_libdir)/pkgconfig/mpv.pc || die
fi
local GLOBIGNORE=*/*build*:*/*policy*
dodoc RELEASE_NOTES DOCS/*.{md,rst}
}