ekopath-6.0.756_p20160409-r100.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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="0/${MY_PV}"
  16. KEYWORDS="~amd64"
  17. IUSE=""
  18. DEPEND="!!app-arch/rpm"
  19. RDEPEND="!dev-lang/ekopath:${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_configure() {
  28. cat > 99${PN} <<-EOF || die
  29. PATH=${EROOT%/}/opt/${PN}/bin
  30. ROOTPATH=${EROOT%/}/opt/${PN}/bin
  31. LDPATH=${EROOT%/}/opt/${PN}/lib:${EROOT%/}/opt/${PN}/lib/${MY_PV}/x8664/64
  32. MANPATH=${EROOT%/}/opt/${PN}/docs/man
  33. EOF
  34. }
  35. src_install() {
  36. # EI_PAX marking is obsolete and PT_PAX breaks the binary.
  37. # We must use XT_PAX to run the installer.
  38. if [[ ${PAX_MARKINGS} == "XT" ]]; then
  39. pax-mark m "${INSTALLER}"
  40. fi
  41. ./"${INSTALLER}" \
  42. --prefix "${ED%/}/opt/${MY_P}" \
  43. --mode unattended || die
  44. if [[ ! -d ${ED%/}/opt/${MY_P}/lib/${MY_PV} ]]; then
  45. local guess
  46. cd "${ED%/}/opt/${MY_P}/lib" && guess=( * )
  47. if [[ ${guess[@]} ]]; then
  48. die "Incorrect release version in PV, guessing it should be: ${guess[*]}"
  49. else
  50. die "No libdir installed"
  51. fi
  52. fi
  53. [[ -x ${ED%}/opt/${MY_P}/bin/pathcc ]] || die "No pathcc executable was installed, your hardware is unsupported most likely"
  54. rm -r "${ED}/opt/${MY_P}"/uninstall* || die
  55. dosym ${MY_P} /opt/${PN}
  56. doenvd 99${PN}
  57. }