fastjet: Adding thread safety variant (#41830)

* Adding variant for limited thread safety

* Exposing also full thread safety

* Package file reformatted

* Using Multi-valued variant
This commit is contained in:
Juraj Smiesko 2024-01-10 19:58:23 +01:00 committed by GitHub
parent e9cc6d4016
commit e05d47a85f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,6 +61,14 @@ class Fastjet(AutotoolsPackage):
variant("shared", default=True, description="Builds a shared version of the library") variant("shared", default=True, description="Builds a shared version of the library")
variant("auto-ptr", default=False, description="Use auto_ptr") variant("auto-ptr", default=False, description="Use auto_ptr")
variant(
"thread-safety",
default="limited",
values=("none", "limited", "full"),
multi=False,
when="@3.4.0:",
description="Enables thread safety",
)
variant("atlas", default=False, description="Patch to make random generator thread_local") variant("atlas", default=False, description="Patch to make random generator thread_local")
patch("atlas.patch", when="@:3.3 +atlas", level=0) patch("atlas.patch", when="@:3.3 +atlas", level=0)
@ -75,5 +83,9 @@ def configure_args(self):
extra_args = ["--enable-allplugins"] extra_args = ["--enable-allplugins"]
extra_args += self.enable_or_disable("shared") extra_args += self.enable_or_disable("shared")
extra_args += self.enable_or_disable("auto-ptr") extra_args += self.enable_or_disable("auto-ptr")
if self.spec.variants["thread-safety"].value == "limited":
extra_args += ["--enable-limited-thread-safety"]
if self.spec.variants["thread-safety"].value == "full":
extra_args += ["--enable-thread-safety"]
return extra_args return extra_args