1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools toolchain-funcs eutils
8 DESCRIPTION="Support for parallel scientific applications"
9 HOMEPAGE="http://www.p4est.org/"
11 if [[ ${PV} = *9999* ]]; then
13 EGIT_REPO_URI="https://github.com/cburstedde/${PN}.git"
18 SRC_URI="https://github.com/cburstedde/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19 KEYWORDS="~amd64 ~x86"
24 IUSE="debug examples mpi openmp romio static-libs threads"
26 REQUIRED_USE="romio? ( mpi )"
33 mpi? ( virtual/mpi[romio?] )"
39 DOCS=( AUTHORS NEWS README )
41 AUTOTOOLS_AUTORECONF=true
44 if [[ ${MERGE_TYPE} != "binary" ]] && use openmp; then
46 die "Please select an openmp capable compiler like gcc[openmp]"
53 # Inject a version number into the build system
54 echo "${PV}" > ${S}/.tarball-version
62 $(use_enable openmp openmp)
63 $(use_enable romio mpiio)
64 $(use_enable static-libs static)
65 $(use_enable threads pthread)
66 --with-blas="$($(tc-getPKG_CONFIG) --libs blas)"
67 --with-lapack="$($(tc-getPKG_CONFIG) --libs lapack)"
69 econf "${myeconfargs[@]}"
78 docompress -x /usr/share/doc/${PF}/examples
80 # Remove compiled example binaries in case of -examples:
81 rm -r "${ED}"/usr/bin || die "rm failed"
84 # Remove ac files, bug #619806
85 rm -r "${ED}"/usr/share/aclocal || die "rm failed"
87 # Fix wrong installation paths:
88 dodir /usr/share/libsc
89 mv "${ED}"/etc/* "${ED}"/usr/share/libsc || die "mv failed"
90 rmdir "${ED}"/etc/ || die "rmdir failed"
91 mv "${ED}"/usr/share/ini/* "${ED}"/usr/share/libsc || die "mv failed"
92 rmdir "${ED}"/usr/share/ini || die "rmdir failed"