pythia8: add a cxxstd variant (#44077)

* pythia8: add a cxxstd variant
* Add multi=False, fix regexp

---------

Co-authored-by: jmcarcell <jmcarcell@users.noreply.github.com>
This commit is contained in:
Juan Miguel Carceller 2024-05-09 18:32:38 +02:00 committed by GitHub
parent 2ed0e3d737
commit d88fa5cf8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,6 +58,14 @@ class Pythia8(AutotoolsPackage):
deprecated=True,
)
variant(
"cxxstd",
default="11",
values=("11", "17", "20", "23"),
multi=False,
description="Use the specified C++ standard when building",
)
variant("shared", default=True, description="Build shared library")
variant("gzip", default=False, description="Build with gzip support, for reading lhe.gz files")
variant(
@ -120,6 +128,12 @@ class Pythia8(AutotoolsPackage):
filter_compiler_wrappers("Makefile.inc", relative_root="share/Pythia8/examples")
@run_before("configure")
def setup_cxxstd(self):
filter_file(
r"-std=c\+\+[0-9][0-9]", f"-std=c++{self.spec.variants['cxxstd'].value}", "configure"
)
def configure_args(self):
args = []