cyana-2.1.ebuild 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils fortran-2 toolchain-funcs
  5. DESCRIPTION="Combined assignment and dynamics algorithm for NMR applications"
  6. HOMEPAGE="http://www.las.jp/english/products/cyana.html"
  7. SRC_URI="${P}.tar.gz"
  8. LICENSE="CYANA"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="examples"
  12. RESTRICT="fetch"
  13. # we need libg2c for gfortran # 136988
  14. DEPEND="dev-lang/ifc"
  15. RDEPEND="${DEPEND}"
  16. pkg_nofetch() {
  17. elog "Please visit"
  18. elog "http://www.las.jp/english/products/cyana.html"
  19. elog "and get a copy of ${A}."
  20. elog "Place it in ${DISTDIR}."
  21. }
  22. src_prepare() {
  23. epatch \
  24. "${FILESDIR}"/${PV}-typo.patch \
  25. "${FILESDIR}"/${PV}-exec.patch \
  26. "${FILESDIR}"/${PV}-expire.patch \
  27. "${FILESDIR}"/${PV}-xiar.patch
  28. cat >> etc/config <<- EOF
  29. VERSION=${PV}
  30. SHELL=${EPREFIX}/bin/sh
  31. FC=ifort
  32. FFLAGS=${FFLAGS} -openmp -threads
  33. FFLAGS2=${FFLAGS} -openmp -threads
  34. CC=$(tc-getCC)
  35. AR=xiar
  36. RANLIB=ranlib
  37. FORK=g77fork.o
  38. LDFLAGS=${LDFLAGS} -reentrancy threaded -openmp
  39. LIBS=
  40. DEFS=-Dintel
  41. SYSTEM=intel
  42. EOF
  43. }
  44. src_compile() {
  45. cd src || die
  46. emake
  47. }
  48. src_install() {
  49. dobin cyana{job,table,filter,clean}
  50. newbin src/${PN}/${PN}exe.* ${PN}
  51. insinto /usr/share/${PN}
  52. doins -r lib macro help
  53. use examples && doins -r demo
  54. cat >> "${T}"/20cyana <<- EOF
  55. CYANALIB="${EPREFIX}/usr/share/${PN}"
  56. EOF
  57. doenvd "${T}"/20cyana
  58. }