summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Rui <vowstar@gmail.com>2022-08-07 23:50:22 +0800
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-08-08 19:29:07 +0200
commitd8604b22be0a1830f994501fc5dffbf53dac94d2 (patch)
treeb89c0f0ce99d9de74e177fbb12f8c7c4dcfbaf88
parentsci-geosciences/geocode-glib: Version bump to 3.26.4 (diff)
downloadgentoo-d8604b22be0a1830f994501fc5dffbf53dac94d2.tar.gz
gentoo-d8604b22be0a1830f994501fc5dffbf53dac94d2.tar.bz2
gentoo-d8604b22be0a1830f994501fc5dffbf53dac94d2.zip
sci-mathematics/mathematica: add 13.0.1
Fix ebuild QA problem and add missing RDEPEND Add cuda use flag and nvidia-cuda-toolkit RDEPEND Add R use flag and dev-lang/R RDEPEND Fix RPATH and add dev-util/patchelf as BDEPEND Add QT_QPA_PLATFORM="wayland;xcb" to fix problem on wayland Disable doc use flag by default Install icons from SystemFiles/FrontEnd/SystemResources/X Add myself as a maintainer (proxy-maint) Closes: https://bugs.gentoo.org/859793 Signed-off-by: Huang Rui <vowstar@gmail.com> Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
-rw-r--r--sci-mathematics/mathematica/Manifest1
-rw-r--r--sci-mathematics/mathematica/mathematica-13.0.1.ebuild160
-rw-r--r--sci-mathematics/mathematica/metadata.xml28
3 files changed, 185 insertions, 4 deletions
diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index ed9457c860c2..e465fb6c5a09 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -3,3 +3,4 @@ DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9f
DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490
DIST Mathematica_12.2.0_LINUX.sh 4454613844 BLAKE2B 03b0567afe001fd0781ea6daf0f23ccaccf44ed6ce225cc190239d228c684099a1fa1070cedc0c5bf1517804a4b8b34903d56b2b028392895437a304b56f682d SHA512 0b98d0f2a15ea834892897a64089da08bee5783a8a51b1a0e624618105c896c91c865cca5b5c7b8e72569a5065ef091be7138b7d72d94e4697a213a91d5b8770
DIST Mathematica_13.0.0_BNDL_LINUX.sh 5118155611 BLAKE2B ff15a9def53f7fb808b117ecf2573f415b928c13a86d15634e6282c8f8542b32fa42ff76baeac95faa1242dc4350b0db28231c5cb7f36bc5b57425c2804bf996 SHA512 05008559c531a6920745d0047be0f2c42cb6994309db3f2ee2ad44151655f43d88de063a4952c5ac5544818e2da8973305ee46f44e74d7301da21cdf710cbd5b
+DIST Mathematica_13.0.1_BNDL_LINUX.sh 5094982487 BLAKE2B 55375b6038422fd5f11db36b33bc1162064c8d6a88575c982ce53b15678bf7b19dc62d66336b2105cbaa18a7fe86ba64f09db40e494c15d558f3ebd92ea025fe SHA512 cf4106202dfcf290f0dbe9e8062457eb705c2802f608e60f2810fc31e166ab60b5726c0c9bf675fadb02f5628af1dc2d25db8d02119dc63381eef8a88cdb6ec6
diff --git a/sci-mathematics/mathematica/mathematica-13.0.1.ebuild b/sci-mathematics/mathematica/mathematica-13.0.1.ebuild
new file mode 100644
index 000000000000..128562af249c
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-13.0.1.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CHECKREQS_DISK_BUILD=19G
+inherit check-reqs desktop unpacker xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="cuda doc 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
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ media-libs/freetype
+ R? ( dev-lang/R )
+ virtual/libcrypt
+"
+
+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/*"
+
+S=${WORKDIR}
+
+src_unpack() {
+ /bin/sh "${DISTDIR}/${A}" --nox11 --keep --target "${S}/unpack" -- "-help" || die
+}
+
+src_prepare() {
+ pushd "${S}/unpack" > /dev/null || die
+ # fix ACCESS DENIED issue when installer check the avahi-daemon
+ sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/MathInstaller" || die
+ /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+ popd > /dev/null || die
+ eapply_user
+}
+
+src_install() {
+ local ARCH='-x86-64'
+
+ if ! use doc; then
+ einfo "Removing documentation"
+ rm -r "${S}/${M_TARGET}/Documentation" || die
+ fi
+
+ 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
+ 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
+
+ # 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}"
+}
diff --git a/sci-mathematics/mathematica/metadata.xml b/sci-mathematics/mathematica/metadata.xml
index 71a5bee94e5a..90d6c3bbe4c6 100644
--- a/sci-mathematics/mathematica/metadata.xml
+++ b/sci-mathematics/mathematica/metadata.xml
@@ -1,8 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>dilfridge@gentoo.org</email>
- <name>Andreas K. Huettel</name>
- </maintainer>
+ <maintainer type="person">
+ <email>dilfridge@gentoo.org</email>
+ <name>Andreas K. Huettel</name>
+ </maintainer>
+ <maintainer type="person" proxied="yes">
+ <email>vowstar@gmail.com</email>
+ <name>Huang Rui</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ Wolfram Mathematica is a software system with built-in libraries for
+ several areas of technical computing that allow machine learning,
+ statistics, symbolic computation, data manipulation, network analysis,
+ time series analysis, plotting functions and various types of data,
+ implementation of algorithms, creation of user interfaces, and interfacing
+ with programs written in other programming languages.
+ </longdescription>
+ <use>
+ <flag name="cuda">Install with cuda support</flag>
+ <flag name="R">Enable <pkg>dev-lang/R</pkg> backend support</flag>
+ </use>
</pkgmetadata>