unuran-1.8.1.ebuild 998 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools-utils
  5. DESCRIPTION="Universal Non-Uniform Random number generator"
  6. HOMEPAGE="http://statmath.wu.ac.at/unuran/"
  7. SRC_URI="${HOMEPAGE}${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT=0
  10. KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
  11. IUSE="doc examples gsl prng +rngstreams static-libs"
  12. DEPEND="
  13. gsl? ( sci-libs/gsl )
  14. prng? ( sci-mathematics/prng )
  15. rngstreams? ( sci-mathematics/rngstreams )"
  16. RDEPEND="${DEPEND}"
  17. src_configure() {
  18. local udefault=builtin
  19. use rngstreams && udefault=rngstream
  20. local myeconfargs=(
  21. --enable-shared
  22. --with-urng-default=${udefault}
  23. $(use_with gsl urng-gsl)
  24. $(use_with prng urng-prng)
  25. $(use_with rngstreams urng-rngstream)
  26. )
  27. autotools-utils_src_configure
  28. }
  29. src_install() {
  30. autotools-utils_src_install
  31. use doc && dodoc doc/${PN}.pdf
  32. if use examples; then
  33. rm examples/Makefile*
  34. insinto /usr/share/doc/${PF}
  35. doins -r examples
  36. fi
  37. }