ecflow: polish recipe (#34043)
This commit is contained in:
parent
0182603609
commit
70bcbba5eb
@ -222,6 +222,9 @@ def libs(self):
|
|||||||
conflicts("cxxstd=98", when="+icu") # Requires c++11 at least
|
conflicts("cxxstd=98", when="+icu") # Requires c++11 at least
|
||||||
|
|
||||||
depends_on("python", when="+python")
|
depends_on("python", when="+python")
|
||||||
|
# https://github.com/boostorg/python/commit/cbd2d9f033c61d29d0a1df14951f4ec91e7d05cd
|
||||||
|
depends_on("python@:3.9", when="@:1.75 +python")
|
||||||
|
|
||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
depends_on("bzip2", when="+iostreams")
|
depends_on("bzip2", when="+iostreams")
|
||||||
depends_on("zlib", when="+iostreams")
|
depends_on("zlib", when="+iostreams")
|
||||||
|
@ -60,19 +60,27 @@ class Ecflow(CMakePackage):
|
|||||||
|
|
||||||
depends_on("openssl@1:", when="@5:")
|
depends_on("openssl@1:", when="@5:")
|
||||||
depends_on("qt@5:", when="+ui")
|
depends_on("qt@5:", when="+ui")
|
||||||
depends_on("cmake@2.12.11:", type="build")
|
# Requirement to use the Python3_EXECUTABLE variable
|
||||||
|
depends_on("cmake@3.16:", type="build")
|
||||||
|
|
||||||
|
@when("@:4.13.0")
|
||||||
|
def patch(self):
|
||||||
|
version = str(self.spec["python"].version[:2])
|
||||||
|
filter_file(
|
||||||
|
r"REQUIRED COMPONENTS python3",
|
||||||
|
rf"REQUIRED COMPONENTS python{version}",
|
||||||
|
"Pyext/CMakeLists.txt",
|
||||||
|
)
|
||||||
|
|
||||||
def cmake_args(self):
|
def cmake_args(self):
|
||||||
boost_lib = self.spec["boost"].prefix.lib
|
boost_lib = self.spec["boost"].prefix.lib
|
||||||
args = ["-DBoost_PYTHON_LIBRARY_RELEASE=" + boost_lib]
|
return [
|
||||||
|
self.define("Boost_PYTHON_LIBRARY_RELEASE", boost_lib),
|
||||||
# https://jira.ecmwf.int/browse/SUP-2641#comment-208943
|
self.define_from_variant("ENABLE_UI", "ui"),
|
||||||
use_static_boost = "ON" if "+static_boost" in self.spec else "OFF"
|
self.define_from_variant("ENABLE_GUI", "ui"),
|
||||||
args.append("-DENABLE_STATIC_BOOST_LIBS=" + use_static_boost)
|
self.define_from_variant("ENABLE_SSL", "ssl"),
|
||||||
|
# https://jira.ecmwf.int/browse/SUP-2641#comment-208943
|
||||||
ssl = "ON" if "+ssl" in self.spec else "OFF"
|
self.define_from_variant("ENABLE_STATIC_BOOST_LIBS", "static_boost"),
|
||||||
args.append("-DENABLE_SSL=" + ssl)
|
self.define("Python3_EXECUTABLE", self.spec["python"].package.command),
|
||||||
|
self.define("BOOST_ROOT", self.spec["boost"].prefix),
|
||||||
ecflow_ui = "ON" if "+ui" in self.spec else "OFF"
|
]
|
||||||
args.extend(["-DENABLE_UI=" + ecflow_ui, "-DENABLE_GUI=" + ecflow_ui])
|
|
||||||
return args
|
|
||||||
|
Loading…
Reference in New Issue
Block a user