sci-physics/clhep: Removing EAPI 4 versions <=2.1.3.1
[gentoo.git] / sci-physics / meep / meep-1.2-r1.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6
7 AUTOTOOLS_AUTORECONF=1
8 inherit autotools-utils
9
10 DESCRIPTION="Simulation software to model electromagnetic systems"
11 HOMEPAGE="http://ab-initio.mit.edu/meep/"
12 SRC_URI="http://ab-initio.mit.edu/meep/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
17 IUSE="examples hdf5 guile mpi"
18
19 RDEPEND="
20         sci-libs/fftw
21         sci-libs/gsl
22         sci-physics/harminv
23         guile? ( >=sci-libs/libctl-3.2 )
24         hdf5? ( sci-libs/hdf5 )
25         mpi? ( virtual/mpi )"
26 DEPEND="${RDEPEND}
27         virtual/pkgconfig"
28
29 PATCHES=(
30         "${FILESDIR}"/${P}-pc-no-ldflags.patch
31         "${FILESDIR}"/${P}-no-auto-mpb.patch
32 )
33
34 src_configure() {
35         local myeconfargs=(
36                 --disable-mpb
37                 $(use_with mpi)
38                 $(use_with hdf5)
39                 $(use_with guile libctl)
40         )
41         autotools-utils_src_configure
42 }
43
44 src_test() {
45         # pml test buggy with optimization on
46         # http://thread.gmane.org/gmane.comp.science.electromagnetism.meep.general/4579
47         pushd ${AUTOTOOLS_BUILD_DIR} > /dev/null
48         emake -C tests pml CXXFLAGS="-O0"
49         emake check
50         popd > /dev/null
51 }
52
53 src_install() {
54         autotools-utils_src_install
55         if use examples; then
56                 insinto /usr/share/doc/${PF}/examples
57                 doins -r examples/*.ctl
58         fi
59 }