[Bug 261302] multimedia/ffmpeg: update to 6.0

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 23 Apr 2023 09:09:57 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261302

--- Comment #73 from Jan Beich <jbeich@FreeBSD.org> ---
(In reply to Daniel Engberg from comment #72)
> it doesn't necessarily mean that it'll pick up the legacy version first

override.mk was designed primarily for Meson which standardized pkg-config but
should also work for autotools where pkg-config is common. Unfortunately, CMake
prefers its own module system instead of pkg-config with standard modules being
those shipped with CMake itself. To support USES=cmake in override.mk someone
needs to catalogue third-party CMake modules used to find FFmpeg and figure out
the common workaround.

$ pkg info -l cmake-core | fgrep .cmake | xargs fgrep -Hi avcodec || echo Exit
$?
Exit 1

Note, USES=localbase in override.mk reorders -I/usr/local/include if added by
another dependency to the end of the search order but it doesn't affect
-L/usr/local/lib as there's no equivalent for -I vs. -isystem i.e., to enforce
-L/path -lfoo one is supposed to pass /path/libfoo.so instead. 

> Perhaps temporarily "hide" one version somehow?

Depends on what is used to find ffmpeg. If pkg-config then PKG_CONFIG_LIBDIR
can override the primary location for *.pc files. However, doing so will break
search for other dependencies via pkg-config and not necessary because
PKG_CONFIG_PATH *prepends* the location e.g.,

$ pkg install ffmpeg ffmpeg4
$ pkg-config --path libavcodec
/usr/local/libdata/pkgconfig/libavcodec.pc
$ PKG_CONFIG_PATH=/usr/local/ffmpeg4/libdata/pkgconfig pkg-config --path
libavcodec
/usr/local/ffmpeg4/libdata/pkgconfig/libavcodec.pc

-- 
You are receiving this mail because:
You are on the CC list for the bug.