otf2: fix package (#44856)
- extend python - forward compat bound with python due to imp import - restore -O2 flags (CFLAGS do not compose)
This commit is contained in:
parent
e5bd79b011
commit
4bbf4a5e79
@ -61,19 +61,19 @@ class Otf2(AutotoolsPackage):
|
|||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
if version < Version("2.3"):
|
if version < Version("2.3"):
|
||||||
return "https://www.vi-hps.org/cms/upload/packages/otf2/otf2-{0}.tar.gz".format(
|
return f"https://www.vi-hps.org/cms/upload/packages/otf2/otf2-{version}.tar.gz"
|
||||||
version
|
|
||||||
)
|
|
||||||
|
|
||||||
return "https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-{0}/otf2-{0}.tar.gz".format(
|
return f"https://perftools.pages.jsc.fz-juelich.de/cicd/otf2/tags/otf2-{version}/otf2-{version}.tar.gz"
|
||||||
version
|
|
||||||
)
|
extends("python")
|
||||||
|
|
||||||
|
# `imp` module required
|
||||||
|
depends_on("python@:3.11", type=("build", "run"))
|
||||||
|
|
||||||
with when("@2.2 %cce"):
|
with when("@2.2 %cce"):
|
||||||
depends_on("autoconf", type="build")
|
depends_on("autoconf", type="build")
|
||||||
depends_on("automake", type="build")
|
depends_on("automake", type="build")
|
||||||
depends_on("libtool", type="build")
|
depends_on("libtool", type="build")
|
||||||
depends_on("m4", type="build")
|
|
||||||
|
|
||||||
# Fix missing initialization of variable resulting in issues when used by
|
# Fix missing initialization of variable resulting in issues when used by
|
||||||
# APEX/HPX: https://github.com/STEllAR-GROUP/hpx/issues/5239
|
# APEX/HPX: https://github.com/STEllAR-GROUP/hpx/issues/5239
|
||||||
@ -86,14 +86,19 @@ def url_for_version(self, version):
|
|||||||
def force_autoreconf(self):
|
def force_autoreconf(self):
|
||||||
return self.spec.satisfies("@2.2 %cce")
|
return self.spec.satisfies("@2.2 %cce")
|
||||||
|
|
||||||
|
def flag_handler(self, name, flags):
|
||||||
|
if name == "cflags":
|
||||||
|
flags.append(self.compiler.cc_pic_flag)
|
||||||
|
elif name == "cxxflags":
|
||||||
|
flags.append(self.compiler.cxx_pic_flag)
|
||||||
|
return (flags, None, None)
|
||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
return [
|
return [
|
||||||
"--enable-shared",
|
"--enable-shared",
|
||||||
"CC={0}".format(spack_cc),
|
f"CC={spack_cc}",
|
||||||
"CXX={0}".format(spack_cxx),
|
f"CXX={spack_cxx}",
|
||||||
"F77={0}".format(spack_f77),
|
f"F77={spack_f77}",
|
||||||
"FC={0}".format(spack_fc),
|
f"FC={spack_fc}",
|
||||||
"CFLAGS={0}".format(self.compiler.cc_pic_flag),
|
|
||||||
"CXXFLAGS={0}".format(self.compiler.cxx_pic_flag),
|
|
||||||
"PYTHON_FOR_GENERATOR=:",
|
"PYTHON_FOR_GENERATOR=:",
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user