blob: bfc795247aa2e5073cb1375ef184cc15bc656ca9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CMAKE_MAKEFILE_GENERATOR="emake"
inherit cmake fortran-2
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}"
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"
}
|