blob: 03f84b63cd3fbb2fa44ddf1ec6f0a7b03200df56 (
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
41
42
43
44
45
46
47
48
49
50
51
52
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit fortran-2 toolchain-funcs
DESCRIPTION="Computing 1-loop amplitudes at the integrand level"
HOMEPAGE="https://www.ugr.es/~pittau/CutTools/"
SRC_URI="https://www.ugr.es/~pittau/CutTools/${PN}_v${PV}.tar.gz"
S="${WORKDIR}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="+dummy"
DEPEND="
sci-physics/qcdloop
sci-physics/oneloop[dpkind,qpkind16,-qpkind,-tlevel]
"
RDEPEND="${DEPEND}"
src_prepare() {
default
sed -i 's/^ALL =.*$/ALL = $(CTS)/' src/makefile || die
if use dummy ; then
cp "${FILESDIR}"/mpnumdummy.f90 src/cts/mpnumdummy.f90 || die
fi
if use dummy ; then
sed -i 's/CTS =/CTS = mpnumdummy.o/' src/makefile || die
fi
}
src_compile() {
emake -j1 FFLAGS="${FFLAGS} -I${ESYSROOT}/usr/include -fPIC -std=legacy"
tc-export AR CXX
cd includects || die
${AR} -x libcts.a || die
${CXX} ${CXXFLAGS} -shared *.o -o lib${PN}.so || die
}
src_install() {
cd includects || die
dolib.so lib${PN}.so
cd .. || die
mv includects ${PN} || die
rm ${PN}/*.a || die
rm ${PN}/*.so || die
rm ${PN}/*.o || die
doheader -r ${PN}
}
|