nfft-3.3.2.ebuild 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs
  5. DESCRIPTION="library for nonequispaced discrete Fourier transformations"
  6. HOMEPAGE="http://www-user.tu-chemnitz.de/~potts/nfft"
  7. SRC_URI="https://github.com/NFFT/nfft/releases/download/${PV}/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~x86 ~amd64"
  11. IUSE="doc openmp static-libs"
  12. RDEPEND="sci-libs/fftw:3.0[threads,openmp?]"
  13. DEPEND="${RDEPEND}"
  14. pkg_pretend() {
  15. if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
  16. if ! tc-has-openmp; then
  17. ewarn "OpenMP is not available in your current selected compiler"
  18. if tc-is-clang; then
  19. ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp,"
  20. ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\""
  21. fi
  22. die "need openmp capable compiler"
  23. fi
  24. fi
  25. }
  26. src_configure() {
  27. econf \
  28. --enable-all \
  29. --enable-shared \
  30. $(use_enable openmp) \
  31. $(use_enable static-libs static)
  32. }
  33. src_install() {
  34. default
  35. use doc || rm -r "${ED}/usr/share/doc/${P}/html" || die
  36. # infft uses pkg-config to record its private dependencies
  37. find "${ED}" -name '*.la' -delete || die
  38. }