Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/mathematica/
Date: Thu, 27 Jan 2022 23:36:27
Message-Id: 1643326569.69c12e7c0d8e4d93f5ffe3ee34a65678ba76c69e.dilfridge@gentoo
1 commit: 69c12e7c0d8e4d93f5ffe3ee34a65678ba76c69e
2 Author: Huang Rui <vowstar <AT> gmail <DOT> com>
3 AuthorDate: Thu Dec 23 03:10:53 2021 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 27 23:36:09 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69c12e7c
7
8 sci-mathematics/mathematica: bump to 13.0.0
9
10 Close: https://bugs.gentoo.org/789387
11 Package-Manager: Portage-3.0.30, Repoman-3.0.3
12 Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/23476
14 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
15
16 sci-mathematics/mathematica/Manifest | 1 +
17 .../mathematica/mathematica-13.0.0.ebuild | 104 +++++++++++++++++++++
18 2 files changed, 105 insertions(+)
19
20 diff --git a/sci-mathematics/mathematica/Manifest b/sci-mathematics/mathematica/Manifest
21 index 7aec0d486c57..ed9457c860c2 100644
22 --- a/sci-mathematics/mathematica/Manifest
23 +++ b/sci-mathematics/mathematica/Manifest
24 @@ -2,3 +2,4 @@ DIST Mathematica_10.3.1_LINUX.sh 3200459545 BLAKE2B 5a057b4e714eabb0afebe5a3ef53
25 DIST Mathematica_12.1.0_LINUX.sh 5889770327 BLAKE2B b0e637714f376d4066d5e484ef9facdcac36db691f7fd93e4a8228960acc9ec4b74b12ca19556c01247bd7927497f01f0c339a099b7f5abc7547051cc99c1fce SHA512 a661aa644944ee1058d7429f352ba6508514314086676a6eb918aac32773cc949feb531951b614be53198fa863575d8db456c66aa1306fd858c23423ef590fbb
26 DIST Mathematica_12.1.1_LINUX.sh 4438946649 BLAKE2B 473f814a3e0686bb3a6ac1f49c887842bc17db11439b65c1dad1dae8cd5797e6762d94bccdf156f6f9ba1edb9a16ed5172936a6884d2f0f98c29808214b1eabe SHA512 5cfdd91bae9bad53afe405b40759732589119256c3f785058808b20faf21f593d90bf7bb2dbaccf3e983aa84ff380a1fa6d40fd63f5ba17109c1cd6818c63490
27 DIST Mathematica_12.2.0_LINUX.sh 4454613844 BLAKE2B 03b0567afe001fd0781ea6daf0f23ccaccf44ed6ce225cc190239d228c684099a1fa1070cedc0c5bf1517804a4b8b34903d56b2b028392895437a304b56f682d SHA512 0b98d0f2a15ea834892897a64089da08bee5783a8a51b1a0e624618105c896c91c865cca5b5c7b8e72569a5065ef091be7138b7d72d94e4697a213a91d5b8770
28 +DIST Mathematica_13.0.0_BNDL_LINUX.sh 5118155611 BLAKE2B ff15a9def53f7fb808b117ecf2573f415b928c13a86d15634e6282c8f8542b32fa42ff76baeac95faa1242dc4350b0db28231c5cb7f36bc5b57425c2804bf996 SHA512 05008559c531a6920745d0047be0f2c42cb6994309db3f2ee2ad44151655f43d88de063a4952c5ac5544818e2da8973305ee46f44e74d7301da21cdf710cbd5b
29
30 diff --git a/sci-mathematics/mathematica/mathematica-13.0.0.ebuild b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
31 new file mode 100644
32 index 000000000000..b8f0969c94ac
33 --- /dev/null
34 +++ b/sci-mathematics/mathematica/mathematica-13.0.0.ebuild
35 @@ -0,0 +1,104 @@
36 +# Copyright 1999-2021 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=7
40 +
41 +inherit desktop multilib unpacker xdg
42 +
43 +DESCRIPTION="Wolfram Mathematica"
44 +SRC_URI="Mathematica_${PV}_BNDL_LINUX.sh"
45 +HOMEPAGE="https://www.wolfram.com/mathematica/"
46 +
47 +LICENSE="all-rights-reserved"
48 +KEYWORDS="-* ~amd64"
49 +SLOT="0"
50 +IUSE="+doc"
51 +
52 +RESTRICT="strip mirror bindist fetch"
53 +
54 +DEPEND=""
55 +
56 +# Mathematica comes with a lot of bundled stuff. We should place here only what we
57 +# explicitly override with LD_PRELOAD.
58 +RDEPEND="
59 + media-libs/freetype
60 +"
61 +
62 +# we need this a few times
63 +MPN="Mathematica"
64 +MPV=$(ver_cut 1-2)
65 +M_BINARIES="MathKernel Mathematica MathematicaScript WolframKernel WolframScript math mathematica mcc wolfram"
66 +M_TARGET="opt/Wolfram/${MPN}/${MPV}"
67 +
68 +# we might as well list all files in all QA variables...
69 +QA_PREBUILT="opt/*"
70 +
71 +S=${WORKDIR}
72 +
73 +src_unpack() {
74 + /bin/sh "${DISTDIR}/${A}" --nox11 --keep --target "${S}/unpack" -- "-help" || die
75 +}
76 +
77 +src_prepare() {
78 + pushd "${S}/unpack" > /dev/null || die
79 + # fix ACCESS DENIED issue when installer check the avahi-daemon
80 + sed -e "s:avahi-daemon -c:true:g" -i "Unix/Installer/MathInstaller" || die
81 + /bin/sh "Unix/Installer/MathInstaller" -auto "-targetdir=${S}/${M_TARGET}" "-execdir=${S}/opt/bin" || die
82 + popd > /dev/null || die
83 + eapply_user
84 +}
85 +
86 +src_install() {
87 + local ARCH='-x86-64'
88 +
89 + if ! use doc; then
90 + einfo "Removing documentation"
91 + rm -r "${S}/${M_TARGET}/Documentation"
92 + fi
93 +
94 + einfo 'Removing MacOS- and Windows-specific files'
95 + find AddOns SystemFiles -type d -\( -name Windows -o -name Windows-x86-64 \
96 + -o -name MacOSX -o -name MacOSX-x86-64 -\) -delete
97 +
98 + # move all over
99 + mv "${S}"/opt "${D}"/opt || die
100 +
101 + # the autogenerated symlinks point into sandbox, remove
102 + rm "${D}"/opt/bin/* || die
103 +
104 + # install wrappers instead
105 + for name in ${M_BINARIES} ; do
106 + einfo "Generating wrapper for ${name}"
107 + echo '#!/bin/sh' >> "${T}/${name}"
108 + echo "LD_PRELOAD=/usr/$(get_libdir)/libfreetype.so.6:/$(get_libdir)/libz.so.1 /${M_TARGET}/Executables/${name} \$*" \
109 + >> "${T}/${name}"
110 + dobin "${T}/${name}"
111 + done
112 + for name in ${M_BINARIES} ; do
113 + einfo "Symlinking ${name} to /opt/bin"
114 + dosym ../../usr/bin/${name} /opt/bin/${name}
115 + done
116 +
117 + # fix some embedded paths and install desktop files
118 + for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "wolfram-mathematica*.desktop") ; do
119 + echo Fixing "${filename}"
120 + sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
121 + echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
122 + domenu "${filename}"
123 + done
124 +
125 + # install mime types
126 + insinto /usr/share/mime/application
127 + for filename in $(find "${D}/${M_TARGET}/SystemFiles/Installation" -name "application-*.xml"); do
128 + basefilename=$(basename "${filename}")
129 + mv "${filename}" "${T}/${basefilename#application-}"
130 + doins "${T}/${basefilename#application-}"
131 + done
132 +}
133 +
134 +pkg_nofetch() {
135 + einfo "Please place the Wolfram Mathematica installation file ${SRC_URI}"
136 + einfo "in your \$\{DISTDIR\}."
137 + einfo "Note that to actually run and use Mathematica you need a valid license."
138 + einfo "Wolfram provides time-limited evaluation licenses at ${HOMEPAGE}"
139 +}