update clhep and geant4 (#1799)

* update clhep

* update geant4
pull/1804/head
Hoildkv 2 years ago committed by GitHub
parent a5795536cc
commit 27d7e9672d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/c/clhep/xmake.lua
  2. 9
      packages/g/geant4/xmake.lua

@ -6,8 +6,9 @@ package("clhep")
add_urls("https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-$(version).tgz", {version = function (version) return version:gsub("%+", ".") end})
add_versions("2.4.5+1", "2517c9b344ad9f55974786ae6e7a0ef8b22f4abcbf506df91194ea2299ce3813")
add_versions("2.4.6+3", "fcd007f11b10ba4af28d027222b63148d0eb44ff7a082eee353bdf921f9c684a")
add_patches("2.4.5+1", path.join(os.scriptdir(), "patches", "2.4.5.1", "kind.patch"), "60a65bbe05380f6cd89752bdd662bd1685a8944081c97746f7a0bd2d046edf9d")
add_patches("2.4.x", path.join(os.scriptdir(), "patches", "2.4.5.1", "kind.patch"), "60a65bbe05380f6cd89752bdd662bd1685a8944081c97746f7a0bd2d046edf9d")
if is_plat("windows") then
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
@ -18,11 +19,12 @@ package("clhep")
os.cd("CLHEP")
if package:is_plat("windows") then
io.replace("cmake/Modules/ClhepVariables.cmake", "/MD", "/" .. package:config("vs_runtime"), {plain = true})
io.replace("Random/CMakeLists.txt", "add_subdirectory(test)", "", {plain = true})
end
local configs = {"-DCLHEP_BUILD_DOCS=OFF", "-DLIB_SUFFIX="}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
import("package.tools.cmake").install(package, configs, {buildir = os.tmpfile() .. ".dir"})
end)
on_test(function (package)

@ -3,10 +3,15 @@ package("geant4")
set_homepage("https://geant4.web.cern.ch/")
set_description("Geant4 is a toolkit for the simulation of the passage of particles through matter.")
add_urls("https://geant4-data.web.cern.ch/releases/geant4_$(version).zip", {version = function (version)
return format("%02d_%02d_p%02d", version:major(), version:minor(), version:patch())
add_urls("https://geant4-data.web.cern.ch/releases/geant4$(version).zip", {version = function (version)
if version:ge("11.0") then
return "-v" .. version
else
return format("_%02d_%02d_p%02d", version:major(), version:minor(), version:patch())
end
end})
add_versions("10.7.2", "c07b358c30b5930afcc32b44e899cf901083539f350f4333d65784c2aaa4af38")
add_versions("11.1.0", "8d7df33a4b692493f01a05b82047134a8291d00f113b6a23bdb5253a6527f5a1")
add_deps("cmake")
add_deps("zlib", "expat", "clhep")

Loading…
Cancel
Save