From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EB3FA1581D3 for ; Thu, 16 May 2024 14:02:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 015D5E2A70; Thu, 16 May 2024 14:02:23 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D343FE2A70 for ; Thu, 16 May 2024 14:02:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B01BE34072E for ; Thu, 16 May 2024 14:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7CD6132F for ; Thu, 16 May 2024 14:02:19 +0000 (UTC) From: "Alexander Puck Neuwirth" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexander Puck Neuwirth" Message-ID: <1715868113.f5adbcfabe52b1e36bc357dd54339905f776c3d8.alexander@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/madgraph5/, sci-physics/madgraph5/files/ X-VCS-Repository: proj/sci X-VCS-Files: sci-physics/madgraph5/files/cuttools.patch sci-physics/madgraph5/madgraph5-3.5.3.ebuild sci-physics/madgraph5/metadata.xml X-VCS-Directories: sci-physics/madgraph5/ sci-physics/madgraph5/files/ X-VCS-Committer: alexander X-VCS-Committer-Name: Alexander Puck Neuwirth X-VCS-Revision: f5adbcfabe52b1e36bc357dd54339905f776c3d8 X-VCS-Branch: master Date: Thu, 16 May 2024 14:02:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b1448208-3e9f-42d1-8fe1-85247b5c2fd9 X-Archives-Hash: ec125f221716112437233f6a62220821 commit: f5adbcfabe52b1e36bc357dd54339905f776c3d8 Author: Alexander Puck Neuwirth neuwirth-informatik de> AuthorDate: Tue May 7 18:44:35 2024 +0000 Commit: Alexander Puck Neuwirth neuwirth-informatik de> CommitDate: Thu May 16 14:01:53 2024 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=f5adbcfa sci-physics/madgraph5: new package, add 3.5.3 Closes: https://github.com/gentoo/sci/pull/1270 Co-authored-by: Andrew Nowa Ammerlaan gentoo.org> Signed-off-by: Alexander Puck Neuwirth neuwirth-informatik.de> sci-physics/madgraph5/files/cuttools.patch | 44 +++++++++++++ sci-physics/madgraph5/madgraph5-3.5.3.ebuild | 93 ++++++++++++++++++++++++++++ sci-physics/madgraph5/metadata.xml | 32 ++++++++++ 3 files changed, 169 insertions(+) diff --git a/sci-physics/madgraph5/files/cuttools.patch b/sci-physics/madgraph5/files/cuttools.patch new file mode 100644 index 000000000..0d6249af8 --- /dev/null +++ b/sci-physics/madgraph5/files/cuttools.patch @@ -0,0 +1,44 @@ +diff -Naru MG5_aMC_v2_9_6.orig/vendor/CutTools/makefile MG5_aMC_v2_9_6/vendor/CutTools/makefile +--- MG5_aMC_v2_9_6.orig/vendor/CutTools/makefile 2022-04-13 11:13:28.277248753 +0200 ++++ MG5_aMC_v2_9_6/vendor/CutTools/makefile 2022-04-13 11:13:43.702292725 +0200 +@@ -42,15 +42,15 @@ + endif + + cpmp: +- cp -p ./src/cts/cts_mpr.in ./src/cts/cts_mpr.h +- cp -p ./src/cts/cts_mpc.in ./src/cts/cts_mpc.h +- cp -p ./src/cts/cts_mprec.in ./src/cts/cts_mprec.h +- cp -p ./src/cts/cts_mpinit.in ./src/cts/cts_mpinit.h ++ cp ./src/cts/cts_mpr.in ./src/cts/cts_mpr.h ++ cp ./src/cts/cts_mpc.in ./src/cts/cts_mpc.h ++ cp ./src/cts/cts_mprec.in ./src/cts/cts_mprec.h ++ cp ./src/cts/cts_mpinit.in ./src/cts/cts_mpinit.h + cpqp: +- cp -p ./src/cts/cts_qpr.in ./src/cts/cts_mpr.h +- cp -p ./src/cts/cts_qpc.in ./src/cts/cts_mpc.h +- cp -p ./src/cts/cts_qprec.in ./src/cts/cts_mprec.h +- cp -p ./src/cts/cts_qpinit.in ./src/cts/cts_mpinit.h ++ cp ./src/cts/cts_qpr.in ./src/cts/cts_mpr.h ++ cp ./src/cts/cts_qpc.in ./src/cts/cts_mpc.h ++ cp ./src/cts/cts_qprec.in ./src/cts/cts_mprec.h ++ cp ./src/cts/cts_qpinit.in ./src/cts/cts_mpinit.h + + clean$(BLD): default + rm -fr $(BLD)/*.f +@@ -68,11 +68,11 @@ + + $(BLD)/version.h: + -mkdir -p $(BLD) +- cp -p ./src/avh/* $(BLD)/ +- cp -p ./src/cts/* $(BLD)/ +- cp -p ./src/mpfun90/* $(BLD)/ +- cp -p ./src/qcdloop/* $(BLD)/ +- cp -p ./src/makefile $(BLD)/ ++ cp ./src/avh/* $(BLD)/ ++ cp ./src/cts/* $(BLD)/ ++ cp ./src/mpfun90/* $(BLD)/ ++ cp ./src/qcdloop/* $(BLD)/ ++ cp ./src/makefile $(BLD)/ + + tar: + tar -czvf $(CTS_TAR) * diff --git a/sci-physics/madgraph5/madgraph5-3.5.3.ebuild b/sci-physics/madgraph5/madgraph5-3.5.3.ebuild new file mode 100644 index 000000000..3ced7918c --- /dev/null +++ b/sci-physics/madgraph5/madgraph5-3.5.3.ebuild @@ -0,0 +1,93 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# does not escape strings properly, so no python3_12 for now +PYTHON_COMPAT=( python3_11 ) +inherit fortran-2 python-single-r1 + +MY_PNN="MadGraph5" +MY_PV=$(ver_rs 1-3 '_') +MY_PN="MG5_aMC_v" +MY_PF=${MY_PN}${MY_PV} + +DESCRIPTION="MadGraph5_aMC@NLO" +HOMEPAGE="https://launchpad.net/mg5amcnlo" +SRC_URI="https://launchpad.net/mg5amcnlo/$(ver_cut 1).0/$(ver_cut 1-2).x/+download/${MY_PN}${PV}.tar.gz -> ${MY_PNN}-${PV}.tar.gz" +S="${WORKDIR}/${MY_PF}" + +LICENSE="UoI-NCSA" +SLOT="3" +KEYWORDS="~amd64" +# TODO add pineapple, herwig, syscalc, pjfrym, pineappl +IUSE="+hepmc2 +lhapdf +fastjet pythia collier thepeg" # td madanalysis5 ninja samurai golem95 +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + sys-libs/zlib + sys-devel/gcc:*[fortran] + $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') + lhapdf? ( sci-physics/lhapdf[${PYTHON_SINGLE_USEDEP}] ) + fastjet? ( sci-physics/fastjet[${PYTHON_SINGLE_USEDEP}] ) + pythia? ( sci-physics/pythia:8=[examples] ) + hepmc2? ( sci-physics/hepmc:2 ) + collier? ( sci-physics/collier[static-libs] ) + thepeg? ( + sci-physics/thepeg[hepmc3(-),fastjet?,lhapdf?] + ) +" +# madanalysis5? ( sci-physics/madanalysis5 ) +# td? ( sci-physics/topdrawer ) +# ninja? ( sci-physics/ninja[static-libs] ) +# samurai? ( sci-physics/samurai ) +# golem95? ( sci-physics/golem95 ) +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}"/cuttools.patch ) + +src_unpack() { + # Perserve permissions + tar xvzf "${DISTDIR}/${MY_PNN}-${PV}.tar.gz" -C "${WORKDIR}" || die +} + +src_configure() { + cat <<-EOF >> input/mg5_configuration.txt || die + $(usex lhapdf "lhapdf_py3 = ${EPREFIX}/usr/bin/lhapdf-config" "") + $(usex fastjet "fastjet = ${EPREFIX}/usr/bin/fastjet-config" "") + $(usex pythia "pythia8_path = ${EPREFIX}/usr" "") + $(usex hepmc2 "hepmc_path = ${EPREFIX}/usr" "") + $(usex collier "collier = ${EPREFIX}/usr/$(get_libdir)" "") + $(usex thepeg "thepeg_path = ${EPREFIX}/usr/$(get_libdir)" "") + auto_update = 0 + EOF + + #use ninja && echo "ninja = ${EPREFIX}/usr/$(get_libdir)" >> input/mg5_configuration.txt + #use samurai && echo "samurai = ${EPREFIX}/usr/$(get_libdir)" >> input/mg5_configuration.txt + #use golem95 && echo "golem = ${EPREFIX}/usr/$(get_libdir)" >> input/mg5_configuration.txt + #use td && echo "td_path = ${EPREFIX}/usr/bin/td" >> input/mg5_configuration.txt + #use madanalysis5 && echo "madanalysis5_path = ${EPREFIX}/opt/MadAnalysis5/" >> input/mg5_configuration.txt +} + +src_compile() { + # MadGraph needs to generate `Template/LO/Source/make_opts` which is done + # automatically at startup. This needs to be done during setup (or with root access) + echo "exit" > tmpfile || die + bin/mg5_aMC ./tmpfile || die + rm tmpfile || die +} + +src_install() { + # symlink entrypoint + dosym ../../opt/${MY_PF}/bin/mg5_aMC /usr/bin/mg5_aMC3 + dosym ../opt/${MY_PF} /opt/"${MY_PNN}" + mv "${WORKDIR}/${MY_PF}" "${ED}/opt/" || die + + # allow all users to modify mg directory + # as it changes it self + #fperms -R a=u /opt/${MY_PF} + #fperms a=u /opt/${MY_PF} +} diff --git a/sci-physics/madgraph5/metadata.xml b/sci-physics/madgraph5/metadata.xml new file mode 100644 index 000000000..8fc26f579 --- /dev/null +++ b/sci-physics/madgraph5/metadata.xml @@ -0,0 +1,32 @@ + + + + + alexander@neuwirth-informatik.de + Alexander Puck Neuwirth + + + MadGraph5_aMC@NLO is a framework that aims at providing all the elements necessary for SM and BSM phenomenology, such as the computations of cross sections, the generation of hard events and their matching with event generators, and the use of a variety of tools relevant to event manipulation and analysis. Processes can be simulated to LO accuracy for any user-defined Lagrangian, an the NLO accuracy in the case of models that support this kind of calculations -- prominent among these are QCD and EW corrections to SM processes. Matrix elements at the tree- and one-loop-level can also be obtained. + + + USE system LHAPDF + USE system FASTJET + USE system PYTHIA + USE system hepmc version 2 + USE system thepeg + USE system collier + + + + mg5amcnlo + +