aqua-3.2-r2.ebuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils fortran-2 toolchain-funcs
  5. DESCRIPTION="Program suite in this distribution calculates restraint violations"
  6. HOMEPAGE="http://www.biochem.ucl.ac.uk/~roman/procheck/procheck.html"
  7. SRC_URI="
  8. ${PN}${PV}.tar.gz
  9. doc? ( ${P}-nmr_manual.tar.gz )"
  10. SLOT="0"
  11. LICENSE="procheck"
  12. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  13. IUSE="doc examples"
  14. RDEPEND="sci-chemistry/procheck"
  15. DEPEND=""
  16. RESTRICT="fetch"
  17. S="${WORKDIR}"/${PN}${PV}
  18. pkg_nofetch() {
  19. elog "Please visit http://www.ebi.ac.uk/thornton-srv/software/PROCHECK/download.html"
  20. elog "And follow the instruction for downloading ${PN}${PV}.tar.gz -> ${DISTDIR}/${PN}${PV}.tar.gz."
  21. if use doc; then
  22. elog "nmr_manual.tar.gz -> ${DISTDIR}/${P}-nmr_manual.tar.gz"
  23. fi
  24. }
  25. src_prepare() {
  26. sed \
  27. -e 's:nawk:gawk:g' \
  28. -e "s:/bin/gawk:${EPREFIX}/usr/bin/gawk:g" \
  29. -e "s:/usr/local/bin/perl:${EPREFIX}/usr/bin/perl:g" \
  30. -i $(find . -type f) || die
  31. epatch "${FILESDIR}"/${PV}-flags.patch
  32. }
  33. src_compile() {
  34. pushd src > /dev/null
  35. emake \
  36. MYROOT="${WORKDIR}" \
  37. CC="$(tc-getCC)" \
  38. FC="$(tc-getFC)" \
  39. CFLAGS="${CFLAGS} -I../sub/lib" \
  40. FFLAGS="${FFLAGS}" \
  41. LDFLAGS="${LDFLAGS}" \
  42. exth
  43. emake \
  44. MYROOT="${WORKDIR}" \
  45. CC="$(tc-getCC)" \
  46. FC="$(tc-getFC)" \
  47. CFLAGS="${CFLAGS} -I../sub/lib" \
  48. FFLAGS="${FFLAGS}" \
  49. LDFLAGS="${LDFLAGS}"
  50. popd
  51. }
  52. src_install() {
  53. rm -f scripts/conv* || die
  54. dobin bin/* scripts/*
  55. dosym AquaWhat /usr/bin/qwhat
  56. dosym AquaHow /usr/bin/qhow
  57. dosym AquaPseudo /usr/bin/qpseudo
  58. dosym AquaDist /usr/bin/qdist
  59. dosym AquaCalc /usr/bin/qcalc
  60. dosym AquaAssign /usr/bin/qassign
  61. dosym AquaRedun /usr/bin/qredun
  62. dosym AquaCompl /usr/bin/qcompl
  63. dodoc HISTORY HOW_TO_USE NEW README doc/*
  64. dohtml html/*
  65. insinto /usr/share/${PN}
  66. doins data/*
  67. if use examples; then
  68. doins -r exmpls
  69. fi
  70. if use doc; then
  71. dohtml -r manual
  72. fi
  73. cat >> "${T}"/34aqua <<- EOF
  74. AQUADATADIR="${EPREFIX}/usr/share/${PN}"
  75. EOF
  76. doenvd "${T}"/34aqua
  77. }