public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     f95a81542a0af9238d8d947c8f3207d220551738
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sun Jun 28 04:03:22 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f95a8154

sci-mathematics/mathematica: remove Windows/MacOS-specific files

This saves about 10MB, not a significant amount.

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Closes: https://github.com/gentoo/gentoo/pull/16463
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild | 4 ++++
 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index d5e4aec9ca1..6abf0f35a7d 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -42,6 +42,10 @@ src_unpack() {
 src_install() {
 	local ARCH='-x86-64'
 
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
 	if ! use doc; then
 		einfo "Removing documentation"
 		rm -r "${S}/${M_TARGET}/Documentation"

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index d5e4aec9ca1..b15d9ff6788 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -47,6 +47,10 @@ src_install() {
 		rm -r "${S}/${M_TARGET}/Documentation"
 	fi
 
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
 	# move all over
 	mv "${S}"/opt "${D}"/opt || die
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2024-11-13 15:49 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2024-11-13 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     b6f00c5af2f20400b53a91fc63a9cbd1390da370
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 15:48:40 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 15:49:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6f00c5a

sci-mathematics/mathematica: "fix" sandbox violation

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-14.1.0.ebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sci-mathematics/mathematica/mathematica-14.1.0.ebuild b/sci-mathematics/mathematica/mathematica-14.1.0.ebuild
index 9bf69ece025a..5bb3f3dad8d4 100644
--- a/sci-mathematics/mathematica/mathematica-14.1.0.ebuild
+++ b/sci-mathematics/mathematica/mathematica-14.1.0.ebuild
@@ -86,6 +86,10 @@ src_install() {
 	# fix ACCESS DENIED issue when installing documentation
 	sed -e "s|\(exec ./WolframInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" -i "Unix/Installer/WolframInstaller" || die
 
+	# in the depths of the installer it tests whether it can write here
+	# addpredict is by far the simplest solution
+	addpredict /usr/share/thisisatest
+
 	/bin/sh "Unix/Installer/WolframInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
 	popd > /dev/null || die
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2024-11-13 13:30 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2024-11-13 13:30 UTC (permalink / raw
  To: gentoo-commits

commit:     fd1ff435ed9286612b3a4646c6b4d79554eec8bd
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 13 13:29:32 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 13:30:08 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd1ff435

sci-mathematics/mathematica: add 14.1.0

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   2 +
 .../mathematica/mathematica-14.1.0.ebuild          | 207 +++++++++++++++++++++
 2 files changed, 209 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 791ae5409e9a..af4a541b89b1 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -11,3 +11,5 @@ DIST Mathematica_13.3.1_LINUX.sh 2057562969 BLAKE2B 9b76652135330b0b44027faad370
 DIST Mathematica_14.0.0_BNDL_LINUX.sh 6362499931 BLAKE2B d5c4df6e556c970103f0736c72fb0b4419d41c19eb8c3887412c84c39446436279b3c1a2b8b5eb76158ddc4ae55d0131b90ef9f769f2350fdec4b93a1c44f69c SHA512 1c16369501a9a7e5e7864438a766ac89bbe5f20100eda6da2bb03120ab112acd55dda63b0c68a056c7899db0a1c8881e97bf31b7d58fa75a095b3b979347b4d5
 DIST Mathematica_14.0.0_LINUX.sh 2175783771 BLAKE2B ceb6e0d9ee8ef5c548c5dcf5d426ff1678c039a66da3936e69cadb91c24102163be253a63af528fedc37ce87f9fd2617958934479ed570955a14a2b2980d5a0e SHA512 83c02183e892a3a5a9b2b6db4010b763b50b30ac8d9417ceb1256b3dd7d78ecbad132b7fcd7c797a64536b64e5894f54341379c4c599420faff5857bd0f22390
 DIST WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2
+DIST Wolfram_14.1.0_LIN.sh 2181436246 BLAKE2B fe51d8dc47e92c502d35847ccc27caec1321db693a0c77fbb8c6a7fea450cee256623b1427724d165cf85d2631dded5cf7ff43e24a1990a04b7e3c3b25d9ee2a SHA512 db6ca86308480dc623346bf0b4fb11008703768f67c83f5c2db5827497ecd856f564cd719a418bcd572e29e7ca9381d0b6fa4ba7de9a6d52b115106bd8517818
+DIST Wolfram_14.1.0_LIN_Bndl.sh 6452683618 BLAKE2B 51353b92af4bbe9b650513458171a9df5bb853ad2750a206bf9533cd9e797ea98b78bfc92dae9a4c98bd86a50a9acfa423439bb1d0d877c9128a9a530520869c SHA512 b8618468a9a443183c23197bab8384237225131b422bd2315ebbba2bc15ef501a1f1a5ca30d6a689fa89ebce8050cf86497fc08c2c80ae034a18aa8921a95791

diff --git a/sci-mathematics/mathematica/mathematica-14.1.0.ebuild b/sci-mathematics/mathematica/mathematica-14.1.0.ebuild
new file mode 100644
index 000000000000..9bf69ece025a
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-14.1.0.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2024 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"
+
+# Note: Please do not "remove old". Mathematica is licensed by version, and there
+# are certainly still active installations of old versions around.
+# That said, the compatibility of old versions with new Linux installs is not
+# really great...
+
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+SRC_URI="
+	bundle?  ( Wolfram_${PV}_LIN_Bndl.sh )
+	!bundle? ( Wolfram_${PV}_LIN.sh )
+"
+S="${WORKDIR}"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="bundle 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-libs/openssl-compat:1.1.1
+	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="math MathKernel mcc wolfram WolframKernel wolframnb WolframNB wolframscript"
+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/WolframInstaller" || die
+	sed -e "s|xdg-desktop-menu|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die
+	sed -e "s|xdg-icon-resource|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die
+	sed -e "s|xdg-mime|xdg-dummy-command|g" -i "Unix/Installer/WolframInstaller" || die
+	# fix ACCESS DENIED issue when installer check the avahi-daemon
+	sed -e "s|avahi-daemon -c|true|g" -i "Unix/Installer/WolframInstaller" || die
+	# fix ACCESS DENIED issue when installing documentation
+	sed -e "s|\(exec ./WolframInstaller\) -noprompt|\1 -auto -targetdir=${S}/${M_TARGET}/Documentation -noexec|" -i "Unix/Installer/WolframInstaller" || die
+
+	/bin/sh "Unix/Installer/WolframInstaller" -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 -r {} + || 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/MacOSX-ARM64" || 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}
+		[[ "$(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
+		if [[ -e "${ED}/${M_TARGET}/Executables/${name}" || -h "${ED}/${M_TARGET}/Executables/${name}" ]] ; then
+			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}"
+
+			einfo "Symlinking ${name} to /opt/bin"
+			dosym ../../usr/bin/${name} /opt/bin/${name}
+		else
+			ewarn "${name} in M_BINARIES does not exist in ${PV}"
+		fi
+	done
+
+	# for convenience
+	if [[ ! -e "${ED}/usr/bin/Mathematica" ]] ; then
+		dosym WolframNB /usr/bin/Mathematica
+	fi
+
+	# fix some embedded paths and install desktop files
+	for filename in $(find "${ED}/${M_TARGET}/SystemFiles/Installation" -name "*.desktop") ; do
+		einfo "Fixing ${filename}"
+		sed -e "s|${S}||g" -e 's|^\t\t||g' -e 's|\\+|+|g' -e 's:Version=2.0:Version=1.5: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-wolfram.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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2024-10-16 21:42 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2024-10-16 21:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b9e54083441cc44a52ded149e226f2406c0779f7
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 16 21:42:22 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Oct 16 21:42:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9e54083

sci-mathematics/mathematica: for M 10, we also need to preload harfbuzz now

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 .../mathematica/mathematica-10.3.1-r2.ebuild       | 96 ++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r2.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r2.ebuild
new file mode 100644
index 000000000000..510ff88f5a6e
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r2.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+	media-libs/harfbuzz
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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 --confirm -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libharfbuzz.so.0:/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2024-07-30 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2024-07-30 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     282c4b518562e6c194761d9ce0882f30672219c5
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 30 14:17:14 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jul 30 14:20:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=282c4b51

sci-mathematics/mathematica: add 14.0.0

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   2 +
 .../mathematica/mathematica-14.0.0.ebuild          | 191 +++++++++++++++++++++
 2 files changed, 193 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 7de6a79d2046..791ae5409e9a 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -8,4 +8,6 @@ DIST Mathematica_13.1.0_LINUX.sh 2032362325 BLAKE2B d044fe1ed3c71e6ebc2357c440af
 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 Mathematica_13.3.1_LINUX.sh 2057562969 BLAKE2B 9b76652135330b0b44027faad3703c1bf0dae3913416d2839e90582323291415fcbc7a59ca0bed152717a2e323d1b0f2ed2f46d700477b9574dec128ccaa8843 SHA512 cd470e1d171ab2df56b4d59fc9f156544217ea11c5e2d67683ca38c6a579cfebf4271bca7a52675fdab1d1d2d34a9b22410a93d95069a9008b2a377aae279201
+DIST Mathematica_14.0.0_BNDL_LINUX.sh 6362499931 BLAKE2B d5c4df6e556c970103f0736c72fb0b4419d41c19eb8c3887412c84c39446436279b3c1a2b8b5eb76158ddc4ae55d0131b90ef9f769f2350fdec4b93a1c44f69c SHA512 1c16369501a9a7e5e7864438a766ac89bbe5f20100eda6da2bb03120ab112acd55dda63b0c68a056c7899db0a1c8881e97bf31b7d58fa75a095b3b979347b4d5
+DIST Mathematica_14.0.0_LINUX.sh 2175783771 BLAKE2B ceb6e0d9ee8ef5c548c5dcf5d426ff1678c039a66da3936e69cadb91c24102163be253a63af528fedc37ce87f9fd2617958934479ed570955a14a2b2980d5a0e SHA512 83c02183e892a3a5a9b2b6db4010b763b50b30ac8d9417ceb1256b3dd7d78ecbad132b7fcd7c797a64536b64e5894f54341379c4c599420faff5857bd0f22390
 DIST WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2

diff --git a/sci-mathematics/mathematica/mathematica-14.0.0.ebuild b/sci-mathematics/mathematica/mathematica-14.0.0.ebuild
new file mode 100644
index 000000000000..f75781884235
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-14.0.0.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2024 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="
+	bundle?  ( Mathematica_${PV}_BNDL_LINUX.sh )
+	!bundle? ( Mathematica_${PV}_LINUX.sh )
+"
+S="${WORKDIR}"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="bundle 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/MacOSX-ARM64" || 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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2023-11-10 13:30 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2023-11-10 13:30 UTC (permalink / raw
  To: gentoo-commits

commit:     753167a9a57a98985efae7b97ad02763eeec63a6
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 10 13:21:26 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Nov 10 13:28:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=753167a9

sci-mathematics/mathematica: add option to install from non-bundle file

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest                  | 1 +
 sci-mathematics/mathematica/mathematica-13.3.1.ebuild | 7 +++++--
 sci-mathematics/mathematica/metadata.xml              | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 32d0e3f76004..7de6a79d2046 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -7,4 +7,5 @@ DIST Mathematica_13.0.1_BNDL_LINUX.sh 5094982487 BLAKE2B 55375b6038422fd5f11db36
 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 Mathematica_13.3.1_LINUX.sh 2057562969 BLAKE2B 9b76652135330b0b44027faad3703c1bf0dae3913416d2839e90582323291415fcbc7a59ca0bed152717a2e323d1b0f2ed2f46d700477b9574dec128ccaa8843 SHA512 cd470e1d171ab2df56b4d59fc9f156544217ea11c5e2d67683ca38c6a579cfebf4271bca7a52675fdab1d1d2d34a9b22410a93d95069a9008b2a377aae279201
 DIST WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2

diff --git a/sci-mathematics/mathematica/mathematica-13.3.1.ebuild b/sci-mathematics/mathematica/mathematica-13.3.1.ebuild
index 82dfd39089d6..7f24c3decc37 100644
--- a/sci-mathematics/mathematica/mathematica-13.3.1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-13.3.1.ebuild
@@ -8,13 +8,16 @@ inherit check-reqs desktop unpacker xdg
 
 DESCRIPTION="Wolfram Mathematica"
 HOMEPAGE="https://www.wolfram.com/mathematica/"
-SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh"
+SRC_URI="
+	bundle?  ( Mathematica_${PV}_BNDL_LINUX.sh )
+	!bundle? ( Mathematica_${PV}_LINUX.sh )
+"
 S="${WORKDIR}"
 
 LICENSE="all-rights-reserved"
 KEYWORDS="-* ~amd64"
 SLOT="0"
-IUSE="cuda doc ffmpeg R"
+IUSE="bundle cuda doc ffmpeg R"
 
 RESTRICT="strip mirror bindist fetch"
 

diff --git a/sci-mathematics/mathematica/metadata.xml b/sci-mathematics/mathematica/metadata.xml
index 3e0af950b15f..0c3a772ad76d 100644
--- a/sci-mathematics/mathematica/metadata.xml
+++ b/sci-mathematics/mathematica/metadata.xml
@@ -22,6 +22,7 @@
 		with programs written in other programming languages.
 	</longdescription>
 	<use>
+		<flag name="bundle">Install from Wolfram's bundle file or from Mathematica only</flag>
 		<flag name="cuda">Install with cuda support</flag>
 		<flag name="R">Enable <pkg>dev-lang/R</pkg> backend support</flag>
 		<flag name="ffmpeg">Enable <pkg>media-video/ffmpeg</pkg> backend support</flag>


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2023-09-27  8:42 Andrew Ammerlaan
  0 siblings, 0 replies; 22+ messages in thread
From: Andrew Ammerlaan @ 2023-09-27  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     9e9f187b3420b23315e79b166cbc078d4faad73d
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 27 08:40:32 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 08:41:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e9f187b

sci-mathematics/mathematica: add 13.3.1

Closes: https://bugs.gentoo.org/913011
Co-authored-by: K Cameron <cameron <AT> ieee.org>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-13.3.1.ebuild          | 188 +++++++++++++++++++++
 2 files changed, 189 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 35f7e055fb48..32d0e3f76004 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -6,4 +6,5 @@ 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

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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2023-03-03 14:26 Andrew Ammerlaan
  0 siblings, 0 replies; 22+ messages in thread
From: Andrew Ammerlaan @ 2023-03-03 14:26 UTC (permalink / raw
  To: gentoo-commits

commit:     4ff1e59ed4d38db1f906f022a80ae130f5fa1d08
Author:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  3 14:24:21 2023 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Mar  3 14:25:58 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ff1e59e

sci-mathematics/mathematica: add 13.2.1

Closes: https://bugs.gentoo.org/894242
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-13.2.1.ebuild          | 174 +++++++++++++++++++++
 2 files changed, 175 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 7a6a8e62ab4a..35f7e055fb48 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -5,4 +5,5 @@ DIST Mathematica_12.2.0_LINUX.sh 4454613844 BLAKE2B 03b0567afe001fd0781ea6daf0f2
 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
 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 WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2

diff --git a/sci-mathematics/mathematica/mathematica-13.2.1.ebuild b/sci-mathematics/mathematica/mathematica-13.2.1.ebuild
new file mode 100644
index 000000000000..d5bae7e2927e
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-13.2.1.ebuild
@@ -0,0 +1,174 @@
+# 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-5.0.so) requires media-video/ffmpeg
+RDEPEND="
+	cuda? ( dev-util/nvidia-cuda-toolkit )
+	media-libs/freetype
+	ffmpeg? ( <media-video/ffmpeg-5 )
+	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/*"
+
+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
+	/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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2022-08-08 17:29 Andrew Ammerlaan
  0 siblings, 0 replies; 22+ messages in thread
From: Andrew Ammerlaan @ 2022-08-08 17:29 UTC (permalink / raw
  To: gentoo-commits

commit:     d8604b22be0a1830f994501fc5dffbf53dac94d2
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Sun Aug  7 15:50:22 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Aug  8 17:29:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8604b22

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 <AT> gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-13.0.1.ebuild          | 160 +++++++++++++++++++++
 sci-mathematics/mathematica/metadata.xml           |  28 +++-
 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>


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2022-08-08 17:29 Andrew Ammerlaan
  0 siblings, 0 replies; 22+ messages in thread
From: Andrew Ammerlaan @ 2022-08-08 17:29 UTC (permalink / raw
  To: gentoo-commits

commit:     7d27cc6b9b5330b09c9e1e2870882654e11a6cee
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Sun Aug  7 15:51:12 2022 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Aug  8 17:29:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d27cc6b

sci-mathematics/mathematica: add 13.1.0

Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25148
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   2 +
 .../mathematica/mathematica-13.1.0.ebuild          | 189 +++++++++++++++++++++
 sci-mathematics/mathematica/metadata.xml           |   1 +
 3 files changed, 192 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index e465fb6c5a09..7a6a8e62ab4a 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -4,3 +4,5 @@ DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c88
 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
+DIST Mathematica_13.1.0_LINUX.sh 2032362325 BLAKE2B d044fe1ed3c71e6ebc2357c440af6feaeb360962aea32843abbdfe40f124a29bd07bf0c3a5a35f8bac29c97a7d23dbcd79967b6d0028d01e09c9b662fc1f2b95 SHA512 3d84313be4da86d72cc652b0ec7dbbbf6d815debbde4c9ab855f447dda36aeccb416e90d298f0be975ae86fdf55f20aa7597b0d96d291ebdf6e4eb0dc2ca5433
+DIST WLDocs_13.1.0_LINUX.sh 3546448755 BLAKE2B e5dbf6bf9cd60a313329df8591c281215039d7efa7c83a53f3b2d4e176765b62efae3ff04628ecf6905e76bbaf6867e87c96bd6188d13df2b981bea5a633335a SHA512 2107b37b30fc76974d040e746ca26ddb5df23bbacb9d8fabcd546a7cf789f1daaf70179c53890bed2385430665f601fbbc1f9829bf64f61068909ea8774f91d2

diff --git a/sci-mathematics/mathematica/mathematica-13.1.0.ebuild b/sci-mathematics/mathematica/mathematica-13.1.0.ebuild
new file mode 100644
index 000000000000..577553f186a1
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-13.1.0.ebuild
@@ -0,0 +1,189 @@
+# 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="
+	doc? ( WLDocs_${PV}_LINUX.sh )
+	Mathematica_${PV}_LINUX.sh
+"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+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-5.0.so) requires media-video/ffmpeg
+RDEPEND="
+	cuda? ( dev-util/nvidia-cuda-toolkit )
+	media-libs/freetype
+	ffmpeg? ( media-video/ffmpeg )
+	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}/Mathematica_${PV}_LINUX.sh" --nox11 --keep --target "${S}/unpack_app" -- "-help" || die
+	if use doc; then
+		/bin/sh "${DISTDIR}/WLDocs_${PV}_LINUX.sh" --nox11 --keep --target "${S}/unpack_doc" -- "-help" || die
+	fi
+}
+
+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
+	/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
+	else
+		pushd "${S}/unpack_doc" > /dev/null || die
+		/bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/temp_doc" "-execdir=${S}/opt/bin" || die
+		popd > /dev/null || die
+		# Merge contents of Mathematica_docs with Mathematica
+		rm -r "${S}/${M_TARGET}"/Documentation/English/{SearchIndex,System} || die
+		mv "${S}"/temp_doc/Documentation/English/* "${S}/${M_TARGET}/"Documentation/English/ || die
+		rm -r "${S}"/temp_doc || 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 || ! has_version '>=media-video/ffmpeg-5'; then
+		einfo 'Removing FFmpegTools support because lack of >=media-video/ffmpeg-5'
+		rm -r "${S}/${M_TARGET}/SystemFiles/Links/FFmpegTools/LibraryResources/Linux-x86-64/FFmpegToolsSystem-5.0.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 90d6c3bbe4c6..3e0af950b15f 100644
--- a/sci-mathematics/mathematica/metadata.xml
+++ b/sci-mathematics/mathematica/metadata.xml
@@ -24,5 +24,6 @@
 	<use>
 		<flag name="cuda">Install with cuda support</flag>
 		<flag name="R">Enable <pkg>dev-lang/R</pkg> backend support</flag>
+		<flag name="ffmpeg">Enable <pkg>media-video/ffmpeg</pkg> backend support</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2022-01-27 23:36 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2022-01-27 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     90e9fdc8d93b32a7e76802d1e752676b8b002012
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 27 23:35:36 2022 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 23:36:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90e9fdc8

sci-mathematics/mathematica: drop unused unpacker.eclass

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-12.2.0.ebuild | 4 ++--
 sci-mathematics/mathematica/mathematica-13.0.0.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-12.2.0.ebuild b/sci-mathematics/mathematica/mathematica-12.2.0.ebuild
index 85cab466a173..8582dd407643 100644
--- a/sci-mathematics/mathematica/mathematica-12.2.0.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.2.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit desktop multilib unpacker xdg
+inherit desktop multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_LINUX.sh"

diff --git a/sci-mathematics/mathematica/mathematica-13.0.0.ebuild b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
index b8f0969c94ac..4852a7e91f32 100644
--- a/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
+++ b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
 
-inherit desktop multilib unpacker xdg
+inherit desktop multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh"


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2022-01-27 23:36 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2022-01-27 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     69c12e7c0d8e4d93f5ffe3ee34a65678ba76c69e
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Thu Dec 23 03:10:53 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 23:36:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c12e7c

sci-mathematics/mathematica: bump to 13.0.0

Close: https://bugs.gentoo.org/789387
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23476
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-13.0.0.ebuild          | 104 +++++++++++++++++++++
 2 files changed, 105 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 7aec0d486c57..ed9457c860c2 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -2,3 +2,4 @@ DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef53
 DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9facdcac36db691f7fd93e4a8228960acc9ec4b74b12ca19556c01247bd7927497f01f0c339a099b7f5abc7547051cc99c1fce SHA512 a661aa644944ee1058d7429f352ba6508514314086676a6eb918aac32773cc949feb531951b614be53198fa863575d8db456c66aa1306fd858c23423ef590fbb
 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

diff --git a/sci-mathematics/mathematica/mathematica-13.0.0.ebuild b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
new file mode 100644
index 000000000000..b8f0969c94ac
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib 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="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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"
+	fi
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica*.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2022-01-27 23:36 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2022-01-27 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     07f8823ea56d6d185798ffda411b6dc3ee66b90f
Author:     Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Tue May 11 04:17:02 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 23:36:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07f8823e

sci-mathematics/mathematica: bump to 12.2.0

Closes: https://bugs.gentoo.org/789387
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20766
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-12.2.0.ebuild          | 104 +++++++++++++++++++++
 2 files changed, 105 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 4abc79ccc18c..7aec0d486c57 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -1,3 +1,4 @@
 DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef536dbdc2d49a775130442e21493d6a0756527362fddfa7fabf927f996464456309c37b10b70a37f05718cb9f79d8ffc5912098 SHA512 08658a01a18c14a9b3f422816007980bf6576162e4cca6779ed1bdaf6b9748fb36a195006529ed6725f462042a264e7ee7753e802af8072ba6bebfee0cad8543
 DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9facdcac36db691f7fd93e4a8228960acc9ec4b74b12ca19556c01247bd7927497f01f0c339a099b7f5abc7547051cc99c1fce SHA512 a661aa644944ee1058d7429f352ba6508514314086676a6eb918aac32773cc949feb531951b614be53198fa863575d8db456c66aa1306fd858c23423ef590fbb
 DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490
+DIST Mathematica_12.2.0_LINUX.sh 4454613844 BLAKE2B 03b0567afe001fd0781ea6daf0f23ccaccf44ed6ce225cc190239d228c684099a1fa1070cedc0c5bf1517804a4b8b34903d56b2b028392895437a304b56f682d SHA512 0b98d0f2a15ea834892897a64089da08bee5783a8a51b1a0e624618105c896c91c865cca5b5c7b8e72569a5065ef091be7138b7d72d94e4697a213a91d5b8770

diff --git a/sci-mathematics/mathematica/mathematica-12.2.0.ebuild b/sci-mathematics/mathematica/mathematica-12.2.0.ebuild
new file mode 100644
index 000000000000..85cab466a173
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-12.2.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib unpacker xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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"
+	fi
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica*.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2021-01-21 22:46 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2021-01-21 22:46 UTC (permalink / raw
  To: gentoo-commits

commit:     22ec2753ab36742c143f6764716e2df61cd27aa9
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 22:44:51 2021 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 22:45:50 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22ec2753

Revert "sci-mathematics/mathematica: Remove old"

a) different major versions = different license
b) strangely not every univ has access to all tarballs ...

This reverts commit 98a9c72a9703bbf1072fda5f2d030786fcd81a8e.

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   2 +
 .../mathematica/mathematica-10.3.1-r1.ebuild       |  95 ++++++++++++++++++
 .../mathematica/mathematica-12.1.0.ebuild          | 108 +++++++++++++++++++++
 3 files changed, 205 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index d39a2b13536..4abc79ccc18 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -1 +1,3 @@
+DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef536dbdc2d49a775130442e21493d6a0756527362fddfa7fabf927f996464456309c37b10b70a37f05718cb9f79d8ffc5912098 SHA512 08658a01a18c14a9b3f422816007980bf6576162e4cca6779ed1bdaf6b9748fb36a195006529ed6725f462042a264e7ee7753e802af8072ba6bebfee0cad8543
+DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9facdcac36db691f7fd93e4a8228960acc9ec4b74b12ca19556c01247bd7927497f01f0c339a099b7f5abc7547051cc99c1fce SHA512 a661aa644944ee1058d7429f352ba6508514314086676a6eb918aac32773cc949feb531951b614be53198fa863575d8db456c66aa1306fd858c23423ef590fbb
 DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
new file mode 100644
index 00000000000..6abf0f35a7d
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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 --confirm -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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/mathematica-12.1.0.ebuild b/sci-mathematics/mathematica/mathematica-12.1.0.ebuild
new file mode 100644
index 00000000000..20aaab87c6f
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-12.1.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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() {
+	default
+
+	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
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-10-28 13:02 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-10-28 13:02 UTC (permalink / raw
  To: gentoo-commits

commit:     a5c9881856984f59c97200542d54ba3355168572
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 28 12:57:40 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 12:58:10 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5c98818

sci-mathematics/mathematica: Add 12.1.0 for whoever cant get 12.1.1

(like me right now...)

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |   1 +
 .../mathematica/mathematica-12.1.0.ebuild          | 108 +++++++++++++++++++++
 2 files changed, 109 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
index 3b54100ad20..4abc79ccc18 100644
--- a/sci-mathematics/mathematica/Manifest
+++ b/sci-mathematics/mathematica/Manifest
@@ -1,2 +1,3 @@
 DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef536dbdc2d49a775130442e21493d6a0756527362fddfa7fabf927f996464456309c37b10b70a37f05718cb9f79d8ffc5912098 SHA512 08658a01a18c14a9b3f422816007980bf6576162e4cca6779ed1bdaf6b9748fb36a195006529ed6725f462042a264e7ee7753e802af8072ba6bebfee0cad8543
+DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9facdcac36db691f7fd93e4a8228960acc9ec4b74b12ca19556c01247bd7927497f01f0c339a099b7f5abc7547051cc99c1fce SHA512 a661aa644944ee1058d7429f352ba6508514314086676a6eb918aac32773cc949feb531951b614be53198fa863575d8db456c66aa1306fd858c23423ef590fbb
 DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490

diff --git a/sci-mathematics/mathematica/mathematica-12.1.0.ebuild b/sci-mathematics/mathematica/mathematica-12.1.0.ebuild
new file mode 100644
index 00000000000..20aaab87c6f
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-12.1.0.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop multilib xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE="+doc"
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(ver_cut 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript 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() {
+	default
+
+	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
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
+	einfo 'Removing MacOS- and Windows-specific files'
+	find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
+		-o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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 "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		domenu "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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}"
+}


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-09-20 16:10 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-09-20 16:10 UTC (permalink / raw
  To: gentoo-commits

commit:     240c051971ed9f661743a0d5e5a98ea63189e0e2
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 20 16:09:22 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Sep 20 16:09:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=240c0519

sci-mathematics/mathematica: Fix avahi-related sandbox error

Patch by vowstar <vowstar <AT> gmail.com>

Closese: https://bugs.gentoo.org/739130
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index b15d9ff6788..20aaab87c6f 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -36,7 +36,20 @@ QA_PREBUILT="opt/*"
 S=${WORKDIR}
 
 src_unpack() {
-	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+	/bin/sh "${DISTDIR}/${A}" --nox11 --keep --target "${S}/unpack" -- "-help" || die
+}
+
+src_prepare() {
+	default
+
+	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
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     78dbc3076907b0fd36d77afdc710545ba9a1d329
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sat Jun 27 22:40:40 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78dbc307

sci-mathematics/mathematica: declare ${M_TARGET} for uniformity

This fixes the 12.1.1 ebuild trying to use 10.3 directories.

Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild         | 9 +++++----
 .../{mathematica-12.1.1.ebuild => mathematica-12.1.1-r1.ebuild}  | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index 51e74ad3cc9..7f5efeb8efa 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -28,6 +28,7 @@ RDEPEND="
 MPN="Mathematica"
 MPV=$(get_version_component_range 1-2)
 M_BINARIES="MathKernel Mathematica MathematicaScript 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/*"
@@ -35,7 +36,7 @@ QA_PREBUILT="opt/*"
 S=${WORKDIR}
 
 src_unpack() {
-	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/opt/Wolfram/${MPN}/${MPV}" "-execdir=${S}/opt/bin" || die
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
 }
 
 src_install() {
@@ -51,7 +52,7 @@ src_install() {
 	for name in ${M_BINARIES} ; do
 		einfo "Generating wrapper for ${name}"
 		echo '#!/bin/sh' >> "${T}/${name}"
-		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /opt/Wolfram/${MPN}/${MPV}/Executables/${name} \$*" \
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
 			>> "${T}/${name}"
 		dobin "${T}/${name}"
 	done
@@ -62,7 +63,7 @@ src_install() {
 
 	# fix some embedded paths and install desktop files
 	insinto /usr/share/applications
-	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
 		echo Fixing "${filename}"
 		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
 		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
@@ -71,7 +72,7 @@ src_install() {
 
 	# install mime types
 	insinto /usr/share/mime/application
-	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "application-*.xml"); do
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
 		basefilename=$(basename "${filename}")
 		mv "${filename}" "${T}/${basefilename#application-}"
 		doins "${T}/${basefilename#application-}"

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
similarity index 85%
rename from sci-mathematics/mathematica/mathematica-12.1.1.ebuild
rename to sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index 51e74ad3cc9..7f5efeb8efa 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -28,6 +28,7 @@ RDEPEND="
 MPN="Mathematica"
 MPV=$(get_version_component_range 1-2)
 M_BINARIES="MathKernel Mathematica MathematicaScript 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/*"
@@ -35,7 +36,7 @@ QA_PREBUILT="opt/*"
 S=${WORKDIR}
 
 src_unpack() {
-	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/opt/Wolfram/${MPN}/${MPV}" "-execdir=${S}/opt/bin" || die
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
 }
 
 src_install() {
@@ -51,7 +52,7 @@ src_install() {
 	for name in ${M_BINARIES} ; do
 		einfo "Generating wrapper for ${name}"
 		echo '#!/bin/sh' >> "${T}/${name}"
-		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /opt/Wolfram/${MPN}/${MPV}/Executables/${name} \$*" \
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
 			>> "${T}/${name}"
 		dobin "${T}/${name}"
 	done
@@ -62,7 +63,7 @@ src_install() {
 
 	# fix some embedded paths and install desktop files
 	insinto /usr/share/applications
-	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
 		echo Fixing "${filename}"
 		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
 		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
@@ -71,7 +72,7 @@ src_install() {
 
 	# install mime types
 	insinto /usr/share/mime/application
-	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "application-*.xml"); do
+	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
 		basefilename=$(basename "${filename}")
 		mv "${filename}" "${T}/${basefilename#application-}"
 		doins "${T}/${basefilename#application-}"


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     875f262e689f9ee5fac8f2f9267cc474f4b376be
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sat Jun 27 23:09:29 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:23 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=875f262e

sci-mathematics/mathematica: remove --keep when unpacking

This flag inflates the build directory by 4 GB for no reason.  Removing
it can reduce memory pressure when unpacking to tmpfs.

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild | 2 +-
 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index bcbabb70e37..864d3164620 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -36,7 +36,7 @@ QA_PREBUILT="opt/*"
 S=${WORKDIR}
 
 src_unpack() {
-	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
 }
 
 src_install() {

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index bcbabb70e37..864d3164620 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -36,7 +36,7 @@ QA_PREBUILT="opt/*"
 S=${WORKDIR}
 
 src_unpack() {
-	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm -- -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     bd92affe982e785060a0b9f0679c974d5920f120
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sun Jun 28 03:33:51 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd92affe

sci-mathematics/mathematica: add doc USE flag

The documentation for this package is recommended, but particularly
heavy.  Allow users to suppress installation if desired.

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild | 7 ++++++-
 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index a5af27f51d9..d5e4aec9ca1 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://www.wolfram.com/mathematica/"
 LICENSE="all-rights-reserved"
 KEYWORDS="-* ~amd64"
 SLOT="0"
-IUSE=""
+IUSE="+doc"
 
 RESTRICT="strip mirror bindist fetch"
 
@@ -42,6 +42,11 @@ src_unpack() {
 src_install() {
 	local ARCH='-x86-64'
 
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
 	# move all over
 	mv "${S}"/opt "${D}"/opt || die
 

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index a5af27f51d9..d5e4aec9ca1 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://www.wolfram.com/mathematica/"
 LICENSE="all-rights-reserved"
 KEYWORDS="-* ~amd64"
 SLOT="0"
-IUSE=""
+IUSE="+doc"
 
 RESTRICT="strip mirror bindist fetch"
 
@@ -42,6 +42,11 @@ src_unpack() {
 src_install() {
 	local ARCH='-x86-64'
 
+	if ! use doc; then
+		einfo "Removing documentation"
+		rm -r "${S}/${M_TARGET}/Documentation"
+	fi
+
 	# move all over
 	mv "${S}"/opt "${D}"/opt || die
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     178729f9d31a9d62239a26d20bb80ff871a0d211
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sat Jun 27 23:07:37 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=178729f9

sci-mathematics/mathematica: EAPI 7

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild | 6 +++---
 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index 7f5efeb8efa..bcbabb70e37 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit multilib versionator xdg
+inherit multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_LINUX.sh"
@@ -26,7 +26,7 @@ RDEPEND="
 
 # we need this a few times
 MPN="Mathematica"
-MPV=$(get_version_component_range 1-2)
+MPV=$(ver_cut 1-2)
 M_BINARIES="MathKernel Mathematica MathematicaScript WolframKernel WolframScript math mathematica mcc wolfram"
 M_TARGET="opt/Wolfram/${MPN}/${MPV}"
 

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index 7f5efeb8efa..bcbabb70e37 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit multilib versionator xdg
+inherit multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_LINUX.sh"
@@ -26,7 +26,7 @@ RDEPEND="
 
 # we need this a few times
 MPN="Mathematica"
-MPV=$(get_version_component_range 1-2)
+MPV=$(ver_cut 1-2)
 M_BINARIES="MathKernel Mathematica MathematicaScript WolframKernel WolframScript math mathematica mcc wolfram"
 M_TARGET="opt/Wolfram/${MPN}/${MPV}"
 


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-07-04 14:20 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-07-04 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     af9f1cd5d604ab73bb6f2fdea2e5034685e35853
Author:     Jeffrey Lin <jeffrey <AT> icurse <DOT> nl>
AuthorDate: Sat Jun 27 23:41:14 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jul  4 14:18:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af9f1cd5

sci-mathematics/mathematica: use domenu instead of direct insinto

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Jeffrey Lin <jeffrey <AT> icurse.nl>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild | 5 ++---
 sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
index 864d3164620..a5af27f51d9 100644
--- a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit multilib xdg
+inherit desktop multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_LINUX.sh"
@@ -62,12 +62,11 @@ src_install() {
 	done
 
 	# fix some embedded paths and install desktop files
-	insinto /usr/share/applications
 	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
 		echo Fixing "${filename}"
 		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
 		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
-		doins "${filename}"
+		domenu "${filename}"
 	done
 
 	# install mime types

diff --git a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
index 864d3164620..a5af27f51d9 100644
--- a/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
+++ b/sci-mathematics/mathematica/mathematica-12.1.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit multilib xdg
+inherit desktop multilib xdg
 
 DESCRIPTION="Wolfram Mathematica"
 SRC_URI="Mathematica_${PV}_LINUX.sh"
@@ -62,12 +62,11 @@ src_install() {
 	done
 
 	# fix some embedded paths and install desktop files
-	insinto /usr/share/applications
 	for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
 		echo Fixing "${filename}"
 		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
 		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
-		doins "${filename}"
+		domenu "${filename}"
 	done
 
 	# install mime types


^ permalink raw reply related	[flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
@ 2020-06-24 14:11 Andreas K. Hüttel
  0 siblings, 0 replies; 22+ messages in thread
From: Andreas K. Hüttel @ 2020-06-24 14:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c288c4436e2149b055a7434fde9b8d31c5d2fc95
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 24 14:10:28 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 14:11:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c288c443

sci-mathematics/mathematica: Import from dilfridge overlay

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/mathematica/Manifest               |  2 +
 .../mathematica/mathematica-10.3.1-r1.ebuild       | 86 ++++++++++++++++++++++
 .../mathematica/mathematica-12.1.1.ebuild          | 86 ++++++++++++++++++++++
 sci-mathematics/mathematica/metadata.xml           |  8 ++
 4 files changed, 182 insertions(+)

diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
new file mode 100644
index 00000000000..3b54100ad20
--- /dev/null
+++ b/sci-mathematics/mathematica/Manifest
@@ -0,0 +1,2 @@
+DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef536dbdc2d49a775130442e21493d6a0756527362fddfa7fabf927f996464456309c37b10b70a37f05718cb9f79d8ffc5912098 SHA512 08658a01a18c14a9b3f422816007980bf6576162e4cca6779ed1bdaf6b9748fb36a195006529ed6725f462042a264e7ee7753e802af8072ba6bebfee0cad8543
+DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490

diff --git a/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
new file mode 100644
index 00000000000..51e74ad3cc9
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE=""
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(get_version_component_range 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript WolframKernel WolframScript math mathematica mcc wolfram"
+
+# we might as well list all files in all QA variables...
+QA_PREBUILT="opt/*"
+
+S=${WORKDIR}
+
+src_unpack() {
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/opt/Wolfram/${MPN}/${MPV}" "-execdir=${S}/opt/bin" || die
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /opt/Wolfram/${MPN}/${MPV}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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
+	insinto /usr/share/applications
+	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		doins "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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/mathematica-12.1.1.ebuild b/sci-mathematics/mathematica/mathematica-12.1.1.ebuild
new file mode 100644
index 00000000000..51e74ad3cc9
--- /dev/null
+++ b/sci-mathematics/mathematica/mathematica-12.1.1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multilib versionator xdg
+
+DESCRIPTION="Wolfram Mathematica"
+SRC_URI="Mathematica_${PV}_LINUX.sh"
+HOMEPAGE="https://www.wolfram.com/mathematica/"
+
+LICENSE="all-rights-reserved"
+KEYWORDS="-* ~amd64"
+SLOT="0"
+IUSE=""
+
+RESTRICT="strip mirror bindist fetch"
+
+DEPEND=""
+
+# Mathematica comes with a lot of bundled stuff. We should place here only what we
+# explicitly override with LD_PRELOAD.
+RDEPEND="
+	media-libs/freetype
+"
+
+# we need this a few times
+MPN="Mathematica"
+MPV=$(get_version_component_range 1-2)
+M_BINARIES="MathKernel Mathematica MathematicaScript WolframKernel WolframScript math mathematica mcc wolfram"
+
+# we might as well list all files in all QA variables...
+QA_PREBUILT="opt/*"
+
+S=${WORKDIR}
+
+src_unpack() {
+	/bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/opt/Wolfram/${MPN}/${MPV}" "-execdir=${S}/opt/bin" || die
+}
+
+src_install() {
+	local ARCH='-x86-64'
+
+	# move all over
+	mv "${S}"/opt "${D}"/opt || die
+
+	# the autogenerated symlinks point into sandbox, remove
+	rm "${D}"/opt/bin/* || die
+
+	# install wrappers instead
+	for name in ${M_BINARIES} ; do
+		einfo "Generating wrapper for ${name}"
+		echo '#!/bin/sh' >> "${T}/${name}"
+		echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /opt/Wolfram/${MPN}/${MPV}/Executables/${name} \$*" \
+			>> "${T}/${name}"
+		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
+	insinto /usr/share/applications
+	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "wolfram-mathematica.desktop") ; do
+		echo Fixing "${filename}"
+		sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
+		echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
+		doins "${filename}"
+	done
+
+	# install mime types
+	insinto /usr/share/mime/application
+	for filename in $(find "${D}/opt/Wolfram/Mathematica/10.3/SystemFiles/Installation" -name "application-*.xml"); do
+		basefilename=$(basename "${filename}")
+		mv "${filename}" "${T}/${basefilename#application-}"
+		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
new file mode 100644
index 00000000000..80a71f59785
--- /dev/null
+++ b/sci-mathematics/mathematica/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <maintainer type="person">
+    <email>dilfridge@gentoo.org</email>
+    <name>Andreas K. Huettel</name>
+  </maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-11-13 15:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-04 14:20 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/ Andreas K. Hüttel
  -- strict thread matches above, loose matches on Subject: below --
2024-11-13 15:49 Andreas K. Hüttel
2024-11-13 13:30 Andreas K. Hüttel
2024-10-16 21:42 Andreas K. Hüttel
2024-07-30 14:20 Andreas K. Hüttel
2023-11-10 13:30 Andreas K. Hüttel
2023-09-27  8:42 Andrew Ammerlaan
2023-03-03 14:26 Andrew Ammerlaan
2022-08-08 17:29 Andrew Ammerlaan
2022-08-08 17:29 Andrew Ammerlaan
2022-01-27 23:36 Andreas K. Hüttel
2022-01-27 23:36 Andreas K. Hüttel
2022-01-27 23:36 Andreas K. Hüttel
2021-01-21 22:46 Andreas K. Hüttel
2020-10-28 13:02 Andreas K. Hüttel
2020-09-20 16:10 Andreas K. Hüttel
2020-07-04 14:20 Andreas K. Hüttel
2020-07-04 14:20 Andreas K. Hüttel
2020-07-04 14:20 Andreas K. Hüttel
2020-07-04 14:20 Andreas K. Hüttel
2020-07-04 14:20 Andreas K. Hüttel
2020-06-24 14:11 Andreas K. Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox