commit: 268f7592e4dc56f80ba0f67280c13fe7b1143773 Author: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik <DOT> de> AuthorDate: Wed Jul 20 14:02:53 2022 +0000 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> CommitDate: Thu Jul 21 15:16:45 2022 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=268f7592
sci-physics/formcalc: new package, add 9.9, 9.10 Closes: https://github.com/gentoo/sci/pull/1157 Signed-off-by: Alexander Puck Neuwirth <alexander <AT> neuwirth-informatik.de> Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> .../formcalc/files/formcalc-9.9-compile.patch | 50 ++++++++++++++++++++ sci-physics/formcalc/formcalc-9.10.ebuild | 52 +++++++++++++++++++++ sci-physics/formcalc/formcalc-9.9.ebuild | 54 ++++++++++++++++++++++ sci-physics/formcalc/metadata.xml | 19 ++++++++ 4 files changed, 175 insertions(+) diff --git a/sci-physics/formcalc/files/formcalc-9.9-compile.patch b/sci-physics/formcalc/files/formcalc-9.9-compile.patch new file mode 100644 index 000000000..48be7f06e --- /dev/null +++ b/sci-physics/formcalc/files/formcalc-9.9-compile.patch @@ -0,0 +1,50 @@ +--- a/compile 2022-07-20 14:51:59.605328833 +0200 ++++ b/compile 2022-07-20 15:37:09.122446647 +0200 +@@ -96,7 +96,7 @@ + + mcc="REALCC=\"$CC\" CC=\"$t/fcc\" \ + REALCXX=\"$CXX\" CXX=\"$t/f++\" \ +-PATH=\""'$$PATH'":$t\" $MCC -st $MCFLAGS $CFLAGS" ++PATH=\""'$$PATH'":$t\" $MCC -st -g $MCFLAGS $CFLAGS" + + # Mma 5.1's mcc needs -lpthread for static linking + mclibs="-lpthread" +@@ -104,37 +104,28 @@ + cc="$CC $CFLAGS" + + make -f - << _EOF_ || exit 1 +-all: $DEST/tform$exe \ ++all: \ + $DEST/ReadForm$exe $DEST/ToForm$exe \ + $DEST/ToFortran$exe $DEST/ToC$exe \ + $DEST/ReadData$exe $DEST/reorder$exe + +-$DEST/tform$exe: $SRC/bin/$BIN/tform$exe +- cp -p $SRC/bin/$BIN/* $DEST/ +- + $DEST/ReadForm$exe: $SRC/FormCalc/ReadForm.tm + $mcc -o $DEST/ReadForm$exe $SRC/FormCalc/ReadForm.tm $mclibs +- -strip $DEST/ReadForm$exe + + $DEST/ToForm$exe: $SRC/FormCalc/ToForm.c + $cc -o $DEST/ToForm$exe $SRC/FormCalc/ToForm.c +- -strip $DEST/ToForm$exe + + $DEST/ToFortran$exe: $SRC/FormCalc/ToFortran.c + $cc -o $DEST/ToFortran$exe $SRC/FormCalc/ToFortran.c +- -strip $DEST/ToFortran$exe + + $DEST/ToC$exe: $SRC/FormCalc/ToC.c + $cc -o $DEST/ToC$exe $SRC/FormCalc/ToC.c +- -strip $DEST/ToC$exe + + $DEST/ReadData$exe: $SRC/tools/ReadData.tm + $mcc -o $DEST/ReadData$exe $SRC/tools/ReadData.tm $mclibs +- -strip $DEST/ReadData$exe + + $DEST/reorder$exe: $SRC/tools/reorder.c + $cc -o $DEST/reorder$exe $SRC/tools/reorder.c +- -strip $DEST/reorder$exe + _EOF_ + + diff --git a/sci-physics/formcalc/formcalc-9.10.ebuild b/sci-physics/formcalc/formcalc-9.10.ebuild new file mode 100644 index 000000000..81f69f294 --- /dev/null +++ b/sci-physics/formcalc/formcalc-9.10.ebuild @@ -0,0 +1,52 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN=FormCalc +MY_P=${MY_PN}-${PV} + +DESCRIPTION="FormCalc can be used for automatic Feynman diagram computation." +HOMEPAGE="http://feynarts.de/formcalc" +SRC_URI="http://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 + " +DEPEND="${RDEPEND}" +BDEPEND=" + sci-mathematics/mathematica + sci-mathematics/form + " +PATCHES=( "${FILESDIR}"/${PN}-9.9-compile.patch ) + +src_compile() { + # remove shipped binaries + rm bin/Linux-x86-64/* || die + rm bin/Linux-x86-64-kernel2.6/* || die + export DEST=Linux-x86-64 + ./compile ${LDFLAGS} || die +} + +src_install() { + MMADIR=/usr/share/Mathematica/Applications + dosym ${MY_P} ${MMADIR}/${MY_PN} + dodir ${MMADIR}/${MY_P} + insinto ${MMADIR} + doins -r "${S}" + # Copy executable, etc. permissions + for f in $(find * ! -type l); do + fperms --reference="${S}/$f" ${MMADIR}/${MY_P}/$f + done + # switch to system form + dosym `command -v form` ${MMADIR}/${MY_P}/Linux-x86-64/form + dosym `command -v form` ${MMADIR}/${MY_P}/Linux-x86-64/tform + + dodoc manual/*.pdf +} diff --git a/sci-physics/formcalc/formcalc-9.9.ebuild b/sci-physics/formcalc/formcalc-9.9.ebuild new file mode 100644 index 000000000..6e031ef5c --- /dev/null +++ b/sci-physics/formcalc/formcalc-9.9.ebuild @@ -0,0 +1,54 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +MY_PN=FormCalc +MY_P=${MY_PN}-${PV} + +DESCRIPTION="FormCalc can be used for automatic Feynman diagram computation." +HOMEPAGE="http://feynarts.de/formcalc" +SRC_URI="http://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 + " +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 + dosym ${MY_P} ${MMADIR}/${MY_PN} + dodir ${MMADIR}/${MY_P} + insinto ${MMADIR} + doins -r "${S}" + # Copy executable, etc. permissions + for f in $(find * ! -type l); do + fperms --reference="${S}/$f" ${MMADIR}/${MY_P}/$f + done + # switch to system form + dosym `command -v form` ${MMADIR}/${MY_P}/Linux-x86-64/form + dosym `command -v form` ${MMADIR}/${MY_P}/Linux-x86-64/tform + + dodoc manual/*.pdf +} diff --git a/sci-physics/formcalc/metadata.xml b/sci-physics/formcalc/metadata.xml new file mode 100644 index 000000000..b103d8f63 --- /dev/null +++ b/sci-physics/formcalc/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo Science Project</name> + </maintainer> + <maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo Physics Project</name> + </maintainer> + <maintainer type="person"> + <email>[email protected]</email> + <name>Alexander Puck Neuwirth</name> + </maintainer> + <longdescription lang="en"> + FormCalc is a Mathematica package for the calculation of tree-level and one-loop Feynman diagrams. It makes extensive use of the form tool. + </longdescription> +</pkgmetadata>
