diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-27 11:30:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-27 11:30:42 +0100 |
commit | ddb6fbc11e863756a24e1dc866c63dec00eac6fa (patch) | |
tree | 697bafc13819641c0cb81d469945e2a773adca86 /sci-mathematics/mathematica | |
parent | e466209c898f09389f2308d193286ff62b46c1dc (diff) |
gentoo auto-resync : 27:09:2023 - 11:30:42
Diffstat (limited to 'sci-mathematics/mathematica')
-rw-r--r-- | sci-mathematics/mathematica/Manifest | 2 | ||||
-rw-r--r-- | sci-mathematics/mathematica/mathematica-13.3.1.ebuild | 188 |
2 files changed, 190 insertions, 0 deletions
diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest index d4a1d32ac1e9..79656105b741 100644 --- a/sci-mathematics/mathematica/Manifest +++ b/sci-mathematics/mathematica/Manifest @@ -6,6 +6,7 @@ DIST Mathematica_13.0.0_BNDL_LINUX.sh 5118155611 BLAKE2B ff15a9def53f7fb808b117e DIST Mathematica_13.0.1_BNDL_LINUX.sh 5094982487 BLAKE2B 55375b6038422fd5f11db36b33bc1162064c8d6a88575c982ce53b15678bf7b19dc62d66336b2105cbaa18a7fe86ba64f09db40e494c15d558f3ebd92ea025fe SHA512 cf4106202dfcf290f0dbe9e8062457eb705c2802f608e60f2810fc31e166ab60b5726c0c9bf675fadb02f5628af1dc2d25db8d02119dc63381eef8a88cdb6ec6 DIST Mathematica_13.1.0_LINUX.sh 2032362325 BLAKE2B d044fe1ed3c71e6ebc2357c440af6feaeb360962aea32843abbdfe40f124a29bd07bf0c3a5a35f8bac29c97a7d23dbcd79967b6d0028d01e09c9b662fc1f2b95 SHA512 3d84313be4da86d72cc652b0ec7dbbbf6d815debbde4c9ab855f447dda36aeccb416e90d298f0be975ae86fdf55f20aa7597b0d96d291ebdf6e4eb0dc2ca5433 DIST Mathematica_13.2.1_BNDL_LINUX.sh 5512713048 BLAKE2B 266a6979faab891c6fc10a1bc690ee21ad3af01413a2af29d81c27dffc92d8a10a2947aefe978dfcf16378e8f8f0d33145f99930840eeb2843d73270d2ad0de9 SHA512 2062b2ce7f6e7f33b8623607ef71475091b877112f03ffbc32671f513b71925aad8489f25e1b01ec75b5d4d7bee03bb2dc8b2627f767633de578ecae1d86b7f6 +DIST Mathematica_13.3.1_BNDL_LINUX.sh 6072605531 BLAKE2B f9e6c218bef266fd9cb86905299f4074377c29270379cee24ad473bedc628bb30739ea2b00b333d3c7546775c9c9fbf95ebd2ff1fa075d9cce447a20279a0a6c SHA512 b40f4301d928fb760e0f1421df2dee78118edb9360afbf117049c93b3ee1a84975c3987bbef4483ff4f67c3f8d63c66081df71f6800dd259f8735ca062723d3f DIST WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2 EBUILD mathematica-10.3.1-r1.ebuild 2821 BLAKE2B 958869840413f275d50272636693c776ac399cc14401d21d8709aab81ec23f396b0407618b787a4c04fe5a70327c604bef81735f6fcdeb8cbbaf6b74cf387172 SHA512 ac52970098b31e2e1a72d50dffc0db3cfe67c68eed8272b1d78febe5e47eb514b333c23a9c5f7030bb606f937106b5a237818d9ab829779533e33f5459d2aeb2 EBUILD mathematica-12.1.0.ebuild 3134 BLAKE2B 4a8f269cfb1d77dd941dfab8c56dc310306aea75fd6d676f2e79a1208420c25161afef7e253c101763d57a441480403580dbb62b31b420f6dbce3f7cfa786fc8 SHA512 cf14b8567a9dc6bd7f19447cb9d277c929084abf20bf073c4d9aa049e1795ddba0862f43340bfbb37d2633d84e7b5adfe4a3123554fd62bc55c018394177a2ee @@ -15,4 +16,5 @@ EBUILD mathematica-13.0.0.ebuild 3140 BLAKE2B d9e0fbdb71a760470783cbab6ef2a33368 EBUILD mathematica-13.0.1.ebuild 5421 BLAKE2B 27b1943495659b3bf64097f9f3c7ce7ab6022fea3c3661e38a4e18ceb8d427862c1d9af7c4ee37cd0b6340f2045d35b1e71e2f32685fcb945e7069b6b1970efc SHA512 d27f8af6092dee45b5ef094af55f187b79d028b3029f5e9a7b664a4f5392baab166de3dda0fbf15a20d749046d0e68f71f2257dc265b2c36ff2ef8b1b0dfabc7 EBUILD mathematica-13.1.0.ebuild 7044 BLAKE2B 6411bceb04e19d939c7ac4287f37ecaf20add4cfb49edb4f4caac3ea1cd8eb706a59e42a60640002024f511036ab0f12b5ffd0caf02c9bf5627bb2c653e559ad SHA512 296c74dc0c2be909a1b029eae0a1fdab89f541443417d9e85a35d5623ae366300491c25f0a62208291870b540257d9ad7c8768b0aa6df9b8f7a4301ef3940d02 EBUILD mathematica-13.2.1.ebuild 6345 BLAKE2B bf34cf285d0bd5a60c4aa5987736f95a1b441f059a2d8f042a0245ed1265ef925e36cae9090d5c0d9e414ea2f573094f764f67c6657136541a4ace17666877c5 SHA512 2fe35f26f4c4066913088aec96b42cc4fb3a63b4cf101adea1fc191bd6ea9ed0cfa3d240be5a5750d348900dd4ba5efef752362c7b10808b612056b03ca6e951 +EBUILD mathematica-13.3.1.ebuild 6824 BLAKE2B 1da817a4ce32ac9054c0d6d5329214a5eb330d105261d0a6ba0eab7d92d0d48eea41b924468070411b11f75ee532ce84bbc91874a151cf45ca651b5b1752d0fb SHA512 e657e228fb5ce73ad806b44716b47b28a4408d4fe9ae6ff3afeee9a738d610de79ab3dd321e8ca7e1b2e27db32d44b46bc9846651bfb691f756f4b36386cf565 MISC metadata.xml 1188 BLAKE2B 41bb4d62fbe49dcf4da86e9e263aa16089a261a141f6fb749319898be09706d1ef0e353ccdb2c5766f8bdd2aa892c7ecbdac20c38b1f1c5a8bce62796a6ba89d SHA512 59775f53f72417c0f5960984e1e7c9098734b9595a16a796e188a58e4118a350a3fddbb03d1aadf80ad7cdd40707946e38a57c321e2c5643ab5dbf9f0055ecaa diff --git a/sci-mathematics/mathematica/mathematica-13.3.1.ebuild b/sci-mathematics/mathematica/mathematica-13.3.1.ebuild new file mode 100644 index 000000000000..82dfd39089d6 --- /dev/null +++ b/sci-mathematics/mathematica/mathematica-13.3.1.ebuild @@ -0,0 +1,188 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CHECKREQS_DISK_BUILD=20G +inherit check-reqs desktop unpacker xdg + +DESCRIPTION="Wolfram Mathematica" +HOMEPAGE="https://www.wolfram.com/mathematica/" +SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh" +S="${WORKDIR}" + +LICENSE="all-rights-reserved" +KEYWORDS="-* ~amd64" +SLOT="0" +IUSE="cuda doc ffmpeg R" + +RESTRICT="strip mirror bindist fetch" + +# Mathematica comes with a lot of bundled stuff. We should place here only what we +# explicitly override with LD_PRELOAD. +# RLink (libjri.so) requires dev-lang/R +# FFmpegTools (FFmpegToolsSystem-6.0.so) requires media-video/ffmpeg-6.0 +# FFmpegTools (FFmpegToolsSystem-4.4.so) requires media-video/ffmpeg-4.4 +RDEPEND=" + dev-qt/qt5compat:6 + dev-qt/qtbase:6[eglfs,wayland] + dev-qt/qtsvg:6 + dev-qt/qtwayland:6[compositor] + media-libs/freetype + virtual/libcrypt + cuda? ( + >=dev-util/nvidia-cuda-toolkit-11 + <dev-util/nvidia-cuda-toolkit-13 + ) + ffmpeg? ( || ( + media-video/ffmpeg:0/56.58.58 + media-video/ffmpeg:0/58.60.60 + ) ) + R? ( dev-lang/R ) +" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + dev-util/patchelf +" + +# we need this a few times +MPN="Mathematica" +MPV=$(ver_cut 1-2) +M_BINARIES="MathKernel Mathematica WolframKernel wolframscript math mathematica mcc wolfram" +M_TARGET="opt/Wolfram/${MPN}/${MPV}" + +# we might as well list all files in all QA variables... +QA_PREBUILT="opt/*" + +src_unpack() { + /bin/sh "${DISTDIR}/${A}" --nox11 --keep --target "${S}/unpack_app" -- "-help" || die +} + +src_install() { + local ARCH='-x86-64' + + pushd "${S}/unpack_app" > /dev/null || die + # fix ACCESS DENIED issue when installer generate desktop files + sed -e "s|xdg-desktop-icon|xdg-dummy-command|g" -i "Unix/Installer/MathInstaller" || die + sed -e "s|xdg-desktop-menu|xdg-dummy-command|g" -i "Unix/Installer/MathInstaller" || die + sed -e "s|xdg-icon-resource|xdg-dummy-command|g" -i "Unix/Installer/MathInstaller" || die + sed -e "s|xdg-mime|xdg-dummy-command|g" -i "Unix/Installer/MathInstaller" || die + # fix ACCESS DENIED issue when installer check the avahi-daemon + sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die + # 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 + + /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die + popd > /dev/null || die + + if ! use doc; then + einfo "Removing documentation" + rm -r "${S}/${M_TARGET}/Documentation" || die + fi + + # fix world writable file QA problem for files + while IFS= read -r -d '' i; do + chmod o-w "${i}" || die + done < <(find "${S}/${M_TARGET}" -type f -print0) + + einfo 'Removing MacOS- and Windows-specific files' + find "${S}/${M_TARGET}" -type d -\( -name Windows -o -name Windows-x86-64 \ + -o -name MacOSX -o -name MacOSX-x86-64 -o -name Macintosh -\) \ + -exec rm -rv {} + || die + + if ! use cuda; then + einfo 'Removing cuda support' + rm -r "${S}/${M_TARGET}/SystemFiles/Components/CUDACompileTools/LibraryResources/Linux-x86-64/CUDAExtensions"*.so || die + fi + + # Linux-x86-64/AllVersions is the supported version, other versions remove + einfo 'Removing unsupported RLink versions' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/3.5.0" || die + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/3.6.0" || die + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux/AllVersions" || die + # RLink can't use if R not used + if ! use R; then + einfo 'Removing RLink support' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/RLink/SystemFiles/Libraries/Linux-x86-64/AllVersions/libjri.so" || die + fi + # FFmpegTools can't use if ffmpeg not used + if ! use ffmpeg; then + einfo 'Removing FFmpegTools support' + rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem"*.so || die + fi + + # fix RPATH + while IFS= read -r -d '' i; do + # Use \x7fELF header to separate ELF executables and libraries + # Skip .o files and static files to avoid surprises + [[ $(od -t x1 -N 4 "${i}") == *"7f 45 4c 46"* ]] || continue + [[ -f "${i}" && "${i: -2}" != ".o" ]] || continue + [[ "$(file "${i}")" == *"dynamically"* ]] || continue + einfo "Fixing RPATH of ${i}" + patchelf --set-rpath \ +'/'"${M_TARGET}"'/SystemFiles/Libraries/Linux-x86-64:'\ +'/'"${M_TARGET}"'/SystemFiles/Libraries/Linux-x86-64/Qt/lib:'\ +'/'"${M_TARGET}"'/SystemFiles/Java/Linux-x86-64/lib:'\ +'/'"${M_TARGET}"'/SystemFiles/Java/Linux-x86-64/lib/jli:'\ +'$ORIGIN' "${i}" || \ + die "patchelf failed on ${i}" + done < <(find "${S}/${M_TARGET}" -type f -print0) + + # fix broken symbolic link + ln -sf "/${M_TARGET}/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript" "${S}/${M_TARGET}/Executables/wolframscript" || die + + # move all over + mv "${S}"/opt "${ED}"/opt || die + + # the autogenerated symlinks point into sandbox, remove + rm "${ED}"/opt/bin/* || die + + # install wrappers instead + for name in ${M_BINARIES} ; do + einfo "Generating wrapper for ${name}" + echo '#!/bin/sh' >> "${T}/${name}" || die + echo 'QT_QPA_PLATFORM="wayland;xcb"' >> "${T}/${name}" || die + echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1:/$(get_libdir)/libcrypt.so.1 /${M_TARGET}/Executables/${name} \$*" \ + >> "${T}/${name}" || die + dobin "${T}/${name}" + done + for name in ${M_BINARIES} ; do + einfo "Symlinking ${name} to /opt/bin" + dosym ../../usr/bin/${name} /opt/bin/${name} + done + + # fix some embedded paths and install desktop files + for filename in $(find "${ED}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica*.desktop") ; do + einfo "Fixing ${filename}" + sed -e "s|${S}||g" -e 's|^\t\t||g' -i "${filename}" || die + echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}" || die + domenu "${filename}" + done + + # install icons + for iconsize in 16 32 64 128 256; do + local iconfile="${ED}/${M_TARGET}/SystemFiles/FrontEnd/SystemResources/X/App-${iconsize}.png" + if [ -e "${iconfile}" ]; then + newicon -s "${iconsize}" "${iconfile}" wolfram-mathematica.png + fi + done + + # install mime types + insinto /usr/share/mime/application + for filename in $(find "${ED}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do + basefilename=$(basename "${filename}") + mv "${filename}" "${T}/${basefilename#application-}" || die + doins "${T}/${basefilename#application-}" + done +} + +pkg_nofetch() { + einfo "Please place the Wolfram Mathematica installation file ${SRC_URI}" + einfo "in your \$\{DISTDIR\}." + einfo "Note that to actually run and use Mathematica you need a valid license." + einfo "Wolfram provides time-limited evaluation licenses at ${HOMEPAGE}" +} |