ekopath-6.0.967_p20161020-r1.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="${MY_PV}"
  16. KEYWORDS="~amd64"
  17. IUSE="mpich openmpi openmpi2"
  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. # cleanup
  48. if ! use mpich; then
  49. rm -r "${ED}/opt/${MY_P}/mpi/mpich" || die
  50. fi
  51. if ! use openmpi; then
  52. rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-1.* || die
  53. fi
  54. if ! use openmpi2; then
  55. rm -r "${ED}/opt/${MY_P}/mpi"/openmpi-2.* || die
  56. fi
  57. }