curl: explicitly disable unused dependencies (#24613)

I installed curl on my mac and it picked up a homebrew (I think?)
installation of gsasl. A later system update broke git because of the
implicitly added dependency. Explicitly disabling libraries that *might*
exist on the system is the safe approach here.

```
dyld: Library not loaded: /usr/local/opt/gsasl/lib/libgsasl.7.dylib
  Referenced from: /rnsdhpc/code/spack/opt/spack/apple-clang/curl/gag5v3c/lib/libcurl.4.dylib
  Reason: image not found
error: git-remote-https died of signal 6
```
This commit is contained in:
Seth R. Johnson 2021-07-02 03:30:47 -04:00 committed by GitHub
parent f1842f363d
commit 8089b86dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,9 +3,10 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import sys
from spack import *
class Curl(AutotoolsPackage):
"""cURL is an open source command line tool and library for
@ -69,16 +70,27 @@ class Curl(AutotoolsPackage):
def configure_args(self):
spec = self.spec
args = ['--with-zlib={0}'.format(spec['zlib'].prefix)]
args.append('--with-libidn2={0}'.format(spec['libidn2'].prefix))
args = [
'--with-zlib=' + spec['zlib'].prefix,
'--with-libidn2=' + spec['libidn2'].prefix,
# Prevent unintentional linking against system libraries: we could
# add variants for these in the future
'--without-libbrotli',
'--without-libgsasl',
'--without-libmetalink',
'--without-libpsl',
'--without-zstd',
]
if spec.satisfies('+darwinssl'):
args.append('--with-darwinssl')
else:
args.append('--with-ssl={0}'.format(spec['openssl'].prefix))
args.append('--with-ssl=' + spec['openssl'].prefix)
if spec.satisfies('+gssapi'):
args.append('--with-gssapi={0}'.format(spec['krb5'].prefix))
args.append('--with-gssapi=' + spec['krb5'].prefix)
else:
args.append('--without-gssapi')
args += self.with_or_without('nghttp2')
args += self.with_or_without('libssh2')