From 439c011caa888e4b7083684e59fe498f180866de Mon Sep 17 00:00:00 2001 From: David C Hall Date: Fri, 9 Feb 2024 21:51:27 -0800 Subject: [PATCH 1/3] mcfm: 10.3 --- Formula/mcfm.rb | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) diff --git a/Formula/mcfm.rb b/Formula/mcfm.rb index 706d1997..5a1614d4 100644 --- a/Formula/mcfm.rb +++ b/Formula/mcfm.rb @@ -1,8 +1,8 @@ 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 @@ -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" => :build 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)" @@ -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() From 32600e0adc89d66d80000dca23ae4eaf58fbf453 Mon Sep 17 00:00:00 2001 From: David C Hall Date: Sat, 10 Feb 2024 08:08:41 -0800 Subject: [PATCH 2/3] Update mcfm.rb --- Formula/mcfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/mcfm.rb b/Formula/mcfm.rb index 5a1614d4..8b7970ad 100644 --- a/Formula/mcfm.rb +++ b/Formula/mcfm.rb @@ -19,7 +19,7 @@ class Mcfm < Formula option "with-nnlo-vv", "Build NNLO diboson processes (slow compilation)" depends_on "cmake" => :build - depends_on "gcc" => :build + depends_on "gcc" depends_on "lhapdf" => :optional # needs to be built with gcc fails_with :clang From 0f03fe31b3c918f868d4ee30297da16f983a7ce4 Mon Sep 17 00:00:00 2001 From: David C Hall Date: Sat, 10 Feb 2024 08:36:57 -0800 Subject: [PATCH 3/3] Update livecheck --- Formula/mcfm.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/mcfm.rb b/Formula/mcfm.rb index 8b7970ad..8b55f154 100644 --- a/Formula/mcfm.rb +++ b/Formula/mcfm.rb @@ -6,7 +6,7 @@ class Mcfm < Formula 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