hwloc: replace 'shared' variant with 'libs' (#32093)

* hwloc: replace 'shared' variant with 'libs'
* PEP-8
* Fix gpi-space
This commit is contained in:
iarspider 2022-09-27 13:53:57 +02:00 committed by GitHub
parent 43ceff4193
commit 9f271fa388
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -58,7 +58,7 @@ class GpiSpace(CMakePackage):
"+atomic +chrono +coroutine +context +date_time +filesystem +iostreams"
" +program_options +random +regex +serialization +test +timer cxxstd=14"
)
depends_on("hwloc@1.10: +libudev ~shared ~libxml2")
depends_on("hwloc@1.10: +libudev ~libxml2 libs=static")
depends_on("libssh2@1.7:")
depends_on("openssl@0.9:")
depends_on("gpi-2@1.3.2:1.3.3 fabrics=infiniband", when="network=infiniband")

View file

@ -74,7 +74,13 @@ class Hwloc(AutotoolsPackage):
default=(sys.platform != "darwin"),
description="Support analyzing devices on PCI bus",
)
variant("shared", default=True, description="Build shared libraries")
variant(
"libs",
default="shared,static",
values=("shared", "static"),
multi=True,
description="Build shared libs, static libs or both",
)
variant(
"cairo", default=False, description="Enable the Cairo back-end of hwloc's lstopo command"
)
@ -178,7 +184,7 @@ def configure_args(self):
args.extend(self.enable_or_disable("libxml2"))
args.extend(self.enable_or_disable("libudev"))
args.extend(self.enable_or_disable("pci"))
args.extend(self.enable_or_disable("shared"))
args.extend(self.enable_or_disable("libs"))
if "+cuda" in self.spec:
args.append("--with-cuda={0}".format(self.spec["cuda"].prefix))