summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2020-06-24 17:10:28 +0300
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-06-24 17:11:05 +0300
commitc288c4436e2149b055a7434fde9b8d31c5d2fc95 (patch)
treeca82a5d32c64eafa1c7f9d8d53b74997fa8b47ca /sci-mathematics/mathematica
parentdev-lang/mozart: pin bootcompiler to scala-2.12 (diff)
downloadgentoo-c288c4436e2149b055a7434fde9b8d31c5d2fc95.tar.gz
gentoo-c288c4436e2149b055a7434fde9b8d31c5d2fc95.tar.bz2
gentoo-c288c4436e2149b055a7434fde9b8d31c5d2fc95.zip
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@gentoo.org>
Diffstat (limited to 'sci-mathematics/mathematica')
-rw-r--r--sci-mathematics/mathematica/Manifest2
-rw-r--r--sci-mathematics/mathematica/mathematica-10.3.1-r1.ebuild86
-rw-r--r--sci-mathematics/mathematica/mathematica-12.1.1.ebuild86
-rw-r--r--sci-mathematics/mathematica/metadata.xml8
4 files changed, 182 insertions, 0 deletions
diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
new file mode 100644
index 000000000000..3b54100ad204
--- /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 000000000000..51e74ad3cc99
--- /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 000000000000..51e74ad3cc99
--- /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 000000000000..80a71f597854
--- /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>