1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit pax-utils versionator
8 MY_PV=$(get_version_component_range 1-3)
10 DATE=$(get_version_component_range 4)
12 DATE=${DATE:0:4}-${DATE:4:2}-${DATE:6}
13 INSTALLER=${PN}-${DATE}-installer.run
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}"
19 LICENSE="all-rights-reserved"
24 DEPEND="!!app-arch/rpm"
25 RDEPEND="!dev-lang/ekopath:${MY_PV}"
27 RESTRICT="bindist mirror"
29 QA_PREBUILT="opt/${MY_P}/*"
34 cp "${DISTDIR}/${INSTALLER}" "${S}/" || die
35 chmod +x "${S}/${INSTALLER}" || die
39 cat > 99${PN} <<-EOF || die
40 PATH=${EROOT%/}/opt/${PN}/bin
41 ROOTPATH=${EROOT%/}/opt/${PN}/bin
42 LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
43 MANPATH=${EROOT%/}/opt/${PN}/docs/man
48 # EI_PAX marking is obsolete and PT_PAX breaks the binary.
49 # We must use XT_PAX to run the installer.
50 if [[ ${PAX_MARKINGS} == "XT" ]]; then
51 pax-mark m "${INSTALLER}"
55 --prefix "${ED%/}/opt/${MY_P}" \
56 --mode unattended || die
58 if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
60 cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
62 if [[ ${guess[@]} ]]; then
63 die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
65 die "No libdir installed"
68 [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
70 rm -r "${ED}/opt/${MY_P}"/uninstall* || die
71 dosym ${MY_P} /opt/${PN}