blob: 9871292b395139f6796dffd7b163e110a4f9a908 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit eutils
MY_SCRIPT=CDFPlayer_${PV}_LINUX.sh
MY_DESKTOPFILE=${ED}/opt/wolfram/SystemFiles/Installation/wolfram-cdf10.desktop
DESCRIPTION="Player for Wolfram CDF"
HOMEPAGE="http://www.wolfram.com/cdf-player/"
SRC_URI="http://www.wolfram.com/cdf-player/${MY_SCRIPT}"
LICENSE="cdfplayer"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="fetch test"
pkg_nofetch() {
einfo Download ${MY_SCRIPT} from ${HOMEPAGE}
einfo and move it to ${DISTDIR}
}
src_unpack() {
mkdir "${S}" || die
cp "${DISTDIR}/${MY_SCRIPT}" "${S}/${MY_SCRIPT}" || die
chmod u+x "${S}/${MY_SCRIPT}" || die
}
src_install() {
"${S}/${MY_SCRIPT}" --target "${S}/${P}" --nox11 -- -auto -verbose -createdir=y \
-targetdir="${ED}/opt/wolfram" -execdir="${ED}/usr/bin" || die
find "${ED}" -name '*.desktop' -exec \
sed -i "s%${ED}%/%g" {} \; || die
sed -i "s/WolframCDFPlayer %F/WolframCDFPlayer -graphicssystem native %F/g" \
"${MY_DESKTOPFILE}" \
|| die
mkdir -p "${ED}/usr/share/applications" || die
domenu "${MY_DESKTOPFILE}"
}
pkg_postinst() {
elog "If you want to start CDFPlayer from command line"
elog "you will need to set your qtgraphicssystem to native"
elog "or start CDFPlayer with the '-graphicssystem native' option"
elog "see http://forums.gentoo.org/viewtopic-p-7202068.html for details."
}
|