aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Puck Neuwirth <alexander@neuwirth-informatik.de>2022-11-02 13:17:38 +0100
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2022-11-03 13:51:20 +0100
commit575b375e66ebbd2fe5999523f52f4c77f6294d4b (patch)
treead7beef83ef195dcd209493e9feec9c0d08bfc7e /sci-physics/mcfm
parentdev-python/pynwb: drop 2.0.0 (diff)
downloadsci-575b375e66ebbd2fe5999523f52f4c77f6294d4b.tar.gz
sci-575b375e66ebbd2fe5999523f52f4c77f6294d4b.tar.bz2
sci-575b375e66ebbd2fe5999523f52f4c77f6294d4b.zip
sci-physics/mcfm: new package, add 10.2.1
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de> Closes: https://github.com/gentoo/sci/pull/1181 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics/mcfm')
-rw-r--r--sci-physics/mcfm/Manifest1
-rw-r--r--sci-physics/mcfm/files/mcfm-10.2.1-rest.patch251
-rw-r--r--sci-physics/mcfm/mcfm-10.2.1.ebuild71
-rw-r--r--sci-physics/mcfm/metadata.xml15
4 files changed, 338 insertions, 0 deletions
diff --git a/sci-physics/mcfm/Manifest b/sci-physics/mcfm/Manifest
new file mode 100644
index 000000000..9163b57a5
--- /dev/null
+++ b/sci-physics/mcfm/Manifest
@@ -0,0 +1 @@
+DIST MCFM-10.2.1.tar.gz 39365160 BLAKE2B 59b6fc55e4a21d4dea979d973cac0378763585088b7b5f032d671a30358e6bd8b6332fd3fa0eeca573177e46f642b3ba8b0c78c503bf37ac4ee0d6c0b962e4df SHA512 994f243b5460784eb5d62f81adf6c08d7ffd03df0d2fa8ac8e4522ab5127f54c3218cd4fe9984adff505c02804613c570d228f88c9343804e20d08f7187575c1
diff --git a/sci-physics/mcfm/files/mcfm-10.2.1-rest.patch b/sci-physics/mcfm/files/mcfm-10.2.1-rest.patch
new file mode 100644
index 000000000..f43a1cb48
--- /dev/null
+++ b/sci-physics/mcfm/files/mcfm-10.2.1-rest.patch
@@ -0,0 +1,251 @@
+--- a/CMakeLists.txt 2022-09-19 02:30:49.215050000 +0200
++++ b/CMakeLists.txt 2022-09-19 21:03:05.409746266 +0200
+@@ -41,48 +41,48 @@
+
+ include(ExternalProject)
+
+-ExternalProject_Add(qd
+- DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/qd-2.3.22 ${CMAKE_BINARY_DIR}/lib/
+- PREFIX ${CMAKE_BINARY_DIR}/lib/qd-2.3.22
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/qd-2.3.22
+- BUILD_IN_SOURCE ON
+- PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
+- CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} FC=${CMAKE_Fortran_COMPILER} ./configure --with-pic --enable-fortran --enable-fma --prefix=${CMAKE_BINARY_DIR}/local --enable-shared --libdir=${CMAKE_BINARY_DIR}/local/lib
+- BUILD_COMMAND ${MAKE}
+- INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
+-)
+-
+-ExternalProject_Add(qcdloop
+- DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/qcdloop-2.0.5 ${CMAKE_BINARY_DIR}/lib
+- PREFIX ${CMAKE_BINARY_DIR}/lib/qcdloop-2.0.5
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/qcdloop-2.0.5
+- BUILD_IN_SOURCE ON
+- PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
+- CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DENABLE_FORTRAN_WRAPPER=ON -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/local -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_INSTALL_LIBDIR=lib
+- BUILD_COMMAND ${MAKE}
+- INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
+-)
+-
+-ExternalProject_Add(liboneloop
+- DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/oneloop ${CMAKE_BINARY_DIR}/lib/
+- PREFIX ${CMAKE_BINARY_DIR}/lib/oneloop
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/oneloop
+- BUILD_IN_SOURCE ON
+- CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=-fPIC
+- BUILD_COMMAND ${MAKE}
+- INSTALL_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local/include && cp ${CMAKE_BINARY_DIR}/lib/oneloop/avh_olo.mod ${CMAKE_BINARY_DIR}/local/include
+-)
+-
+-ExternalProject_Add(handyg
+- DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/handyG ${CMAKE_BINARY_DIR}/lib/
+- PREFIX ${CMAKE_BINARY_DIR}/lib/handyG
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/handyG
+- BUILD_IN_SOURCE ON
+- PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
+- CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} FC=${CMAKE_Fortran_COMPILER} CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC ./configure --prefix=${CMAKE_BINARY_DIR}/local --moduledir=${CMAKE_BINARY_DIR}/local/include
+- BUILD_COMMAND ${MAKE}
+- INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
+-)
++#ExternalProject_Add(qd
++# DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/qd-2.3.22 ${CMAKE_BINARY_DIR}/lib/
++# PREFIX ${CMAKE_BINARY_DIR}/lib/qd-2.3.22
++# SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/qd-2.3.22
++# BUILD_IN_SOURCE ON
++# PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
++# CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} FC=${CMAKE_Fortran_COMPILER} ./configure --with-pic --enable-fortran --enable-fma --prefix=${CMAKE_BINARY_DIR}/local --enable-shared --libdir=${CMAKE_BINARY_DIR}/local/lib
++# BUILD_COMMAND ${MAKE}
++# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
++#)
++#
++#ExternalProject_Add(qcdloop
++# DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/qcdloop-2.0.5 ${CMAKE_BINARY_DIR}/lib
++# PREFIX ${CMAKE_BINARY_DIR}/lib/qcdloop-2.0.5
++# SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/qcdloop-2.0.5
++# BUILD_IN_SOURCE ON
++# PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
++# CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DENABLE_FORTRAN_WRAPPER=ON -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/local -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_INSTALL_LIBDIR=lib
++# BUILD_COMMAND ${MAKE}
++# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
++#)
++#
++#ExternalProject_Add(liboneloop
++# DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/oneloop ${CMAKE_BINARY_DIR}/lib/
++# PREFIX ${CMAKE_BINARY_DIR}/lib/oneloop
++# SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/oneloop
++# BUILD_IN_SOURCE ON
++# CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=-fPIC
++# BUILD_COMMAND ${MAKE}
++# INSTALL_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local/include && cp ${CMAKE_BINARY_DIR}/lib/oneloop/avh_olo.mod ${CMAKE_BINARY_DIR}/local/include
++#)
++#
++#ExternalProject_Add(handyg
++# DOWNLOAD_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/lib && cp -r ${CMAKE_SOURCE_DIR}/lib/handyG ${CMAKE_BINARY_DIR}/lib/
++# PREFIX ${CMAKE_BINARY_DIR}/lib/handyG
++# SOURCE_DIR ${CMAKE_BINARY_DIR}/lib/handyG
++# BUILD_IN_SOURCE ON
++# PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
++# CONFIGURE_COMMAND CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} FC=${CMAKE_Fortran_COMPILER} CFLAGS=-fPIC CXXFLAGS=-fPIC FFLAGS=-fPIC ./configure --prefix=${CMAKE_BINARY_DIR}/local --moduledir=${CMAKE_BINARY_DIR}/local/include
++# BUILD_COMMAND ${MAKE}
++# INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
++#)
+
+ ## Configuration options
+
+@@ -169,7 +169,7 @@
+ add_subdirectory(lib/SpecialFunctions)
+ add_subdirectory(lib/AMOS)
+
+-add_dependencies(objlib qd qcdloop liboneloop handyg)
++#add_dependencies(objlib qd qcdloop liboneloop handyg)
+
+ if(${with_vvamp})
+ add_compile_definitions(WITH_VVAMP=1)
+@@ -182,7 +182,7 @@
+ PATCH_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local
+ CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_Fortran_COMPILER=${CMAKE_Fortran_COMPILER} -DCMAKE_Fortran_FLAGS=-fPIC
+ BUILD_COMMAND ${MAKE}
+- INSTALL_COMMAND mkdir -p ${CMAKE_BINARY_DIR}/local/include && cp ${CMAKE_BINARY_DIR}/VVamp/mod_vvamp.mod ${CMAKE_BINARY_DIR}/local/include
++ INSTALL_COMMAND mv ${CMAKE_BINARY_DIR}/VVamp/mod_vvamp.mod ${CMAKE_BINARY_DIR}/local/include
+ )
+ add_library(vvamp STATIC IMPORTED)
+ set_property(TARGET vvamp PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/VVamp/libvvamp.a")
+@@ -192,7 +192,6 @@
+ else()
+ set(linkvvamp "")
+ endif()
+-
+ set_target_properties(objlib PROPERTIES
+ CXX_STANDARD 11
+ Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/include"
+@@ -222,48 +221,51 @@
+ target_link_libraries(mcfm ${OpenMP_Fortran_LIBRARIES})
+ endif()
+
+-add_library(oneloop STATIC IMPORTED)
+-set_property(TARGET oneloop PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/lib/oneloop/liboneloop.a")
++find_library(qcdloop qcdloop)
+
+-add_library(qcdloop_lib_static STATIC IMPORTED)
+-set_property(TARGET qcdloop_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqcdloop.a")
+-set_property(TARGET qcdloop_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qcdloop_lib_static qcdloop)
+-
+-add_library(qcdloop_lib_shared SHARED IMPORTED)
+-set_property(TARGET qcdloop_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqcdloop.${CMAKE_SHARED_LIBRARY_SUFFIX}")
+-set_property(TARGET qcdloop_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qcdloop_lib_shared qcdloop)
+-
+-add_library(qd_lib_static STATIC IMPORTED)
+-set_property(TARGET qd_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqd.a")
+-set_property(TARGET qd_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qd_lib_static qd)
+-
+-add_library(qd_lib_shared SHARED IMPORTED)
+-set_property(TARGET qd_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqd.${CMAKE_SHARED_LIBRARY_SUFFIX}")
+-set_property(TARGET qd_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qd_lib_shared qd)
+-
+-add_library(qdmod_lib_static STATIC IMPORTED)
+-set_property(TARGET qdmod_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqdmod.a")
+-set_property(TARGET qdmod_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qdmod_lib_static qd)
+-
+-add_library(qdmod_lib_shared SHARED IMPORTED)
+-set_property(TARGET qdmod_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqdmod.${CMAKE_SHARED_LIBRARY_SUFFIX}")
+-set_property(TARGET qdmod_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(qdmod_lib_shared qd)
+-
+-add_library(handyg_lib_static STATIC IMPORTED)
+-set_property(TARGET handyg_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libhandyg.a")
+-set_property(TARGET handyg_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
+-add_dependencies(handyg_lib_static handyg)
+-
+-add_dependencies(objlib qdmod_lib_static)
+-add_dependencies(objlib qd_lib_static)
+-add_dependencies(objlib qcdloop_lib_static)
+-add_dependencies(objlib handyg_lib_static)
++#add_library(oneloop STATIC IMPORTED)
++#set_property(TARGET oneloop PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/lib/oneloop/liboneloop.a")
++#
++#add_library(qcdloop_lib_static STATIC IMPORTED)
++#set_property(TARGET qcdloop_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqcdloop.a")
++#set_property(TARGET qcdloop_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qcdloop_lib_static qcdloop)
++
++#add_library(qcdloop_lib_shared SHARED IMPORTED)
++#set_property(TARGET qcdloop_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqcdloop.${CMAKE_SHARED_LIBRARY_SUFFIX}")
++#set_property(TARGET qcdloop_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qcdloop_lib_shared qcdloop)
++#
++#add_library(qd_lib_static STATIC IMPORTED)
++#set_property(TARGET qd_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqd.a")
++#set_property(TARGET qd_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qd_lib_static qd)
++#
++#add_library(qd_lib_shared SHARED IMPORTED)
++#set_property(TARGET qd_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqd.${CMAKE_SHARED_LIBRARY_SUFFIX}")
++#set_property(TARGET qd_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qd_lib_shared qd)
++#
++#add_library(qdmod_lib_static STATIC IMPORTED)
++#set_property(TARGET qdmod_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqdmod.a")
++#set_property(TARGET qdmod_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qdmod_lib_static qd)
++#
++#add_library(qdmod_lib_shared SHARED IMPORTED)
++#set_property(TARGET qdmod_lib_shared PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libqdmod.${CMAKE_SHARED_LIBRARY_SUFFIX}")
++#set_property(TARGET qdmod_lib_shared PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(qdmod_lib_shared qd)
++#
++#add_library(handyg_lib_static STATIC IMPORTED)
++#set_property(TARGET handyg_lib_static PROPERTY IMPORTED_LOCATION "${CMAKE_BINARY_DIR}/local/lib/libhandyg.a")
++#set_property(TARGET handyg_lib_static PROPERTY IMPORTED_NO_SONAME TRUE)
++#add_dependencies(handyg_lib_static handyg)
++
++#add_dependencies(objlib qdmod_lib_static)
++#add_dependencies(objlib qd_lib_static)
++#add_dependencies(objlib qcdloop_lib_static)
++#add_dependencies(objlib handyg_lib_static)
++target_link_libraries(objlib qdmod qd qcdloop handyg)
+
+ if(use_internal_lhapdf)
+ ExternalProject_Add(lhapdf
+@@ -285,13 +287,15 @@
+
+ add_dependencies(lhapdf_lib_static lhapdf)
+ target_link_libraries(mcfm lhapdf_lib_static)
+- target_include_directories(objlib PRIVATE "${CMAKE_BINARY_DIR}/local/include" "${CMAKE_BINARY_DIR}/local/include/qd")
++ target_include_directories(objlib PRIVATE
++ "${CMAKE_BINARY_DIR}/include" "/usr/include" "/usr/include/qd")
+ add_dependencies(objlib lhapdf)
+ elseif(use_external_lhapdf)
+ find_library(lhapdf_lib NAMES LHAPDF REQUIRED)
+ target_link_libraries(mcfm ${lhapdf_lib})
+ if (${lhapdf_include_path})
+- target_include_directories(objlib PRIVATE "${LHAPDF_INCLUDE_PATH}" "${CMAKE_BINARY_DIR}/local/include" "${CMAKE_BINARY_DIR}/local/include/qd")
++ target_include_directories(objlib PRIVATE "${LHAPDF_INCLUDE_PATH}"
++ "${CMAKE_BINARY_DIR}/include" "/usr/include" "/usr/include/qd")
+ endif()
+ endif()
+
+@@ -299,9 +303,9 @@
+
+ if(${with_library})
+ if(use_internal_lhapdf)
+- target_link_libraries(libmcfm qdmod_lib_static qd_lib_static qcdloop_lib_static oneloop handyg_lib_static ${linkvvamp} quadmath stdc++ lhapdf_lib_static)
++ target_link_libraries(libmcfm qdmod qd qcdloop avh_olo handyg ${linkvvamp} quadmath stdc++ lhapdf_lib_static)
+ else()
+- target_link_libraries(libmcfm qdmod_lib_static qd_lib_static qcdloop_lib_static oneloop handyg_lib_static ${linkvvamp} quadmath stdc++ ${lhapdf_lib})
++ target_link_libraries(libmcfm qdmod qd qcdloop avh_olo handyg ${linkvvamp} quadmath stdc++ ${lhapdf_lib})
+ endif()
+ if (DEFINED OLDIR)
+ target_link_libraries(oltest libmcfm ${openloops_lib})
+@@ -320,7 +324,7 @@
+ endif()
+ endif()
+
+-target_link_libraries(mcfm qdmod_lib_static qd_lib_static qcdloop_lib_static oneloop handyg_lib_static ${linkvvamp} quadmath stdc++)
++target_link_libraries(mcfm qdmod qd qcdloop avh_olo handyg ${linkvvamp} quadmath stdc++)
+
+ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/local/lib")
diff --git a/sci-physics/mcfm/mcfm-10.2.1.ebuild b/sci-physics/mcfm/mcfm-10.2.1.ebuild
new file mode 100644
index 000000000..9a928e4c9
--- /dev/null
+++ b/sci-physics/mcfm/mcfm-10.2.1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_MAKEFILE_GENERATOR="emake"
+
+inherit cmake
+
+MY_PN=MCFM
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Monte Carlo for FeMtobarn processes"
+HOMEPAGE="https://mcfm.fnal.gov"
+SRC_URI="https://mcfm.fnal.gov/downloads/${MY_P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+# Manual states multithreading bug in lhapdf-6.3.0 ?!
+# MCFM has been tested against lhapdf-6.2.0 which ::gentoo already dropped
+DEPEND="
+ sci-physics/lhapdf
+ >=sci-libs/qd-2.3.22
+ >=sci-physics/qcdloop-2.0.5
+ >=sci-physics/oneloop-2020.07.31
+ >=sci-libs/handyg-0.1.5
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ virtual/fortran
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-rest.patch
+)
+src_prepare() {
+ sed -i -e 's/\(name=".*\)"/\1_"/g' src/Mods/mod_qcdloop_c.f || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Duse_external_lhapdf=ON
+ -Duse_internal_lhapdf=OFF
+ -Dlhapdf_include_path=ON
+ -Dwith_library=ON
+ -Dwith_vvamp=OFF
+ )
+ cmake_src_configure
+ # Fix relative path in working dir to something absolute
+ sed -i "s/process\.DAT/${EPREFIX}\/usr\/share\/${MY_PN}\/process\.DAT/g" src/Procdep/chooser.f || die
+}
+
+src_compile() {
+ # Single thread force needed since fortan mods depend on each other
+ # This problem only happend very rarely
+ export MAKEOPTS=-j1
+ cmake_src_compile
+}
+
+src_install() {
+ # this did not work
+ #cmake_src_install
+ dobin "${BUILD_DIR}"/mcfm
+ dolib.so "${BUILD_DIR}"/libmcfm.so
+ insinto "/usr/share/${MY_PN}/"
+ doins "Bin/process.DAT"
+}
diff --git a/sci-physics/mcfm/metadata.xml b/sci-physics/mcfm/metadata.xml
new file mode 100644
index 000000000..a8720d7dd
--- /dev/null
+++ b/sci-physics/mcfm/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>APN-Pucky@users.noreply.github.com</email>
+ <name>APN-Pucky</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>sci-physics@gentoo.org</email>
+ <name>Gentoo Physics Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The program calculates cross-sections for various femtobarn-level processes at hadron-hadron colliders. A number of processes can be calculated at NLO order in QCD, while most other processes are included at NNLO order in QCD. The calculation of some processes can also account for next-to-leading order weak effects.
+ </longdescription>
+</pkgmetadata>