2019-01-01 14:04:23 +08:00
|
|
|
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2016-05-12 12:22:25 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2015-12-08 22:18:10 +08:00
|
|
|
from spack import *
|
2018-04-19 20:23:16 +08:00
|
|
|
import sys
|
2015-12-08 22:18:10 +08:00
|
|
|
|
2016-06-22 23:05:20 +08:00
|
|
|
|
2017-03-16 05:01:10 +08:00
|
|
|
class Curl(AutotoolsPackage):
|
2015-12-08 22:18:10 +08:00
|
|
|
"""cURL is an open source command line tool and library for
|
|
|
|
transferring data with URL syntax"""
|
|
|
|
|
|
|
|
homepage = "http://curl.haxx.se"
|
2017-02-18 03:52:08 +08:00
|
|
|
# URL must remain http:// so Spack can bootstrap curl
|
2018-05-21 04:04:28 +08:00
|
|
|
url = "http://curl.haxx.se/download/curl-7.60.0.tar.bz2"
|
2015-12-08 22:18:10 +08:00
|
|
|
|
2018-05-21 04:04:28 +08:00
|
|
|
version('7.60.0', 'bd2aabf78ded6a9aec8a54532fd6b5d7')
|
2018-04-18 04:33:08 +08:00
|
|
|
version('7.59.0', 'a2192804f7c2636a09320416afcf888e')
|
2017-10-07 23:58:56 +08:00
|
|
|
version('7.56.0', 'e0caf257103e0c77cee5be7e9ac66ca4')
|
2017-05-06 05:21:37 +08:00
|
|
|
version('7.54.0', '89bb7ba87384dfbf4f1a3f953da42458')
|
2017-03-16 05:01:10 +08:00
|
|
|
version('7.53.1', 'fb1f03a142236840c1a77c035fa4c542')
|
2017-01-19 00:17:50 +08:00
|
|
|
version('7.52.1', 'dd014df06ff1d12e173de86873f9f77a')
|
2016-09-20 17:13:54 +08:00
|
|
|
version('7.50.3', 'bd177fd6deecce00cfa7b5916d831c5e')
|
|
|
|
version('7.50.2', '6e161179f7af4b9f8b6ea21420132719')
|
2016-08-11 01:51:57 +08:00
|
|
|
version('7.50.1', '015f6a0217ca6f2c5442ca406476920b')
|
2016-06-22 23:05:20 +08:00
|
|
|
version('7.49.1', '6bb1f7af5b58b30e4e6414b8c1abccab')
|
2016-03-18 01:45:57 +08:00
|
|
|
version('7.47.1', '9ea3123449439bbd960cd25cf98796fb')
|
2015-12-08 22:18:10 +08:00
|
|
|
version('7.46.0', '9979f989a2a9930d10f1b3deeabc2148')
|
|
|
|
version('7.45.0', '62c1a352b28558f25ba6209214beadc8')
|
|
|
|
version('7.44.0', '6b952ca00e5473b16a11f05f06aa8dae')
|
|
|
|
version('7.43.0', '11bddbb452a8b766b932f859aaeeed39')
|
|
|
|
version('7.42.1', '296945012ce647b94083ed427c1877a8')
|
|
|
|
|
2018-04-19 20:23:16 +08:00
|
|
|
variant('nghttp2', default=False, description='build nghttp2 library (requires C++11)')
|
|
|
|
variant('libssh2', default=False, description='enable libssh2 support')
|
|
|
|
variant('libssh', default=False, description='enable libssh support') # , when='7.58:')
|
|
|
|
variant('darwinssl', default=sys.platform == 'darwin', description="use Apple's SSL/TLS implementation")
|
2018-01-04 23:45:45 +08:00
|
|
|
|
2018-04-19 20:23:16 +08:00
|
|
|
conflicts('+libssh', when='@:7.57.99')
|
|
|
|
# on OSX and --with-ssh the configure steps fails with
|
|
|
|
# one or more libs available at link-time are not available run-time
|
|
|
|
# unless the libssh are installed externally (e.g. via homebrew), even
|
|
|
|
# though spack isn't supposed to know about such a libssh installation.
|
|
|
|
# C.f. https://github.com/spack/spack/issues/7777
|
|
|
|
conflicts('platform=darwin', when='+libssh2')
|
|
|
|
conflicts('platform=darwin', when='+libssh')
|
|
|
|
conflicts('platform=linux', when='+darwinssl')
|
|
|
|
|
|
|
|
depends_on('openssl', when='~darwinssl')
|
2017-03-16 05:01:10 +08:00
|
|
|
depends_on('zlib')
|
2018-01-04 23:45:45 +08:00
|
|
|
depends_on('nghttp2', when='+nghttp2')
|
2018-03-07 01:41:22 +08:00
|
|
|
depends_on('libssh2', when='+libssh2')
|
2018-04-19 20:23:16 +08:00
|
|
|
depends_on('libssh', when='+libssh')
|
2015-12-08 22:18:10 +08:00
|
|
|
|
2017-03-16 05:01:10 +08:00
|
|
|
def configure_args(self):
|
|
|
|
spec = self.spec
|
2015-12-08 22:18:10 +08:00
|
|
|
|
2018-04-19 20:23:16 +08:00
|
|
|
args = ['--with-zlib={0}'.format(spec['zlib'].prefix)]
|
2018-04-20 01:43:12 +08:00
|
|
|
if spec.satisfies('+darwinssl'):
|
2018-04-19 20:23:16 +08:00
|
|
|
args.append('--with-darwinssl')
|
|
|
|
else:
|
|
|
|
args.append('--with-ssl={0}'.format(spec['openssl'].prefix))
|
|
|
|
|
2018-01-04 23:45:45 +08:00
|
|
|
args += self.with_or_without('nghttp2')
|
2018-03-07 01:41:22 +08:00
|
|
|
args += self.with_or_without('libssh2')
|
2018-04-19 20:23:16 +08:00
|
|
|
args += self.with_or_without('libssh')
|
2018-01-04 23:45:45 +08:00
|
|
|
return args
|