Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcfm: 10.3 #379

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 11 additions & 28 deletions Formula/mcfm.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class Mcfm < Formula
desc "Monte Carlo for FeMtobarn processes"
homepage "https://mcfm.fnal.gov"
url "https://mcfm.fnal.gov/downloads/MCFM-10.2.2.tar.gz"
sha256 "15ebd4cb51cafb4af674a2e0a3ec8c02ac88a49565b3265c80719c59c0cc3c9d"
url "https://mcfm.fnal.gov/downloads/MCFM-10.3.tar.gz"
sha256 "97677cbccb06b2821a5fa1569d1f561b253bd0651a97ab05d13247c708864840"
license "GPL-3.0-or-later"

livecheck do
url :homepage
url "https://mcfm.fnal.gov/OverviewofMCFM.html"
regex(/href=.*?MCFM[._-]v?(\d+(?:\.\d+)+)\.t/i)
end

Expand All @@ -19,22 +19,21 @@ class Mcfm < Formula
option "with-nnlo-vv", "Build NNLO diboson processes (slow compilation)"

depends_on "cmake" => :build
depends_on "gcc@12"
depends_on "gcc"
depends_on "lhapdf" => :optional # needs to be built with gcc

fails_with :clang

patch :DATA

def install
gcc = Formula["gcc@12"]
ENV["FC"] = gcc.opt_bin/"gfortran-#{gcc.version_suffix}"
gfortran_lib = gcc.opt_lib/"gcc/#{gcc.version_suffix}"
gcc = Formula["gcc"]
gcc_major_ver = gcc.any_installed_version.major
ENV["FC"] = gcc.opt_bin/"gfortran-#{gcc_major_ver}"
gfortran_lib = gcc.opt_lib/"gcc/#{gcc_major_ver}"

inreplace "lib/qcdloop-2.0.5/CMakeLists.txt",
inreplace "lib/qcdloop-2.0.9/CMakeLists.txt",
"target_link_libraries(qcdloop_shared)",
"target_link_libraries(qcdloop_shared -L#{gfortran_lib} -lquadmath)"
inreplace "lib/qcdloop-2.0.5/CMakeLists.txt",
inreplace "lib/qcdloop-2.0.9/CMakeLists.txt",
"target_link_libraries(qcdloop_static)",
"target_link_libraries(qcdloop_static -L#{gfortran_lib} -lquadmath)"

Expand Down Expand Up @@ -71,22 +70,6 @@ def caveats

inreplace "input.ini", "part = nlo", "part = lo" # avoid test timeout
system bin/"mcfm", "input.ini"
assert_predicate testpath/"W_only_lo_CT14nnlo_1.00_1.00_14TeV_total_cross.txt", :exist?
assert_predicate testpath/"W_only_lo_LUXqed17_plus_PDF4LHC15_nnlo_30_100__100__test1_total_cross.txt", :exist?
end
end

__END__
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4fff350..1dc0b76 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -290,8 +290,8 @@ if(use_internal_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")
+ if (NOT ${lhapdf_include_path} STREQUAL "OFF")
+ target_include_directories(objlib PRIVATE "${lhapdf_include_path}" "${CMAKE_BINARY_DIR}/local/include" "${CMAKE_BINARY_DIR}/local/include/qd")
endif()
endif()
Loading