




















Thanks, @aussetg I fixed it on the PKGBUILD but didn't make a new pkgrel so people don't have to rebuild the package. Not sure if I'll open an issue upstream this time, as I already have a few tickets opened there (and ignored).
Also, @micwoj92, gmime is not linked anywhere, so I removed it and reviewed the entire dependency list. Used the script below to do this, but I still had to do a lot of manual review. I also built the package in a clean chroot and installed it on a podman container, and I can tell that at least the required dependencies are working. Namcap also reports only a few dependency-detected-not-included issues, but that's only because it doesn't support LD_LIBRARY_PATH yet. In any case, the dependency list should be quite close to the actual dependencies now. (edit: forgot to remove OpenMP, now it's done).
#!/usr/bin/bash
# shellcheck disable=SC2312
set -euo pipefail
PACKAGE="${1:?missing package}"
rm -rf issues
mkdir -p issues
libdeps() {
echo "$@" | awk '{print $4}' | awk -F'=' '{print $1}'
}
python_list() {
LIST="$(rg --only-matching '\[[^\]]*\]' | head -n 1)"
python -c "print(*${LIST}, sep='\n')"
}
paren_list() {
rg --only-matching '\([^)]*\)' | head -n 1 | sed -E 's/^\(|\)$//g' | sed -E 's/, /\n/g'
}
parse_dependency() {
mkdir -p issues/DEPENDS
KIND="$1"
LINE="$2"
NEEDED="$(echo "${LINE}" | awk '{print $5}' | sed -E 's/^\(//')"
echo "${LINE}" | case "${NEEDED}" in
libraries-needed)
# shellcheck disable=SC2046
basename -a $(python_list) >> issues/DEPENDS/"soname-${KIND}".list
;;
python-modules-needed)
python_list >> issues/DEPENDS/"python-${KIND}".list
;;
java-runtime-needed)
paren_list | tail -n +2 >> issues/DEPENDS/"java-${KIND}".list
;;
*)
cat >> issues/DEPENDS/"unknown-${KIND}".list
;;
esac
}
namcap --info --machine-readable "${PACKAGE}" | while IFS= read -r line; do
# see /usr/share/namcap/namcap-tags
TAG="$(echo "${line}" | awk '{print $3}')"
case "${TAG}" in
elffile-* | insecure-r*path | unused-sodepend)
# ELF files are provided from upstream
continue
;;
link-level-dependence | symlink-found)
# we want other infos, but not these two
continue
;;
libdepends-detected-*)
mkdir -p issues/LIBDEPENDS
KIND="${TAG/#libdepends-detected-/}"
# shellcheck disable=SC2046
basename -a $(libdeps "${line}") >> issues/LIBDEPENDS/"soname-${KIND}".list
;;
dependency-detected-*)
KIND="${TAG/#dependency-detected-/}"
parse_dependency "${KIND}" "${line}"
;;
dependency-implicitly-*)
KIND=implicitly
parse_dependency "${KIND}" "${line}"
;;
*) ;;
esac
echo "${line}" >> issues/"${TAG}.list"
done
check_sonames() {
mapfile -t SONAMES < <(sort "$1" | uniq)
echo > "$1"
for soname in "${SONAMES[@]}"; do
MATCHES="$(fd -HIs "${soname}" /opt/Mathematica | grep -E '.' || echo '❌')"
echo "${soname}" "${MATCHES}" >> "$1"
done
}
for file in issues/*/soname-*.list; do
check_sonames "${file}"
done
echo '## POSSIBLY MISSING DEPENDENCIES ##'
rg --no-filename '❌' issues/*/soname-*.list | awk '{print $1}' | sort | uniq
There is an incorrect backslash in the .desktop file. MimeType needs to be changed to:
MimeType=application/mathematica;application/x-mathematica;application/vnd.wolfram.nb;application/vnd.wolfram.cdf;application/vnd.wolfram.player;application/vnd.wolfram.mathematica.package;application/vnd.wolfram.wl;x-scheme-handler/wolfram+cloudobject;
@micwoj92 not sure, I need to review these dependencies.
Is gmime opt-dep stil needed?
I've also updated the PKGBUILD to strip a number of insecure RPATH and RUNPATH entries that namcap previously flagged. These paths were likely leftover from Wolfram's CI/build environment and weren't actively used by the binaries. While not a major security issue in typical (non-root) usage, removing them could improve safety on multi-user systems. I've also reported the issue to Wolfram Support.
Let me know if you run into any issues after this change!
Sorry, for the delay, I completely missed the 14.2 update. Also, thanks @algarafa, just added ttf-dejavu as optdepends. I'm reviewing other dependencies too, but that's been a long process, and I'm not having a lot of free time these last few weeks.
Starting with Mathematica 14.0, I found that Greek characters create a lot of vertical space in Input cells and are incorrectly rendered in inline TeX input within Text cells. Both of these problems can be solved by installing ttf-dejavu. It could perhaps be added as an optional dependency.
Additionally, the default settings lead to an erroneous placement of superscripts in Input cells. This can be solved by installing consolas-font (the default font used in Microsoft Windows installations of the software) and permanently making it the default font by executing SetOptions[$FrontEnd, StyleHints -> {"CodeFont" -> "Consolas"}] in a notebook.
Update to Wolfram 14.1.
diff --git a/PKGBUILD b/PKGBUILD
index 5440a78..b93c516 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
# Contributor: Maxim Mikityanskiy <maxtram95@gmail.com>
pkgname=mathematica
-pkgver=14.0.0
+pkgver=14.1.0
_pkgver=${pkgver%.[0-9]}
pkgrel=1
pkgdesc="A computational software program used in scientific, engineering, and mathematical fields and other areas of technical computing with offline documentation."
@@ -26,6 +26,7 @@ optdepends=(
'alsa-lib'
'atk'
'cairo'
+ 'inetutils'
'ffmpeg'
'fontconfig'
'gdk-pixbuf2'
@@ -82,11 +83,11 @@ _source_url=$(
| sed -E 's/.*href="([^"]+)".*/\1/'
)
source=(
- "Mathematica_${pkgver}_BNDL_LINUX.sh::${_source_url}"
+ "Wolfram_${pkgver}_LIN_Bndl.sh::${_source_url}"
"remove-xdg-scripts.patch"
)
-md5sums=('2e9479b7622ea8d09d465ffc53a753c4'
- '14df424ec93fad057604378c2b5c24c2')
+md5sums=('36eedf29f9090d95f636ac0cd15471e5'
+ '3d4abbbadd766f19bac666b8750eec7a')
options=("!strip")
## To build this package you need to place the mathematica-installer into your
@@ -112,19 +113,20 @@ prepare() {
fi
msg2 "Extracting Mathematica installer..."
- sh "${srcdir}/Mathematica_${pkgver}_BNDL_LINUX.sh" \
+ rm -rf ${srcdir}/bundle/
+ sh "${srcdir}/Wolfram_${pkgver}_LIN_Bndl.sh" \
--keep \
--target "${srcdir}/bundle" \
-- \
-help >/dev/null
-
- patch -p1 -d "${srcdir}/bundle" < "${srcdir}/remove-xdg-scripts.patch"
+ msg2 "Patching Mathematica installer..."
+ patch -p 1 -d "${srcdir}/bundle/" < "${srcdir}/remove-xdg-scripts.patch"
}
package() {
msg2 "Running Mathematica installer"
# https://reference.wolfram.com/language/tutorial/InstallingMathematica.html#650929293
- sh "${srcdir}/bundle/Unix/Installer/MathInstaller" \
+ sh "${srcdir}/bundle/Unix/Installer/WolframInstaller" \
-execdir="${pkgdir}/usr/bin" \
-targetdir="${pkgdir}/opt/Mathematica" \
-auto
@@ -148,15 +150,15 @@ package() {
ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript
cd ${pkgdir}/usr/bin
rm *
- ln -s /opt/Mathematica/Executables/math
- ln -s /opt/Mathematica/Executables/mathematica
- ln -s /opt/Mathematica/Executables/Mathematica
- ln -s /opt/Mathematica/Executables/MathKernel
- ln -s /opt/Mathematica/Executables/mcc
- ln -s /opt/Mathematica/Executables/wolfram
- ln -s /opt/Mathematica/Executables/WolframKernel
- ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/ELProver
- ln -s /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript
+ ln -sf /opt/Mathematica/Executables/math
+ ln -sf /opt/Mathematica/Executables/MathKernel
+ ln -sf /opt/Mathematica/Executables/WolframNB
+ ln -sf /opt/Mathematica/Executables/wolframscript
+ ln -sf /opt/Mathematica/Executables/mcc
+ ln -sf /opt/Mathematica/Executables/wolfram
+ ln -sf /opt/Mathematica/Executables/WolframKernel
+ ln -sf /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/ELProver
+ ln -sf /opt/Mathematica/SystemFiles/Kernel/Binaries/Linux-x86-64/wolframscript
msg2 "Setting up WolframScript"
mkdir -p ${srcdir}/WolframScript
@@ -172,9 +174,9 @@ package() {
${pkgdir}/usr/share/desktop-directories \
${pkgdir}/usr/share/mime/packages
cd ${pkgdir}/opt/Mathematica/SystemFiles/Installation
- desktopFile="com.wolfram.Mathematica.${_pkgver}.desktop"
- sed -Ei "s|^(\s*TryExec=).*|\1/usr/bin/Mathematica|g" $desktopFile
- sed -Ei "s|^(\s*Exec=).*|\1/usr/bin/Mathematica --name com.wolfram.mathematica.${_pkgver} %F|g" $desktopFile
+ desktopFile="com.wolfram.Wolfram.${_pkgver}.desktop"
+ sed -Ei "s|^(\s*TryExec=).*|\1/usr/bin/WolframNB|g" $desktopFile
+ sed -Ei "s|^(\s*Exec=).*|\1/usr/bin/WolframNB --name com.wolfram.mathematica.${_pkgver} %F|g" $desktopFile
printf 'Categories=Science;Education;Languages;ArtificialIntelligence;Astronomy;Biology;Chemistry;ComputerScience;DataVisualization;Geography;ImageProcessing;Math;NumericalAnalysis;MedicalSoftware;Physics;ParallelComputer;\n' >> $desktopFile
cp $desktopFile ${pkgdir}/usr/share/applications/
cp *.directory ${pkgdir}/usr/share/desktop-directories/
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
Wolfram offers two bundles for Mathematica: one with offline docs included, and one which relies on online docs. I have created corresponding version of the Mathematica package in the AUR:
mathematica: As this package has historically always included offline docs, it will continue to do so now. As of 13.1.0, the package takes up around 14.1GiB with all documentation.mathematica-light: For those people who want a small package and/or want to use online docs, I have created this package which uses Wolfram's online-docs bundling of Mathematica. As of 13.3, the light version takes up around 7.2GiB.