From 3ecb84d398611749ded7376e9e9e2a786d528bad Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Fri, 5 May 2023 10:40:14 +0200 Subject: elfutils: unconditionally depend on zstd (#37368) --- .../repos/builtin/packages/elfutils/package.py | 36 ++++++++-------------- .../repos/builtin/packages/hpctoolkit/package.py | 2 +- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/elfutils/package.py b/var/spack/repos/builtin/packages/elfutils/package.py index 4cec61c36e..3070f2c3ab 100644 --- a/var/spack/repos/builtin/packages/elfutils/package.py +++ b/var/spack/repos/builtin/packages/elfutils/package.py @@ -46,11 +46,6 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): version("0.168", sha256="b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276") version("0.163", sha256="7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23") - # 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.") @@ -68,10 +63,11 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): sha256="d786d49c28d7f0c8fc27bab39ca8714e5f4d128c7f09bb18533a8ec99b38dbf8", ) - depends_on("bzip2", type="link", when="+bzip2") - depends_on("xz", type="link", when="+xz") - depends_on("zstd", type="link", when="+zstd") + depends_on("bzip2", type="link") + depends_on("xz", type="link") depends_on("zlib", type="link") + depends_on("zstd", type="link", when="@0.182:") + depends_on("gettext", when="+nls") depends_on("m4", type="build") depends_on("pkgconfig@0.9.0:", type=("build", "link")) @@ -115,22 +111,14 @@ class Elfutils(AutotoolsPackage, SourcewarePackage): def configure_args(self): spec = self.spec - args = [] - - if "+bzip2" in spec: - args.append("--with-bzlib=%s" % spec["bzip2"].prefix) - else: - args.append("--without-bzlib") - - if "+xz" in spec: - args.append("--with-lzma=%s" % spec["xz"].prefix) - 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) + args = [ + "--with-bzlib=%s" % spec["bzip2"].prefix, + "--with-lzma=%s" % spec["xz"].prefix, + "--with-zlib=%s" % spec["zlib"].prefix, + ] + + if "@0.182:" in spec: + args.append("--with-zstd=%s" % spec["zstd"].prefix) if spec.satisfies("@0.183:"): if spec["iconv"].name == "libc": diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py index d8dbb09b6e..d4eaaf482b 100644 --- a/var/spack/repos/builtin/packages/hpctoolkit/package.py +++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py @@ -120,7 +120,7 @@ class Hpctoolkit(AutotoolsPackage): depends_on("dyninst@12.1.0:", when="@2022.0:") depends_on("dyninst@10.2.0:", when="@2021.0:2021.12") depends_on("dyninst@9.3.2:", when="@:2020") - depends_on("elfutils+bzip2+xz~nls", type="link") + depends_on("elfutils~nls", type="link") depends_on("gotcha@1.0.3:", when="@:2020.09") depends_on("intel-tbb+shared") depends_on("libdwarf", when="@:2022.06") -- cgit v1.2.3-70-g09d2