summaryrefslogtreecommitdiff
blob: 3415aac3fa0e089f99cd0281267ae194807b336b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit autotools fortran-2

DESCRIPTION="A library of exchange-correlation functionals for use in DFT"
HOMEPAGE="https://octopus-code.org/wiki/Libxc"
SRC_URI="https://gitlab.com/libxc/libxc/-/archive/${PV}/${P}.tar.gz"

LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="amd64 x86 ~amd64-linux"
IUSE="fortran test"
RESTRICT="!test? ( test )"

pkg_setup() {
	use fortran && fortran-2_pkg_setup
}

src_prepare() {
	default
	eautoreconf
}

src_configure() {
	econf \
		--enable-shared \
		--disable-static \
		$(use_enable fortran)
}

src_install() {
	default
	dodoc ChangeLog.md

	# no static archives
	find "${ED}" -name '*.la' -type f -delete || die
}