dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / sci-libs / libxc / libxc-2.2.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 AUTOTOOLS_AUTORECONF=true
7
8 inherit autotools-utils flag-o-matic fortran-2 multilib
9
10 MY_P=${P//_/-}
11
12 DESCRIPTION="A library of exchange-correlation functionals for use in DFT"
13 HOMEPAGE="https://octopus-code.org/wiki/Libxc"
14 SRC_URI="https://www.tddft.org/programs/octopus/download/${PN}/${P}.tar.gz"
15
16 LICENSE="LGPL-3"
17 SLOT="0"
18 KEYWORDS="amd64 ~x86 ~amd64-linux"
19 IUSE="fortran static-libs -test"
20
21 S="${WORKDIR}"/${MY_P}
22
23 pkg_setup() {
24         use fortran && fortran-2_pkg_setup
25 }
26
27 src_prepare() {
28         sed \
29                 -e "s:${PN}.f90:${PN}.F90:g" \
30                 -i src/Makefile.am || die
31         autotools-utils_src_prepare
32 }
33
34 src_configure() {
35         local myeconfargs=( $(use_enable fortran) )
36         autotools-utils_src_configure
37 }
38
39 ## Upstream recommends not running the test suite because it requires
40 ## human expert interpretation to determine whether output is an error or
41 ## expected under certain circumstances. Nevertheless, experts might want the option.
42 # The autotools src_test function modified not to die. Runs emake check in build directory.
43 src_test() {
44         debug-print-function ${FUNCNAME} "$@"
45
46         _check_build_dir
47         pushd "${BUILD_DIR}" > /dev/null || die
48         make check || ewarn "Make check failed. See above for details."
49         einfo "emake check done"
50         popd > /dev/null || die
51 }
52
53 src_install() {
54         autotools-utils_src_install
55
56 }