sci-mathematics/mathematica: migrate from ffmpeg to ffmpeg-compat

Closes: https://bugs.gentoo.org/967341
Signed-off-by: Huang Rui <vowstar@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/44406
Closes: https://github.com/gentoo/gentoo/pull/44406
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Huang Rui 2025-12-12 19:14:03 +08:00 committed by Sam James
parent 1eb36b222a
commit f6d703eadd
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
7 changed files with 94 additions and 50 deletions

View File

@ -1,23 +1,23 @@
# Copyright 1999-2022 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=19G CHECKREQS_DISK_BUILD=19G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
HOMEPAGE="https://www.wolfram.com/mathematica/"
SRC_URI=" SRC_URI="
doc? ( WLDocs_${PV}_LINUX.sh ) doc? ( WLDocs_${PV}_LINUX.sh )
Mathematica_${PV}_LINUX.sh Mathematica_${PV}_LINUX.sh
" "
HOMEPAGE="https://www.wolfram.com/mathematica/" S="${WORKDIR}"
LICENSE="all-rights-reserved" LICENSE="all-rights-reserved"
KEYWORDS="-* ~amd64"
SLOT="0" SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="cuda doc ffmpeg R" IUSE="cuda doc ffmpeg R"
RESTRICT="strip mirror bindist fetch" RESTRICT="strip mirror bindist fetch"
# Mathematica comes with a lot of bundled stuff. We should place here only what we # Mathematica comes with a lot of bundled stuff. We should place here only what we
@ -27,7 +27,7 @@ RESTRICT="strip mirror bindist fetch"
RDEPEND=" RDEPEND="
cuda? ( dev-util/nvidia-cuda-toolkit ) cuda? ( dev-util/nvidia-cuda-toolkit )
media-libs/freetype media-libs/freetype
ffmpeg? ( media-video/ffmpeg ) ffmpeg? ( media-video/ffmpeg-compat:4 )
R? ( dev-lang/R ) R? ( dev-lang/R )
virtual/libcrypt virtual/libcrypt
" "
@ -49,8 +49,6 @@ M_TARGET="opt/Wolfram/${MPN}/${MPV}"
# we might as well list all files in all QA variables... # we might as well list all files in all QA variables...
QA_PREBUILT="opt/*" QA_PREBUILT="opt/*"
S=${WORKDIR}
src_unpack() { src_unpack() {
/bin/sh "${DISTDIR}/Mathematica_${PV}_LINUX.sh" --nox11 --keep --target "${S}/unpack_app" -- "-help" || die /bin/sh "${DISTDIR}/Mathematica_${PV}_LINUX.sh" --nox11 --keep --target "${S}/unpack_app" -- "-help" || die
if use doc; then if use doc; then
@ -97,7 +95,8 @@ src_install() {
if ! use cuda; then if ! use cuda; then
einfo 'Removing cuda support' einfo 'Removing cuda support'
rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions.so" \
|| die
fi fi
# Linux-x86-64/AllVersions is the supported version, other versions remove # Linux-x86-64/AllVersions is the supported version, other versions remove
@ -111,9 +110,11 @@ src_install() {
rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/AllVersions/libjri.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/AllVersions/libjri.so" || die
fi fi
# FFmpegTools can't use if ffmpeg not used # FFmpegTools can't use if ffmpeg not used
if ! use ffmpeg || ! has_version '>=media-video/ffmpeg-5'; then if ! use ffmpeg; then
einfo 'Removing FFmpegTools support because lack of >=media-video/ffmpeg-5' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-5.0.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else
ffmpeg_compat_setup 4
fi fi
# fix RPATH # fix RPATH
@ -134,7 +135,8 @@ src_install() {
done < <(find "${S}/${M_TARGET}" -type f -print0) done < <(find "${S}/${M_TARGET}" -type f -print0)
# fix broken symbolic link # fix broken symbolic link
ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" \
"${S}/${M_TARGET}/Executables/wolframscript" || die
# move all over # move all over
mv "${S}"/opt "${ED}"/opt || die mv "${S}"/opt "${ED}"/opt || die

View File

@ -1,10 +1,10 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
HOMEPAGE="https://www.wolfram.com/mathematica/" HOMEPAGE="https://www.wolfram.com/mathematica/"
@ -12,8 +12,8 @@ SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh"
S="${WORKDIR}" S="${WORKDIR}"
LICENSE="all-rights-reserved" LICENSE="all-rights-reserved"
KEYWORDS="-* ~amd64"
SLOT="0" SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="cuda doc ffmpeg R" IUSE="cuda doc ffmpeg R"
RESTRICT="strip mirror bindist fetch" RESTRICT="strip mirror bindist fetch"
@ -25,7 +25,7 @@ RESTRICT="strip mirror bindist fetch"
RDEPEND=" RDEPEND="
cuda? ( dev-util/nvidia-cuda-toolkit ) cuda? ( dev-util/nvidia-cuda-toolkit )
media-libs/freetype media-libs/freetype
ffmpeg? ( <media-video/ffmpeg-5 ) ffmpeg? ( media-video/ffmpeg-compat:4 )
R? ( dev-lang/R ) R? ( dev-lang/R )
virtual/libcrypt virtual/libcrypt
" "
@ -82,7 +82,8 @@ src_install() {
if ! use cuda; then if ! use cuda; then
einfo 'Removing cuda support' einfo 'Removing cuda support'
rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions.so" \
|| die
fi fi
# Linux-x86-64/AllVersions is the supported version, other versions remove # Linux-x86-64/AllVersions is the supported version, other versions remove
@ -99,6 +100,8 @@ src_install() {
if ! use ffmpeg; then if ! use ffmpeg; then
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else
ffmpeg_compat_setup 4
fi fi
# fix RPATH # fix RPATH
@ -119,7 +122,8 @@ src_install() {
done < <(find "${S}/${M_TARGET}" -type f -print0) done < <(find "${S}/${M_TARGET}" -type f -print0)
# fix broken symbolic link # fix broken symbolic link
ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" \
"${S}/${M_TARGET}/Executables/wolframscript" || die
# move all over # move all over
mv "${S}"/opt "${ED}"/opt || die mv "${S}"/opt "${ED}"/opt || die

View File

@ -4,7 +4,7 @@
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
HOMEPAGE="https://www.wolfram.com/mathematica/" HOMEPAGE="https://www.wolfram.com/mathematica/"
@ -15,8 +15,8 @@ SRC_URI="
S="${WORKDIR}" S="${WORKDIR}"
LICENSE="all-rights-reserved" LICENSE="all-rights-reserved"
KEYWORDS="-* ~amd64"
SLOT="0" SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="bundle cuda doc ffmpeg R" IUSE="bundle cuda doc ffmpeg R"
RESTRICT="strip mirror bindist fetch" RESTRICT="strip mirror bindist fetch"
@ -38,8 +38,8 @@ RDEPEND="
<dev-util/nvidia-cuda-toolkit-13 <dev-util/nvidia-cuda-toolkit-13
) )
ffmpeg? ( || ( ffmpeg? ( || (
media-video/ffmpeg:0/56.58.58 media-video/ffmpeg-compat:4
media-video/ffmpeg:0/58.60.60 media-video/ffmpeg-compat:6
) ) ) )
R? ( dev-lang/R ) R? ( dev-lang/R )
" "
@ -77,7 +77,8 @@ src_install() {
# fix ACCESS DENIED issue when installer check the avahi-daemon # fix ACCESS DENIED issue when installer check the avahi-daemon
sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die
# fix ACCESS DENIED issue when installing documentation # fix ACCESS DENIED issue when installing documentation
sed -e "s|\(exec ./MathInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" -i "Unix/Installer/MathInstaller" || die sed -e "s|\(exec ./MathInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" \
-i "Unix/Installer/MathInstaller" || die
/bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
popd > /dev/null || die popd > /dev/null || die
@ -99,7 +100,8 @@ src_install() {
if ! use cuda; then if ! use cuda; then
einfo 'Removing cuda support' einfo 'Removing cuda support'
rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so \
|| die
fi fi
# Linux-x86-64/AllVersions is the supported version, other versions remove # Linux-x86-64/AllVersions is the supported version, other versions remove
@ -116,6 +118,12 @@ src_install() {
if ! use ffmpeg; then if ! use ffmpeg; then
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else
if has_version 'media-video/ffmpeg-compat:6'; then
ffmpeg_compat_setup 6
elif has_version 'media-video/ffmpeg-compat:4'; then
ffmpeg_compat_setup 4
fi
fi fi
# fix RPATH # fix RPATH
@ -136,7 +144,8 @@ src_install() {
done < <(find "${S}/${M_TARGET}" -type f -print0) done < <(find "${S}/${M_TARGET}" -type f -print0)
# fix broken symbolic link # fix broken symbolic link
ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" \
"${S}/${M_TARGET}/Executables/wolframscript" || die
# move all over # move all over
mv "${S}"/opt "${ED}"/opt || die mv "${S}"/opt "${ED}"/opt || die

View File

@ -4,7 +4,7 @@
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
HOMEPAGE="https://www.wolfram.com/mathematica/" HOMEPAGE="https://www.wolfram.com/mathematica/"
@ -15,8 +15,8 @@ SRC_URI="
S="${WORKDIR}" S="${WORKDIR}"
LICENSE="all-rights-reserved" LICENSE="all-rights-reserved"
KEYWORDS="-* ~amd64"
SLOT="0" SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="bundle cuda doc ffmpeg R" IUSE="bundle cuda doc ffmpeg R"
RESTRICT="strip mirror bindist fetch" RESTRICT="strip mirror bindist fetch"
@ -38,8 +38,8 @@ RDEPEND="
<dev-util/nvidia-cuda-toolkit-13 <dev-util/nvidia-cuda-toolkit-13
) )
ffmpeg? ( || ( ffmpeg? ( || (
media-video/ffmpeg:0/56.58.58 media-video/ffmpeg-compat:4
media-video/ffmpeg:0/58.60.60 media-video/ffmpeg-compat:6
) ) ) )
R? ( dev-lang/R ) R? ( dev-lang/R )
" "
@ -77,7 +77,8 @@ src_install() {
# fix ACCESS DENIED issue when installer check the avahi-daemon # fix ACCESS DENIED issue when installer check the avahi-daemon
sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die
# fix ACCESS DENIED issue when installing documentation # fix ACCESS DENIED issue when installing documentation
sed -e "s|\(exec ./MathInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" -i "Unix/Installer/MathInstaller" || die sed -e "s|\(exec ./MathInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" \
-i "Unix/Installer/MathInstaller" || die
/bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
popd > /dev/null || die popd > /dev/null || die
@ -99,7 +100,8 @@ src_install() {
if ! use cuda; then if ! use cuda; then
einfo 'Removing cuda support' einfo 'Removing cuda support'
rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so \
|| die
fi fi
# Linux-x86-64/AllVersions is the supported version, other versions remove # Linux-x86-64/AllVersions is the supported version, other versions remove
@ -116,6 +118,12 @@ src_install() {
if ! use ffmpeg; then if ! use ffmpeg; then
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else
if has_version 'media-video/ffmpeg-compat:6'; then
ffmpeg_compat_setup 6
elif has_version 'media-video/ffmpeg-compat:4'; then
ffmpeg_compat_setup 4
fi
fi fi
# fix RPATH # fix RPATH
@ -136,7 +144,8 @@ src_install() {
done < <(find "${S}/${M_TARGET}" -type f -print0) done < <(find "${S}/${M_TARGET}" -type f -print0)
# fix broken symbolic link # fix broken symbolic link
ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" \
"${S}/${M_TARGET}/Executables/wolframscript" || die
# move all over # move all over
mv "${S}"/opt "${ED}"/opt || die mv "${S}"/opt "${ED}"/opt || die

View File

@ -4,7 +4,7 @@
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
@ -45,8 +45,8 @@ RDEPEND="
<dev-util/nvidia-cuda-toolkit-13 <dev-util/nvidia-cuda-toolkit-13
) )
ffmpeg? ( || ( ffmpeg? ( || (
media-video/ffmpeg:0/56.58.58 media-video/ffmpeg-compat:4
media-video/ffmpeg:0/58.60.60 media-video/ffmpeg-compat:6
) ) ) )
R? ( dev-lang/R ) R? ( dev-lang/R )
" "
@ -133,6 +133,12 @@ src_install() {
if ! use ffmpeg; then if ! use ffmpeg; then
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else
if has_version 'media-video/ffmpeg-compat:6'; then
ffmpeg_compat_setup 6
elif has_version 'media-video/ffmpeg-compat:4'; then
ffmpeg_compat_setup 4
fi
fi fi
# fix RPATH # fix RPATH

View File

@ -4,7 +4,7 @@
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
@ -47,9 +47,9 @@ RDEPEND="
<dev-util/nvidia-cuda-toolkit-13 <dev-util/nvidia-cuda-toolkit-13
) )
ffmpeg? ( || ( ffmpeg? ( || (
media-video/ffmpeg:0/56.58.58 media-video/ffmpeg-compat:4
media-video/ffmpeg:0/58.60.60 media-video/ffmpeg-compat:6
media-video/ffmpeg:0/59.61.61 media-video/ffmpeg-compat:7
) ) ) )
R? ( dev-lang/R ) R? ( dev-lang/R )
mqtt? ( mqtt? (
@ -143,15 +143,22 @@ src_install() {
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else # Support ffmpeg, but remove support for versions not installed else # Support ffmpeg, but remove support for versions not installed
if ! has_version 'media-video/ffmpeg:0/56.58.58'; then if has_version 'media-video/ffmpeg-compat:7'; then
ffmpeg_compat_setup 7
elif has_version 'media-video/ffmpeg-compat:6'; then
ffmpeg_compat_setup 6
elif has_version 'media-video/ffmpeg-compat:4'; then
ffmpeg_compat_setup 4
fi
if ! has_version 'media-video/ffmpeg-compat:4'; then
einfo 'Removing FFmpegTools version 4 support' einfo 'Removing FFmpegTools version 4 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-4.4.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-4.4.so" || die
fi fi
if ! has_version 'media-video/ffmpeg:0/58.60.60'; then if ! has_version 'media-video/ffmpeg-compat:6'; then
einfo 'Removing FFmpegTools version 6 support' einfo 'Removing FFmpegTools version 6 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-6.0.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-6.0.so" || die
fi fi
if ! has_version 'media-video/ffmpeg:0/59.61.61'; then if ! has_version 'media-video/ffmpeg-compat:7'; then
einfo 'Removing FFmpegTools version 7 support' einfo 'Removing FFmpegTools version 7 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-7.0.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-7.0.so" || die
fi fi

View File

@ -4,7 +4,7 @@
EAPI=8 EAPI=8
CHECKREQS_DISK_BUILD=20G CHECKREQS_DISK_BUILD=20G
inherit check-reqs desktop unpacker xdg inherit check-reqs desktop ffmpeg-compat unpacker xdg
DESCRIPTION="Wolfram Mathematica" DESCRIPTION="Wolfram Mathematica"
@ -47,9 +47,9 @@ RDEPEND="
<dev-util/nvidia-cuda-toolkit-13 <dev-util/nvidia-cuda-toolkit-13
) )
ffmpeg? ( || ( ffmpeg? ( || (
media-video/ffmpeg:0/56.58.58 media-video/ffmpeg-compat:4
media-video/ffmpeg:0/58.60.60 media-video/ffmpeg-compat:6
media-video/ffmpeg:0/59.61.61 media-video/ffmpeg-compat:7
) ) ) )
R? ( dev-lang/R ) R? ( dev-lang/R )
mqtt? ( mqtt? (
@ -146,15 +146,22 @@ src_install() {
einfo 'Removing FFmpegTools support' einfo 'Removing FFmpegTools support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die
else # Support ffmpeg, but remove support for versions not installed else # Support ffmpeg, but remove support for versions not installed
if ! has_version 'media-video/ffmpeg:0/56.58.58'; then if has_version 'media-video/ffmpeg-compat:7'; then
ffmpeg_compat_setup 7
elif has_version 'media-video/ffmpeg-compat:6'; then
ffmpeg_compat_setup 6
elif has_version 'media-video/ffmpeg-compat:4'; then
ffmpeg_compat_setup 4
fi
if ! has_version 'media-video/ffmpeg-compat:4'; then
einfo 'Removing FFmpegTools version 4 support' einfo 'Removing FFmpegTools version 4 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-4.4.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-4.4.so" || die
fi fi
if ! has_version 'media-video/ffmpeg:0/58.60.60'; then if ! has_version 'media-video/ffmpeg-compat:6'; then
einfo 'Removing FFmpegTools version 6 support' einfo 'Removing FFmpegTools version 6 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-6.0.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-6.0.so" || die
fi fi
if ! has_version 'media-video/ffmpeg:0/59.61.61'; then if ! has_version 'media-video/ffmpeg-compat:7'; then
einfo 'Removing FFmpegTools version 7 support' einfo 'Removing FFmpegTools version 7 support'
rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-7.0.so" || die rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-7.0.so" || die
fi fi