diff options
author | Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> | 2023-09-13 19:03:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-13 16:03:06 -0700 |
commit | 75e9742d7122cb5578faa7af9bb53cfb6d3efb92 (patch) | |
tree | befc8c609d12cd40c319d4d40c6051202627faf6 | |
parent | e2f2559a5a4ee3fe7898d44642810e48313b0bf7 (diff) | |
download | spack-75e9742d7122cb5578faa7af9bb53cfb6d3efb92.tar.gz spack-75e9742d7122cb5578faa7af9bb53cfb6d3efb92.tar.bz2 spack-75e9742d7122cb5578faa7af9bb53cfb6d3efb92.tar.xz spack-75e9742d7122cb5578faa7af9bb53cfb6d3efb92.zip |
Allow git to compile against static curl (#37960)
-rw-r--r-- | var/spack/repos/builtin/packages/git/package.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 715319cf74..b0984f52c1 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -256,7 +256,14 @@ class Git(AutotoolsPackage): if not is_system_path(spec["gettext"].prefix): env.append_flags("CFLAGS", spec["gettext"].headers.include_flags) - if "~perl" in spec: + if not self.spec["curl"].satisfies("libs=shared"): + curlconfig = which(os.path.join(self.spec["curl"].prefix.bin, "curl-config")) + # For configure step: + env.append_flags("LIBS", curlconfig("--static-libs", output=str).strip()) + # For build step: + env.append_flags("EXTLIBS", curlconfig("--static-libs", output=str).strip()) + + if "~perl" in self.spec: env.append_flags("NO_PERL", "1") def configure_args(self): |