diff options
author | 2024-05-07 19:41:00 +0200 | |
---|---|---|
committer | 2024-06-27 14:16:40 +0200 | |
commit | 83da0e64de65d33f34dd35972c2b444dfe889f96 (patch) | |
tree | c107ba7693b8c8ec326df507480b788e7e77c1fb | |
parent | sci-physics/cuttools: new package, add 1.8.2 (diff) | |
download | sci-83da0e64de65d33f34dd35972c2b444dfe889f96.tar.gz sci-83da0e64de65d33f34dd35972c2b444dfe889f96.tar.bz2 sci-83da0e64de65d33f34dd35972c2b444dfe889f96.zip |
sci-physics/openloops: new package, add 2.1.2
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
-rw-r--r-- | sci-physics/openloops/Manifest | 1 | ||||
-rw-r--r-- | sci-physics/openloops/files/openloops-2.1.2-ldflags.patch | 11 | ||||
-rw-r--r-- | sci-physics/openloops/files/openloops-2.1.2-python3.12.patch | 34 | ||||
-rw-r--r-- | sci-physics/openloops/metadata.xml | 23 | ||||
-rw-r--r-- | sci-physics/openloops/openloops-2.1.3.ebuild | 108 |
5 files changed, 177 insertions, 0 deletions
diff --git a/sci-physics/openloops/Manifest b/sci-physics/openloops/Manifest new file mode 100644 index 000000000..053e3b83d --- /dev/null +++ b/sci-physics/openloops/Manifest @@ -0,0 +1 @@ +DIST OpenLoops-OpenLoops-2.1.3.tar.bz2 3769562 BLAKE2B ddb664a7310662e2d0891e31870d614c191b0248f1b4c8816d4f33b6709005eea7435fda73c354092a28d55a0b106ec9358fb4e4a7a6ed592d61208ff5334e85 SHA512 a5ae2431506f8e169c42dd1d5fa3db70b4e2d62dfa744041fcd61d8554daba0700d453e9198e50a3e85cb3f196277c0f011fb408fd5913cd6a1c42ed71bb9d51 diff --git a/sci-physics/openloops/files/openloops-2.1.2-ldflags.patch b/sci-physics/openloops/files/openloops-2.1.2-ldflags.patch new file mode 100644 index 000000000..5f5076581 --- /dev/null +++ b/sci-physics/openloops/files/openloops-2.1.2-ldflags.patch @@ -0,0 +1,11 @@ +--- a/pyol/tools/OLBaseConfig.py 2024-05-07 17:59:46.060792049 +0200 ++++ b/pyol/tools/OLBaseConfig.py 2024-05-07 18:02:07.269403340 +0200 +@@ -182,7 +182,7 @@ + parse_option(config, 'f90_flags', interpolate=True, converter=split_list) + parse_option(config, 'f_flags', interpolate=True, converter=split_list) + parse_option(config, 'common_flags', interpolate=True, converter=split_list) +- parse_option(config, 'link_flags', interpolate=True, converter=split_list) ++ parse_option(config, 'link_flags', interpolate=True, converter=str.split) + parse_option(config, 'debug_flags_1', converter=split_list) + parse_option(config, 'debug_flags_4', interpolate=True, + converter=split_list) diff --git a/sci-physics/openloops/files/openloops-2.1.2-python3.12.patch b/sci-physics/openloops/files/openloops-2.1.2-python3.12.patch new file mode 100644 index 000000000..1e76a1835 --- /dev/null +++ b/sci-physics/openloops/files/openloops-2.1.2-python3.12.patch @@ -0,0 +1,34 @@ +--- a/SConstruct 2024-05-07 15:56:26.162295325 +0200 ++++ b/SConstruct 2024-05-07 15:56:14.115460655 +0200 +@@ -404,8 +404,9 @@ + F90FLAGS = config['f90_flags'] + config['generic_optimisation'], + LINKFLAGS = config['link_flags'], + LIBPATH = [config['generic_lib_dir']], +- DOLLAR = '\$$', +- RPATH = [HashableLiteral('\$$ORIGIN')], ++ DOLLAR = '\\$$', ++ RPATH = [HashableLiteral('\\$$ORIGIN')], ++ SHLIBVERSION = release_version, + F90 = config['fortran_compiler'], + FORTRAN = config['fortran_compiler'], + CC = config['cc']) +@@ -719,7 +719,7 @@ + processes_seen[processlib] = loops + process_list = process_list_nodup + +-env.Append(RPATH = [HashableLiteral('\$$ORIGIN/../lib')]) ++env.Append(RPATH = [HashableLiteral('\\$$ORIGIN/../lib')]) + + + for (loops, process_api, processlib) in process_list: +--- a/SConstruct 2024-05-07 15:59:46.808415000 +0200 ++++ b/SConstruct 2024-05-07 16:00:46.839244667 +0200 +@@ -796,7 +796,7 @@ + env = env, + shared = config['shared_libraries'], + env_mod = [ +- ('^(virtual_\d|tensorsum_|loop_)', ++ ('^(virtual_\\d|tensorsum_|loop_)', + {'F90FLAGS': config['f90_flags'] + config['loop_optimisation']}), + ('', + {'F90FLAGS': config['f90_flags'] + config['born_optimisation']})] diff --git a/sci-physics/openloops/metadata.xml b/sci-physics/openloops/metadata.xml new file mode 100644 index 000000000..5bec6ac4c --- /dev/null +++ b/sci-physics/openloops/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>alexander@neuwirth-informatik.de</email> + <name>Alexander Puck Neuwirth</name> + </maintainer> + <maintainer type="project"> + <email>sci-physics@gentoo.org</email> + <name>Gentoo Physics Project</name> + </maintainer> + <longdescription lang="en"> + The OpenLoops 2 program is a fully automated implementation of the Open Loops algorithm combined with on-the-fly reduction methods, which allows for the fast and stable numerical evaluation of tree and one-loop matrix elements for any Standard Model process at NLO QCD and NLO EW. + </longdescription> + <upstream> + <remote-id type="gitlab">openloops/OpenLoops</remote-id> + </upstream> + <use> + <flag name="collier">Build with collier</flag> + <flag name="extra">Build libs with extra</flag> + <flag name="cuttools">Build with cuttools</flag> + </use> +</pkgmetadata> diff --git a/sci-physics/openloops/openloops-2.1.3.ebuild b/sci-physics/openloops/openloops-2.1.3.ebuild new file mode 100644 index 000000000..a53eb1f9e --- /dev/null +++ b/sci-physics/openloops/openloops-2.1.3.ebuild @@ -0,0 +1,108 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit fortran-2 python-single-r1 scons-utils toolchain-funcs + +MY_PN=OpenLoops +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Evaluation of tree and one-loop matrix elements for any Standard Model." +HOMEPAGE="https://openloops.hepforge.org/index.html" +#SRC_URI="https://openloops.hepforge.org/downloads?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +#S="${WORKDIR}/${MY_P}" +SRC_URI="https://gitlab.com/openloops/OpenLoops/-/archive/${MY_P}/${MY_PN}-${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_PN}-${MY_P}" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+collier +cuttools +extra" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + sci-physics/qcdloop + sci-physics/oneloop[dpkind,qpkind16,-qpkind,-cppintf] + collier? ( sci-physics/collier[-static-libs] ) + cuttools? ( sci-physics/cuttools[dummy] ) + ${PYTHON_DEPS} +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-2.1.2-ldflags.patch" +) + +src_prepare() { + default + mv openloops.cfg.tmpl openloops.cfg || die + sed -i "s|scons -Q|scons -Q -C /opt/${MY_P}/|g" openloops || die + if use extra ; then + sed -i "s|#compile_extra.*|compile_extra = 1|" openloops.cfg || die + fi + + cat <<-EOF >> openloops.cfg || die + compile_libraries = rambo trred + link_libraries = $(usev collier) $(usev cuttools) + ccflags = ${CFLAGS} + cxxflags = ${CXXFLAGS} + f_flags = ${FFLAGS} -I${ESYSROOT}/usr/include/ -I${ESYSROOT}/usr/include/cuttools -lcollier + link_flags = ${LDFLAGS} -I${ESYSROOT}/usr/include/ -I${ESYSROOT}/usr/include/cuttools -lcollier + cc = $(tc-getCC) + cxx = $(tc-getCXX) + fortran_compiler = $(tc-getFC) + process_src_dir = ${EPREFIX}/opt/${MY_P}/process_src/ + process_obj_dir = ${EPREFIX}/opt/${MY_P}/process_obj/ + process_lib_dir = ${EPREFIX}/opt/${MY_P}/proclib/ + release = $PV + import_env = @all + EOF + + # fix rename for py3.12 + sed -i 's/SafeConfigParser/ConfigParser/g' pyol/tools/OLBaseConfig.py || die + # wipe local scons + rm -r scons-local || die + rm scons || die +} + +src_compile() { + escons --cache-disable +} + +src_install() { + dosym ../opt/${MY_P} /opt/OpenLoops2 + dobin openloops + cd include || die + doheader openloops.h + cd ../lib || die + # Also install so.version links + dolib.so libolcommon.so* libopenloops.so* librambo.so* libtrred.so* + cd ../lib_src/olcommon/mod || die + doheader *.mod + cd ../../openloops/mod || die + doheader *.mod + cd ../../rambo/mod || die + doheader *.mod + cd ../../trred/mod || die + doheader *.mod + + cd "${S}" || die "Failed to cd into ${S}" + insinto /opt/${MY_P} + doins openloops.cfg SConstruct + doins -r pyol + + # Previous method of allowing everyone everything + # maybe better to use a group for that + # for now like lhapdf just let root install + #fperms -R a=u /opt/${MY_P} + #fperms a=u /opt/${MY_P} + +} + +pkg_postinst() { + elog "Install processes with openloops libinstall." + elog "They are installed in /opt/${MY_P}/proclib." +} |