diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2023-01-12 16:41:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 16:41:31 +0100 |
commit | ffae0db11574d953f4512e7ce274c2eab3ce0dde (patch) | |
tree | bb99622c434e4069634231732c41c71e1f0c179a | |
parent | 37c8ebcafde77801e1d6013012344e0d7e36ef19 (diff) | |
download | spack-ffae0db11574d953f4512e7ce274c2eab3ce0dde.tar.gz spack-ffae0db11574d953f4512e7ce274c2eab3ce0dde.tar.bz2 spack-ffae0db11574d953f4512e7ce274c2eab3ce0dde.tar.xz spack-ffae0db11574d953f4512e7ce274c2eab3ce0dde.zip |
Add dummy perl+open variant, use it in external find, require it in libxcrypt (#34867)
-rw-r--r-- | var/spack/repos/builtin/packages/libxcrypt/package.py | 15 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/perl/package.py | 13 |
2 files changed, 20 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/libxcrypt/package.py b/var/spack/repos/builtin/packages/libxcrypt/package.py index 2e2ef94c65..fbb2db83e7 100644 --- a/var/spack/repos/builtin/packages/libxcrypt/package.py +++ b/var/spack/repos/builtin/packages/libxcrypt/package.py @@ -32,6 +32,15 @@ class Libxcrypt(AutotoolsPackage): patch("truncating-conversion.patch", when="@4.4.30") + with when("@:4.4.17"): + depends_on("autoconf", type="build") + depends_on("automake@1.14:", type="build") + depends_on("libtool", type="build") + depends_on("m4", type="build") + + # Some distros have incomplete perl installs, +open catches that. + depends_on("perl@5.14.0: +open", type="build", when="@4.4.18:") + def configure_args(self): args = [ # Disable test dependency on Python (Python itself depends on libxcrypt). @@ -45,9 +54,3 @@ class Libxcrypt(AutotoolsPackage): @property def libs(self): return find_libraries("libcrypt", root=self.prefix, recursive=True) - - with when("@:4.4.17"): - depends_on("autoconf", type="build") - depends_on("automake@1.14:", type="build") - depends_on("libtool", type="build") - depends_on("m4", type="build") diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index cca48bf2cf..14ce904e85 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -159,10 +159,9 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package # having it in core increases the "energy of activation" for doing # things cleanly. variant("cpanm", default=True, description="Optionally install cpanm with the core packages.") - variant("shared", default=True, description="Build a shared libperl.so library") - variant("threads", default=True, description="Build perl with threads support") + variant("open", default=True, description="Support open.pm") resource( name="cpanm", @@ -211,6 +210,16 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package variants += "+cpanm" else: variants += "~cpanm" + # this is just to detect incomplete installs + # normally perl installs open.pm + perl( + "-e", + "use open OUT => qw(:raw)", + output=os.devnull, + error=os.devnull, + fail_on_error=False, + ) + variants += "+open" if perl.returncode == 0 else "~open" return variants # On a lustre filesystem, patch may fail when files |