sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / sci-misc / cdfplayer / cdfplayer-11.2.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit versionator
7
8 DESCRIPTION="Wolfram Player for the interactive Computable Document Format (CDF)"
9 SRC_URI="CDFPlayer_11.2.0_LINUX.sh"
10 HOMEPAGE="http://www.wolfram.com/cdf-player/"
11
12 LICENSE="WolframCDFPlayer"
13 KEYWORDS="-* ~amd64 ~x86"
14 SLOT="0"
15 IUSE=""
16
17 RESTRICT="strip mirror bindist fetch"
18
19 DEPEND=""
20
21 # this list comes from lsof output
22 # probably there are still some libraries missing
23 RDEPEND="
24         x11-libs/libICE
25         x11-libs/libSM
26         x11-libs/libX11
27         x11-libs/libXau
28         x11-libs/libXcursor
29         x11-libs/libXdmcp
30         x11-libs/libXext
31         x11-libs/libXfixes
32         x11-libs/libXi
33         x11-libs/libXmu
34         x11-libs/libXrandr
35         x11-libs/libXrender
36         x11-libs/libXt
37         media-libs/alsa-lib
38         dev-libs/expat
39         media-libs/fontconfig
40         dev-libs/icu
41         x11-libs/libxcb
42         dev-libs/libxml2
43         sys-libs/ncurses-compat:5
44 "
45
46 # we need this a few times
47 MPV=$(get_version_component_range 1-2)
48
49 # we might as well list all files in all QA variables...
50 QA_PREBUILT="opt/*"
51
52 S=${WORKDIR}
53
54 src_unpack() {
55         /bin/sh "${DISTDIR}/${A}" --nox11 --confirm --keep -- -auto "-targetdir=${S}/opt/Wolfram/CDFPlayer/${MPV}" "-execdir=${S}/opt/bin" || die
56 }
57
58 src_install() {
59         # move all over
60         mv "${S}/opt" "${D}/opt" || die
61
62         # the autogenerated symlinks point into sandbox, redo
63         rm "${D}/opt/bin/"* || die
64         dosym ../Wolfram/CDFPlayer/${MPV}/Executables/wolframcdfplayer opt/bin/wolframcdfplayer
65         dosym ../Wolfram/CDFPlayer/${MPV}/Executables/WolframCDFPlayer opt/bin/WolframCDFPlayer
66
67         # fix some embedded paths and install desktop files
68         insinto /usr/share/applications
69         for filename in $(find "${D}" -name "wolfram-cdf11.desktop") ; do
70                 echo Fixing "${filename}"
71                 sed -e "s:${S}::g" -e 's:^\t\t::g' -i "${filename}"
72                 echo "Categories=Physics;Science;Engineering;2DGraphics;Graphics;" >> "${filename}"
73                 doins "${filename}"
74         done
75 }
76
77 pkg_nofetch() {
78         einfo "Sadly Wolfram provides no permanent link to the player files."
79         einfo "Please download the Wolfram CFD Player installation file ${SRC_URI} from"
80         einfo "${HOMEPAGE} and place it into your DISTDIR directory."
81 }