Add zstd support for elfutils (#33695)
* Add zstd support for elfutils Not defining `+zstd` implies `--without-zstd` flag to configure. This avoids automatic library detection and thus make the build only depends on Spack installed dependencies. * Use autotools helper "with_or_without" * Revert use of with_or_without Using `with_or_without()` with `variant` keyword does not seem to work.
This commit is contained in:
parent
1a3415619e
commit
23eb2dc9d6
@ -47,6 +47,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
|
||||
# Libraries for reading compressed DWARF sections.
|
||||
variant("bzip2", default=False, description="Support bzip2 compressed sections.")
|
||||
variant("xz", default=False, description="Support xz (lzma) compressed sections.")
|
||||
variant("zstd", default=False, description="Support zstd compressed sections.", when="@0.182:")
|
||||
|
||||
# Native language support from libintl.
|
||||
variant("nls", default=True, description="Enable Native Language Support.")
|
||||
@ -70,6 +71,7 @@ class Elfutils(AutotoolsPackage, SourcewarePackage):
|
||||
|
||||
depends_on("bzip2", type="link", when="+bzip2")
|
||||
depends_on("xz", type="link", when="+xz")
|
||||
depends_on("zstd", type="link", when="+zstd")
|
||||
depends_on("zlib", type="link")
|
||||
depends_on("gettext", when="+nls")
|
||||
depends_on("m4", type="build")
|
||||
@ -115,6 +117,8 @@ def configure_args(self):
|
||||
else:
|
||||
args.append("--without-lzma")
|
||||
|
||||
args.extend(self.with_or_without("zstd", activation_value="prefix"))
|
||||
|
||||
# zlib is required
|
||||
args.append("--with-zlib=%s" % spec["zlib"].prefix)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user