diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-01-11 09:12:41 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-01-11 09:12:41 +0000 |
commit | 343a7272d559a21a0e0ed13cb743fabb2bfcc479 (patch) | |
tree | db03f20672a6244296ccc2aa27e70757937eb9f7 /sci-libs/fftw/fftw-9999.ebuild | |
parent | 456dbeaab3e2f71f527eae542ab44d1e372b0655 (diff) |
gentoo resync : 11.01.2018
Diffstat (limited to 'sci-libs/fftw/fftw-9999.ebuild')
-rw-r--r-- | sci-libs/fftw/fftw-9999.ebuild | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/sci-libs/fftw/fftw-9999.ebuild b/sci-libs/fftw/fftw-9999.ebuild index af34cba86168..bef41e83ea09 100644 --- a/sci-libs/fftw/fftw-9999.ebuild +++ b/sci-libs/fftw/fftw-9999.ebuild @@ -10,11 +10,13 @@ inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-m DESCRIPTION="Fast C library for the Discrete Fourier Transform" HOMEPAGE="http://www.fftw.org/" +MY_P=${PN}-${PV/_p/-pl} + if [[ ${PV} = *9999 ]]; then inherit autotools git-r3 EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" else - SRC_URI="http://www.fftw.org/${P}.tar.gz" + SRC_URI="http://www.fftw.org/${PN}-${PV/_p/-pl}.tar.gz" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" fi @@ -23,22 +25,24 @@ SLOT="3.0/3" IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" RDEPEND=" - mpi? ( virtual/mpi )" + mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )" DEPEND="${RDEPEND} test? ( dev-lang/perl )" +if [[ ${PV} = *9999 ]]; then + DEPEND="${DEPEND} + dev-ml/ocamlbuild" +fi -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]] && use openmp; then - if ! tc-has-openmp; then - ewarn "OpenMP is not available in your current selected compiler" +S=${WORKDIR}/${MY_P} +HTML_DOCS=( doc/html/. ) - if tc-is-clang; then - ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp," - ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\"" - fi +pkg_pretend() { + [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp +} - die "need openmp capable compiler" - fi +pkg_setup() { + if [[ ${MERGE_TYPE} != binary ]] && use openmp; then + tc-check-openmp FORTRAN_NEED_OPENMP=1 fi @@ -46,7 +50,7 @@ pkg_setup() { MULTIBUILD_VARIANTS=( single double longdouble ) if use quad; then - if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then + if ! tc-is-gcc; then ewarn "quad precision only available for gcc >= 4.6" die "need quad precision capable gcc" fi @@ -64,9 +68,6 @@ src_prepare() { } multilib_src_configure() { - # there is no abi_x86_32 port of virtual/mpi right now, bug 519700 - local enable_mpi=$(multilib_native_use_enable mpi) - # jlec reported USE=quad on abi_x86_32 has too few registers # stub Makefiles if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then @@ -79,6 +80,7 @@ multilib_src_configure() { local myconf=( --enable-shared + $([[ ${PV} = *9999 ]] && echo "--enable-maintainer-mode") $(use_enable static-libs static) $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) $(use_enable fortran) @@ -88,7 +90,7 @@ multilib_src_configure() { ) case "${MULTIBUILD_ID}" in single-*) - #altivec, sse, single-paired only work for single + # altivec, sse, single-paired only work for single myconf+=( --enable-single $(use_enable altivec) @@ -97,7 +99,7 @@ multilib_src_configure() { $(use_enable cpu_flags_x86_sse sse) $(use_enable cpu_flags_x86_sse2 sse2) $(use_enable neon) - ${enable_mpi} + $(use_enable mpi) ) ;; @@ -106,19 +108,19 @@ multilib_src_configure() { $(use_enable cpu_flags_x86_avx avx) $(use_enable cpu_flags_x86_avx2 avx2) $(use_enable cpu_flags_x86_sse2 sse2) - ${enable_mpi} + $(use_enable mpi) ) ;; longdouble-*) myconf+=( --enable-long-double - ${enable_mpi} + $(use_enable mpi) ) ;; quad-*) - #quad does not support mpi + # quad does not support mpi myconf+=( --enable-quad-precision ) @@ -129,7 +131,14 @@ multilib_src_configure() { ;; esac - ECONF_SOURCE="${S}" econf "${myconf[@]}" + local MY_S="${S}" + #out-of-source build is broken for 9999 due to maintainer mode + if [[ ${PV} = *9999 ]]; then + cp -al "${S}"/* "${BUILD_DIR}"/ + MY_S="${BUILD_DIR}" + fi + + ECONF_SOURCE="${MY_S}" econf "${myconf[@]}" MPICC="$(tc-getCC -lmpi)" } src_configure() { @@ -155,21 +164,19 @@ src_test() { } src_install() { - DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) - HTML_DOCS=( doc/html/ ) - multibuild_foreach_variant multilib-minimal_src_install + dodoc CONVENTIONS if use doc; then dodoc doc/*.pdf docinto faq dodoc -r doc/FAQ/fftw-faq.html/. else - rm -r "${ED}"/usr/share/doc/${PF}/html || die + rm -r "${ED%/}"/usr/share/doc/${PF}/html || die fi local x - for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do + for x in "${ED%/}"/usr/lib*/pkgconfig/*.pc; do local u for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die @@ -177,5 +184,5 @@ src_install() { done # fftw uses pkg-config to record its private dependencies - find "${ED}" -name '*.la' -delete || die + find "${D}" -name '*.la' -delete || die } |