*/*: [QA] Fix trivial cases of MissingTestRestrict
[gentoo.git] / sci-physics / espresso++ / espresso++-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 )
7 CMAKE_MAKEFILE_GENERATOR="ninja"
8
9 inherit cmake-utils python-r1
10
11 DESCRIPTION="A Modern Multiscale Simulation Package for Soft Matter Systems"
12 HOMEPAGE="https://www.espresso-pp.de"
13
14 MY_PN="${PN//+/p}"
15 if [[ ${PV} = 9999 ]]; then
16         EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
17         inherit git-r3
18 else
19         SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
20         KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-macos"
21 fi
22
23 LICENSE="GPL-3"
24 SLOT="0"
25 IUSE="test"
26 RESTRICT="!test? ( test )"
27
28 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
29
30 RDEPEND="${PYTHON_DEPS}
31         virtual/mpi
32         dev-libs/boost:=[python,mpi,${PYTHON_USEDEP}]
33         sci-libs/fftw:3.0
34         >=dev-python/mpi4py-2[${PYTHON_USEDEP}]"
35 DEPEND="${RDEPEND}"
36
37 S="${WORKDIR}/${MY_PN}-${PV}"
38
39 src_configure() {
40         src_configure_internal() {
41                 local mycmakeargs=(
42                         -DEXTERNAL_BOOST=ON
43                         -DEXTERNAL_MPI4PY=ON
44                         -DWITH_RC_FILES=OFF
45                 )
46                 cmake-utils_src_configure
47         }
48         python_foreach_impl src_configure_internal
49 }
50
51 src_compile() {
52         python_foreach_impl cmake-utils_src_make
53 }
54
55 src_test() {
56         python_foreach_impl cmake-utils_src_test
57 }
58
59 src_install() {
60         python_foreach_impl cmake-utils_src_install
61 }