flint-2.4.4-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2016 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"
  11. KEYWORDS="amd64 ppc x86"
  12. IUSE="doc gc ntl static-libs test"
  13. RDEPEND="dev-libs/gmp:0=
  14. dev-libs/mpfr:0
  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_prepare() {
  24. epatch "${FILESDIR}"/${PN}-2.4.3-libdir.patch \
  25. "${FILESDIR}"/${PN}-2.4.3-whitespaces.patch \
  26. "${FILESDIR}"/${PN}-2.4.3-cflags-ldflags.patch \
  27. "${FILESDIR}"/${PN}-2.4.4-test.patch
  28. }
  29. src_configure() {
  30. ./configure \
  31. --prefix="${EPREFIX}/usr" \
  32. --with-gmp="${EPREFIX}/usr" \
  33. --with-mpfr="${EPREFIX}/usr" \
  34. $(usex ntl "--with-ntl=${EPREFIX}/usr" "") \
  35. $(use_enable static-libs static) \
  36. $(usex gc "--with-gc=${EPREFIX}/usr" "") \
  37. CC=$(tc-getCC) \
  38. CXX=$(tc-getCXX) \
  39. AR=$(tc-getAR) \
  40. || die
  41. }
  42. src_compile() {
  43. emake verbose
  44. if use doc ; then
  45. emake -C doc/latex
  46. fi
  47. }
  48. src_test() {
  49. emake AT= QUIET_CC= QUIET_CXX= QUIET_AR= check
  50. }
  51. src_install() {
  52. emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
  53. einstalldocs
  54. use doc && dodoc doc/latex/flint-manual.pdf
  55. }