flint-2.5.2.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils multilib toolchain-funcs
  5. DESCRIPTION="Fast Library for Number Theory"
  6. HOMEPAGE="http://www.flintlib.org/"
  7. SRC_URI="http://www.flintlib.org/${P}.tar.gz"
  8. RESTRICT="mirror"
  9. LICENSE="GPL-2"
  10. SLOT="0/13"
  11. KEYWORDS="~amd64 ~arm ~x86"
  12. IUSE="doc gc ntl static-libs test"
  13. RDEPEND="dev-libs/gmp:=
  14. dev-libs/mpfr:=
  15. gc? ( dev-libs/boehm-gc )
  16. ntl? ( dev-libs/ntl:= )"
  17. DEPEND="${RDEPEND}
  18. doc? (
  19. app-text/texlive-core
  20. dev-texlive/texlive-latex
  21. dev-texlive/texlive-latexextra
  22. )"
  23. src_configure() {
  24. ./configure \
  25. --prefix="${EPREFIX}/usr" \
  26. --with-gmp="${EPREFIX}/usr" \
  27. --with-mpfr="${EPREFIX}/usr" \
  28. $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \
  29. $(use_enable static-libs static) \
  30. $(usex gc "--with-gc=${EPREFIX}/usr" "") \
  31. CC=$(tc-getCC) \
  32. CXX=$(tc-getCXX) \
  33. AR=$(tc-getAR) \
  34. || die
  35. }
  36. src_compile() {
  37. emake verbose
  38. if use doc ; then
  39. emake -C doc/latex
  40. fi
  41. }
  42. src_test() {
  43. emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
  44. }
  45. src_install() {
  46. emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
  47. einstalldocs
  48. use doc && dodoc doc/latex/flint-manual.pdf
  49. }