normaliz-3.1.3.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs versionator
  5. MYP="Normaliz-${PV}"
  6. DESCRIPTION="Tool for computations in affine monoids and more"
  7. HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
  8. SRC_URI="https://github.com/Normaliz/Normaliz/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="GPL-3"
  10. SLOT="0"
  11. KEYWORDS="amd64 ~arm x86"
  12. IUSE="doc extras openmp"
  13. RDEPEND="
  14. dev-libs/gmp[cxx]
  15. "
  16. DEPEND="${RDEPEND}
  17. doc? ( app-text/texlive )
  18. dev-libs/boost"
  19. # Only a boost header is needed -> not RDEPEND
  20. S=${WORKDIR}/${MYP}
  21. src_prepare () {
  22. ./bootstrap.sh || die
  23. default
  24. }
  25. src_configure () {
  26. if use openmp && ! tc-has-openmp ; then
  27. die "You requested openmp, but your toolchain does not support it."
  28. fi
  29. econf $(use_enable openmp)
  30. }
  31. src_install() {
  32. default
  33. if use doc ; then
  34. pushd doc
  35. pdflatex Normaliz || die
  36. pdflatex Normaliz || die
  37. dodoc "Normaliz.pdf"
  38. pdflatex NmzIntegrate || die
  39. pdflatex NmzIntegrate || die
  40. dodoc "NmzIntegrate.pdf"
  41. popd
  42. fi
  43. if use extras; then
  44. elog "You have selected to install extras which consist of Macaulay2"
  45. elog "and Singular packages. These have been installed into "
  46. elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
  47. elog "to the homepages of the respective projects for additional information."
  48. elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
  49. elog "copies of these interface packages. Usually you don't need normaliz's versions."
  50. insinto "/usr/share/${PN}"
  51. doins Singular/normaliz.lib
  52. doins Macaulay2/Normaliz.m2
  53. fi
  54. }