Skip to content

Commit

Permalink
sci-physics/cuttools: add 2.0.0, drop 1.9.3
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
  • Loading branch information
APN-Pucky committed Feb 13, 2025
1 parent 5841729 commit d749883
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions sci-physics/cuttools/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST cuttools_v1.8.2.tar.gz 962232 BLAKE2B aaec06cc892577c2e562e8ee07e9863dd42a8bbf878b4e2aee01d2bbf5bb27bb9e4f50ef3c3a66fe00e73cc527e23b0274f9c3df169779c5fb529c9ff5610cb0 SHA512 6f1af82caa2a86669271346fa4a4f1d13b39f1c1ee7562c5fc29f250276d59017722a55256358bd006819a442acd3198901b642039be9f6a78d3cf31fe0ca976
DIST cuttools_v1.9.3.tar.gz 1007945 BLAKE2B 832643d9bda99cd920ad289c8edc0394ac335d75330a99a5f1b814d62957d54a7c42f0fc861f2cc9389a0c5d94ed2d67cec4698277f14dc5d3cb27ba8c65bc5f SHA512 6574f9928b3c131bdbf9343323d3a5a56e653c9ace37edd047a3e172aaf6ce4fab04eeb3013cc7eb448bd86937326d15f5effe5600a6a743b750a1eaccaa5db2
DIST cuttools_v2.0.tar.gz 1008612 BLAKE2B 69f7ad8e5ed3fc3cf1100cc222cc9afa7acbeaad7e00cf28bcd38a566c31b24394f6c2f69207de260b1c0bc212ede254cf918d8b81c29dc2b9209f6dfcfe3767 SHA512 271b0fa518f3a2f251b21c0c9c1c9c687d3a617e8ba2d4ab9fe43c35c5cd6bd5c15b684cb974bfa747e0c13c7afdf626cd4e7cb0cd32c08e1feac005b95fc294
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,55 @@ EAPI=8

inherit fortran-2 toolchain-funcs

MY_V="$(ver_cut 1).$(ver_cut 2)"

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"
SRC_URI="https://www.ugr.es/~pittau/CutTools/${PN}_v${MY_V}.tar.gz"
S="${WORKDIR}"

LICENSE="GPL-3"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

IUSE="+dummy"
IUSE="+dummy mpfun90"
DEPEND="
sci-libs/mpfun90
sci-physics/qcdloop
sci-physics/oneloop[dpkind,qpkind16,-qpkind,-tlevel]
sci-physics/oneloop[dpkind,qpkind16,-qpkind,-tlevel,mpfun90?]
"
RDEPEND="${DEPEND}"

PATCHES=(
"${FILESDIR}/${PN}-1.9.3-unbundle.patch"
)

src_prepare() {
default
sed -i 's/^ALL =.*$/ALL = $(CTS)/' src/makefile || die
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
if use mpfun90; then
sed -i 's/PRECISION=.*$/PRECISION= MP/g' makefile || die
else
sed -i 's/PRECISION=.*$/PRECISION= QP/g' makefile || die
fi
}

src_compile() {
emake -j1 FFLAGS="${FFLAGS} -I${ESYSROOT}/usr/include -fPIC -std=legacy"
if use mpfun90; then
emake -j1 FFLAGS="${FFLAGS} -I${ESYSROOT}/usr/include -fPIC -std=legacy" mp
else
emake -j1 FFLAGS="${FFLAGS} -I${ESYSROOT}/usr/include -fPIC -std=legacy" qp
fi
tc-export AR CXX
cd includects || die
${AR} -x libcts.a || die
${CXX} ${CXXFLAGS} -shared *.o -o lib${PN}.so || die
${CXX} ${CXXFLAGS} ${LDFLAGS} -shared *.o -Wl,-soname,libcuttools.so -o lib${PN}.so || die
}

src_install() {
Expand Down

0 comments on commit d749883

Please sign in to comment.