summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin40184 -> 40356 bytes
-rw-r--r--eclass/ffmpeg-compat.eclass67
-rw-r--r--eclass/llvm.org.eclass3
-rw-r--r--eclass/toolchain.eclass14
4 files changed, 83 insertions, 1 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index c6e23d8f7a89..c9a08dc1e62d 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/ffmpeg-compat.eclass b/eclass/ffmpeg-compat.eclass
new file mode 100644
index 000000000000..f91fe6eead31
--- /dev/null
+++ b/eclass/ffmpeg-compat.eclass
@@ -0,0 +1,67 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# @ECLASS: ffmpeg-compat.eclass
+# @MAINTAINER:
+# Ionen Wolkens <ionen@gentoo.org>
+# @AUTHOR:
+# Ionen Wolkens <ionen@gentoo.org>
+# @SUPPORTED_EAPIS: 8
+# @BLURB: Helper functions to link with slotted ffmpeg-compat libraries
+# @DESCRIPTION:
+# 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).
+#
+# This eclass is intended as a quick-to-setup alternative to setting
+# an upper bound on ffmpeg for packages broken with the latest version,
+# and thus allow users to upgrade their normal ffmpeg.
+#
+# This should still be a temporary measure, and it is recommended to
+# keep migration bugs open rather than consider this eclass as being
+# the "fix".
+#
+# Unlike LLVM_SLOT-style, this does not have USE to select the slot
+# and should instead pick only the highest one usable until package
+# is fixed and can use non-slotted ffmpeg again.
+#
+# Do *not* use both like ``|| ( <ffmpeg-<ver> ffmpeg-compat:<slot> )``,
+# the package manager cannot know which version it linked against
+# without USE flags. Unfortunately means a period where users may
+# have two identical versions in stable before the newest major version
+# is stabilized, but idea is to not mangle normal ffmpeg with slotting
+# logic and make this an isolated temporary deal.
+
+case ${EAPI} in
+ 8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_FFMPEG_COMPAT_ECLASS} ]]; then
+_FFMPEG_COMPAT_ECLASS=1
+
+# @FUNCTION: ffmpeg_compat_get_prefix
+# @USAGE: <slot>
+# @DESCRIPTION:
+# Return prefix of the installed ffmpeg-compat:<slot>. Binaries like
+# ffmpeg will be found under <prefix>/bin if needed.
+ffmpeg_compat_get_prefix() {
+ (( ${#} == 1 )) || die "Usage: ${FUNCNAME} <slot>"
+
+ echo "${EPREFIX}/usr/lib/ffmpeg${1}"
+}
+
+# @FUNCTION: ffmpeg_compat_setup
+# @USAGE: <slot>
+# @DESCRIPTION:
+# Add ESYSROOT's ffmpeg-compat:<slot> to PKG_CONFIG_PATH for the
+# current ABI.
+ffmpeg_compat_setup() {
+ (( ${#} == 1 )) || die "Usage: ${FUNCNAME} <slot>"
+
+ : "${SYSROOT}$(ffmpeg_compat_get_prefix "${1}")/$(get_libdir)/pkgconfig"
+ export PKG_CONFIG_PATH=${_}:${PKG_CONFIG_PATH}
+}
+
+fi
diff --git a/eclass/llvm.org.eclass b/eclass/llvm.org.eclass
index 5fea1ff55ee5..f4e2e239d5f8 100644
--- a/eclass/llvm.org.eclass
+++ b/eclass/llvm.org.eclass
@@ -72,6 +72,9 @@ if [[ -z ${_LLVM_SOURCE_TYPE+1} ]]; then
_LLVM_SOURCE_TYPE=snapshot
case ${PV} in
+ 21.0.0_pre20250311)
+ EGIT_COMMIT=cb7298f66d62a3548fcf3bd230304067ecf30d17
+ ;;
21.0.0_pre20250301)
EGIT_COMMIT=7e8a06cfa4a2951b8ee77e19e34926e6e535b4d1
;;
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5cffbd7428ca..2d479c9c7267 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -340,6 +340,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 14.0.0_pre20230423 ${PV} && IUSE+=" rust" TC_FEATURES+=( rust )
tc_version_is_at_least 14.2.1_p20241026 ${PV} && IUSE+=" time64"
tc_version_is_at_least 15.0.0_pre20241124 ${PV} && IUSE+=" libgdiagnostics"
+ tc_version_is_at_least 15.0.1_pre20250316 ${PV} && IUSE+=" cobol"
fi
if tc_version_is_at_least 10; then
@@ -1255,6 +1256,7 @@ toolchain_src_configure() {
is_f77 && GCC_LANG+=",f77"
is_f95 && GCC_LANG+=",f95"
is_ada && GCC_LANG+=",ada"
+ is_cobol && GCC_LANG+=",cobol"
is_modula2 && GCC_LANG+=",m2"
is_rust && GCC_LANG+=",rust"
@@ -1831,6 +1833,11 @@ toolchain_src_configure() {
fi
fi
+ if [[ ${CTARGET} != *-darwin* ]] && tc_version_is_at_least 14.1 ; then
+ # This allows passing -stdlib-=libc++ at runtime.
+ confgcc+=( --with-gxx-libcxx-include-dir="${ESYSROOT}"/usr/include/c++/v1 )
+ fi
+
# TODO: Ignore RCs here (but TOOLCHAIN_IS_RC isn't yet an eclass var)
if [[ ${PV} == *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
# Safeguard against https://gcc.gnu.org/PR106899 being fixed
@@ -2600,7 +2607,7 @@ toolchain_src_install() {
cd "${D}"${BINPATH} || die
# Ugh: we really need to auto-detect this list.
# It's constantly out of date.
- for x in cpp gcc gccrs g++ c++ gcov gdc g77 gfortran gccgo gnat* ; do
+ for x in cpp gcc gccrs g++ c++ gcobol gcov gdc g77 gfortran gccgo gnat* ; do
# For some reason, g77 gets made instead of ${CTARGET}-g77...
# this should take care of that
if [[ -f ${x} ]] ; then
@@ -3142,6 +3149,11 @@ is_objcxx() {
_tc_use_if_iuse cxx && _tc_use_if_iuse objc++
}
+is_cobol() {
+ gcc-lang-supported cobol || return 1
+ _tc_use_if_iuse cobol
+}
+
is_modula2() {
gcc-lang-supported m2 || return 1
_tc_use_if_iuse cxx && _tc_use_if_iuse modula2