public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
Date: Wed, 16 Oct 2024 21:42:58 +0000 (UTC)	[thread overview]
Message-ID: <1729114967.b9e54083441cc44a52ded149e226f2406c0779f7.dilfridge@gentoo> (raw)

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


             reply	other threads:[~2024-10-16 21:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 21:42 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-13 15:49 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/ Andreas K. Hüttel
2024-11-13 13:30 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-07-04 14:20 Andreas K. Hüttel
2020-06-24 14:11 Andreas K. Hüttel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1729114967.b9e54083441cc44a52ded149e226f2406c0779f7.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox