diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-03-13 00:28:24 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-03-13 00:28:24 +0000 |
commit | b3f96499c112618ec301a4852f24b8b8be123d3a (patch) | |
tree | 90d1f3a681c108834f888ca502d93702f101fbce /eclass | |
parent | ef0fedb39c21a343a3f316726f272bad9005b22c (diff) |
gentoo auto-resync : 13:03:2025 - 00:28:24edge
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/Manifest.gz | bin | 40356 -> 40351 bytes | |||
-rw-r--r-- | eclass/ffmpeg-compat.eclass | 24 | ||||
-rw-r--r-- | eclass/toolchain.eclass | 18 |
3 files changed, 32 insertions, 10 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz Binary files differindex c9a08dc1e62d..3b229ca674b7 100644 --- a/eclass/Manifest.gz +++ b/eclass/Manifest.gz diff --git a/eclass/ffmpeg-compat.eclass b/eclass/ffmpeg-compat.eclass index f91fe6eead31..1835a8c7e95a 100644 --- a/eclass/ffmpeg-compat.eclass +++ b/eclass/ffmpeg-compat.eclass @@ -12,7 +12,8 @@ # To use this, run ``ffmpeg_compat_setup <slot>`` before packages use # pkg-config, depend on media-video/ffmpeg-compat:<slot>=, and ensure # usage of both pkg-config --cflags and --libs (which adds -Wl,-rpath -# to find libraries at runtime). +# to find libraries at runtime). Always verify that it is linked with +# the right libraries after. # # This eclass is intended as a quick-to-setup alternative to setting # an upper bound on ffmpeg for packages broken with the latest version, @@ -41,6 +42,27 @@ esac if [[ -z ${_FFMPEG_COMPAT_ECLASS} ]]; then _FFMPEG_COMPAT_ECLASS=1 +inherit flag-o-matic toolchain-funcs + +# @FUNCTION: ffmpeg_compat_add_flags +# @DESCRIPTION: +# Append ``pkg-config --cflags libavcodec`` to CPPFLAGS and +# --libs-only-{L,other} to LDFLAGS for the current ABI. +# +# Must run ``ffmpeg_compat_setup <slot>`` first. +# +# Ideally this function should not be used, but can be useful when +# packages do not use pkg-config properly or drop some flags (common +# with cmake). +# +# For multilib, ebuild should preserve previous flags by doing e.g. +# ``local -x CPPFLAGS=${CPPFLAGS} LDFLAGS=${LDFLAGS}`` first. +ffmpeg_compat_add_flags() { + # should be no real need to check anything but libavcodec's flags + append-cppflags $($(tc-getPKG_CONFIG) --cflags libavcodec || die) + append-ldflags $($(tc-getPKG_CONFIG) --libs-only-{L,other} libavcodec || die) +} + # @FUNCTION: ffmpeg_compat_get_prefix # @USAGE: <slot> # @DESCRIPTION: diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2d479c9c7267..e365269d1c18 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -429,15 +429,15 @@ if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then ) " else - BDEPEND+=" - ada? ( - || ( - sys-devel/gcc:${SLOT}[ada] - <sys-devel/gcc-${SLOT}[ada] - <dev-lang/ada-bootstrap-${SLOT} - ) - ) - " + BDEPEND+=" + ada? ( + || ( + sys-devel/gcc:${SLOT}[ada] + <sys-devel/gcc-${SLOT}[ada] + <dev-lang/ada-bootstrap-${SLOT} + ) + ) + " fi fi |