aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-physics/formcalc/formcalc-9.9-r1.ebuild')
-rw-r--r--sci-physics/formcalc/formcalc-9.9-r1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/sci-physics/formcalc/formcalc-9.9-r1.ebuild b/sci-physics/formcalc/formcalc-9.9-r1.ebuild
new file mode 100644
index 000000000..91d88dd99
--- /dev/null
+++ b/sci-physics/formcalc/formcalc-9.9-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fortran-2
+
+MY_PN=FormCalc
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="FormCalc can be used for automatic Feynman diagram computation."
+HOMEPAGE="https://feynarts.de/formcalc"
+SRC_URI="https://feynarts.de/formcalc/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ sci-mathematics/mathematica
+ sci-mathematics/form[threads]
+ "
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sci-mathematics/mathematica
+ sci-mathematics/form
+ "
+
+PATCHES=( "${FILESDIR}"/${P}-compile.patch )
+
+src_compile() {
+ # remove shipped binaries
+ rm bin/Linux-x86-64/* || die
+ rm bin/Linux-x86-64-old/* || die
+
+ export DEST=Linux-x86-64
+ ./compile ${LDFLAGS} || die
+}
+
+src_install() {
+ MMADIR=/usr/share/Mathematica/Applications
+ # unversioned directory
+ dosym ${MY_P} ${MMADIR}/${MY_PN}
+ mv "${WORKDIR}/${MY_P}" "${ED}${MMADIR}" || die
+ # switch to system form
+ dosym `command -v form` ${MMADIR}/${MY_P}/Linux-x86-64/form
+ dosym `command -v tform` ${MMADIR}/${MY_P}/Linux-x86-64/tform
+
+ dodoc manual/*.pdf
+}