x11-wm/xpra: amd64 stable
[gentoo.git] / dev-lang / ekopath / ekopath-6.0.756_p20160409-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit pax-utils versionator
7
8 MY_PV=$(get_version_component_range 1-3)
9 MY_P=${PN}-${MY_PV}
10 DATE=$(get_version_component_range 4)
11 DATE=${DATE#p}
12 DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
13 INSTALLER=${PN}-${DATE}-installer.run
14
15 DESCRIPTION="PathScale EKOPath Compiler Suite"
16 HOMEPAGE="http://www.pathscale.com/ekopath-compiler-suite"
17 SRC_URI="http://c591116.r16.cf2.rackcdn.com/${PN}/nightly/Linux/${INSTALLER}"
18
19 LICENSE="all-rights-reserved"
20 SLOT="${MY_PV}"
21 KEYWORDS="~amd64"
22 IUSE=""
23
24 DEPEND="!!app-arch/rpm"
25 RDEPEND="!dev-lang/ekopath:0/${MY_PV}"
26
27 RESTRICT="bindist mirror"
28
29 QA_PREBUILT="opt/${MY_P}/*"
30
31 S="${WORKDIR}"
32
33 src_unpack() {
34         cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
35         chmod +x "${S}/${INSTALLER}" || die
36 }
37
38 src_install() {
39         # EI_PAX marking is obsolete and PT_PAX breaks the binary.
40         # We must use XT_PAX to run the installer.
41         if [[ ${PAX_MARKINGS} == "XT" ]]; then
42                 pax-mark m "${INSTALLER}"
43         fi
44
45         ./"${INSTALLER}" \
46                 --prefix "${ED%/}/opt/${MY_P}" \
47                 --mode unattended || die
48
49         if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
50                 local guess
51                 cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
52
53                 if [[ ${guess[@]} ]]; then
54                         die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
55                 else
56                         die "No libdir installed"
57                 fi
58         fi
59         [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
60
61         rm -r "${ED}/opt/${MY_P}"/uninstall* || die
62 }