commit:     bd26747bcadca6201d4fa31c790f051ffcb5e9df
Author:     Alexander Puck Neuwirth <apn-pucky <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 30 16:47:17 2025 +0000
Commit:     Alexander Puck Neuwirth <apn-pucky <AT> gentoo <DOT> org>
CommitDate: Tue Sep 30 16:47:17 2025 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=bd26747b

sci-physics/cuttools: fix so linking

Signed-off-by: Alexander Puck Neuwirth <apn-pucky <AT> gentoo.org>

 sci-physics/cuttools/cuttools-2.0.0-r1.ebuild | 68 +++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/sci-physics/cuttools/cuttools-2.0.0-r1.ebuild 
b/sci-physics/cuttools/cuttools-2.0.0-r1.ebuild
new file mode 100644
index 000000000..81591061e
--- /dev/null
+++ b/sci-physics/cuttools/cuttools-2.0.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+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${MY_V}.tar.gz";
+S="${WORKDIR}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+IUSE="+dummy mpfun90"
+DEPEND="
+       sci-libs/mpfun90
+       sci-physics/qcdloop
+       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
+       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() {
+       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} ${LDFLAGS} -shared *.o -Wl,-soname,libcuttools.so 
-lqcdloop -lmpfun90 -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}
+}

Reply via email to