normaliz-3.1.1.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs versionator
  5. MYPV=$(get_version_component_range 1-2)
  6. MYP="Normaliz${MYPV}"
  7. DESCRIPTION="Tool for computations in affine monoids and more"
  8. HOMEPAGE="http://www.mathematik.uni-osnabrueck.de/normaliz/"
  9. SRC_URI="https://www.normaliz.uni-osnabrueck.de/wp-content/uploads/2016/04/Normaliz${PV}.zip"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="amd64 ~arm x86"
  13. IUSE="doc extras openmp"
  14. RDEPEND="dev-libs/gmp[cxx]"
  15. DEPEND="${RDEPEND}
  16. app-arch/unzip
  17. dev-libs/boost"
  18. # Only a boost header is needed -> not RDEPEND
  19. S=${WORKDIR}/${MYP}
  20. src_prepare () {
  21. epatch "${FILESDIR}/${PN}-3.0.0-respect-flags.patch"
  22. # Respect users AR tool (Bug 474532)
  23. sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
  24. if use openmp && tc-has-openmp; then
  25. export OPENMP=yes
  26. else
  27. export OPENMP=no
  28. fi
  29. }
  30. src_compile(){
  31. emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
  32. }
  33. src_install() {
  34. dobin source/normaliz
  35. if use doc ; then
  36. dodoc doc/"Normaliz.pdf"
  37. dodoc doc/"NmzIntegrate.pdf"
  38. fi
  39. if use extras; then
  40. elog "You have selected to install extras which consist of Macaulay2"
  41. elog "and Singular packages. These have been installed into "
  42. elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
  43. elog "to the homepages of the respective projects for additional information."
  44. elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
  45. elog "copies of these interface packages. Usually you don't need normaliz's versions."
  46. insinto "/usr/share/${PN}"
  47. doins Singular/normaliz.lib
  48. doins Macaulay2/Normaliz.m2
  49. fi
  50. }