blob: 2a45c3962f1c50d4297b3eb7016de3163d6c599a (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
inherit versionator
My_PN="gDEBugger"
My_PV=$(delete_all_version_separators)
DESCRIPTION="OpenCL and OpenGL debugger and memory analyzer"
HOMEPAGE="http://developer.amd.com/tools/gDEBugger/Pages/default.aspx"
if [[ "${ARCH}" == "amd64" ]]; then
_arch="x86_64"
elif [[ "${ARCH}" == "x86" ]]; then
_arch="x86"
fi
SRC_URI="
x86? ( http://developer.amd.com/Downloads/AMD${My_PN}${PV}x86.tar.gz )
amd64? ( http://developer.amd.com/Downloads/AMD${My_PN}${PV}x86_64.tar.gz )"
LICENSE="${My_PN}"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RDEPEND="virtual/libstdc++"
DEPEND="${RDEPEND}"
RESTRICT="mirror strip"
S="${WORKDIR}/${My_PN}${PV}-${_arch}"
_destination=/opt/${My_PN}
src_install() {
dodir /usr/bin
dodir /usr/share/applications
cd ${WORKDIR}
dodir `dirname ${_destination}`
cp -a ${S} ${D}${_destination}
# The included launcher gets the directory where it is being run; a symbolic
# link to it in /usr/bin thus cannot work. Instead, copy it to /usr/bin and
# remove the autodetection of the script's directory and hardcode it to ${_destination}.
# Then create a lowercase symbolic link to this new launcher.
cp ${D}${_destination}/${My_PN} ${D}/usr/bin/${My_PN}
sed "s|gDEBuggerBinariesDir=.*|gDEBuggerBinariesDir=\"${_destination}\"|g" -i ${D}/usr/bin/${My_PN}
dosym /usr/bin/${My_PN} /usr/bin/${PN}
cat >> ${D}/usr/share/applications/${PN}.desktop <<- EOF
[Desktop Entry]
Name=${My_PN}
Exec=${_destination}/${My_PN}
Type=Application
GenericName=OpenCL/OpenGL debugger
Terminal=false
Icon=${My_PN}
Caption=OpenCL/OpenGL debugger
Categories=Application;Development;
EOF
insinto /usr/share/icons/hicolor/64x64/apps/
newins ${D}${_destination}/tutorial/images/applicationicon_64.png ${My_PN}.png
}
|