ekopath-6.0.855_p20160629-r1.ebuild 1.5 KB

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