normaliz-2.12.2.ebuild 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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="http://www.mathematik.uni-osnabrueck.de/${PN}/Normaliz${PV}/Normaliz${PV}.zip"
  10. LICENSE="GPL-3"
  11. SLOT="0"
  12. KEYWORDS="amd64 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}-2.12.1-respect-flags.patch"
  22. epatch "${FILESDIR}/${PN}-2.12.2-gcc49.patch"
  23. # Respect users AR tool (Bug 474532)
  24. sed -e "s:ar -cr:$(tc-getAR) -cr:" -i source/libnormaliz/Makefile || die
  25. if use openmp && tc-has-openmp; then
  26. export OPENMP=yes
  27. else
  28. export OPENMP=no
  29. fi
  30. }
  31. src_compile(){
  32. emake CXX="$(tc-getCXX)" OPENMP="${OPENMP}" -C source
  33. }
  34. src_install() {
  35. dobin source/normaliz
  36. if use doc ; then
  37. dodoc doc/"Normaliz.pdf"
  38. dodoc doc/"NmzIntegrate.pdf"
  39. fi
  40. if use extras; then
  41. elog "You have selected to install extras which consist of Macaulay2"
  42. elog "and Singular packages. These have been installed into "
  43. elog "/usr/share/${PN}, and cannot be used without additional setup. Please refer"
  44. elog "to the homepages of the respective projects for additional information."
  45. elog "Note however, Gentoo's versions of Singular and Macaulay2 bring their own"
  46. elog "copies of these interface packages. Usually you don't need normaliz's versions."
  47. insinto "/usr/share/${PN}"
  48. doins Singular/normaliz.lib
  49. doins Macaulay2/Normaliz.m2
  50. fi
  51. }