Allow git to compile against static curl (#37960)

This commit is contained in:
Alex Richert 2023-09-13 19:03:06 -04:00 committed by GitHub
parent e2f2559a5a
commit 75e9742d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,14 @@ def setup_build_environment(self, env):
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):