diff options
author | alalazo <massimiliano.culpo@googlemail.com> | 2016-02-01 08:33:03 +0100 |
---|---|---|
committer | alalazo <massimiliano.culpo@googlemail.com> | 2016-02-01 08:33:03 +0100 |
commit | 360abb070a639711f740aa7ef73a84ab76aff14f (patch) | |
tree | c369c1cb7d37a07e7fc61ec4f19bde1b678209fc /var | |
parent | cd547939138c00a45a2252f073ce21d3742d5dd0 (diff) | |
download | spack-360abb070a639711f740aa7ef73a84ab76aff14f.tar.gz spack-360abb070a639711f740aa7ef73a84ab76aff14f.tar.bz2 spack-360abb070a639711f740aa7ef73a84ab76aff14f.tar.xz spack-360abb070a639711f740aa7ef73a84ab76aff14f.zip |
netcdf : fixed typo in configure option
openssl : smarter URL computation
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/netcdf/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/openssl/package.py | 28 |
2 files changed, 27 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf/package.py b/var/spack/repos/builtin/packages/netcdf/package.py index 579282e7f7..89b40f4a90 100644 --- a/var/spack/repos/builtin/packages/netcdf/package.py +++ b/var/spack/repos/builtin/packages/netcdf/package.py @@ -1,5 +1,6 @@ from spack import * + class Netcdf(Package): """NetCDF is a set of software libraries and self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented @@ -44,7 +45,7 @@ class Netcdf(Package): ] if '+mpi' in spec: - config_args.append('--enable-parallel') + config_args.append('--enable-parallel4') CPPFLAGS.append("-I%s/include" % spec['hdf5'].prefix) LDFLAGS.append( "-L%s/lib" % spec['hdf5'].prefix) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 3b790eca66..345fce0669 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -1,3 +1,5 @@ +import urllib + from spack import * class Openssl(Package): @@ -9,9 +11,10 @@ class Openssl(Package): homepage = "http://www.openssl.org" url = "http://www.openssl.org/source/openssl-1.0.1h.tar.gz" - version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') # Not available - version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') # Not available - version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') # Not available + version('1.0.1h', '8d6d684a9430d5cc98a62a5d8fbda8cf') + version('1.0.1r', '1abd905e079542ccae948af37e393d28') + version('1.0.2d', '38dd619b2e77cbac69b99f52a053d25a') + version('1.0.2e', '5262bfa25b60ed9de9f28d5d52d77fc5') version('1.0.2f', 'b3bf73f507172be9292ea2a8c28b659d') depends_on("zlib") @@ -39,3 +42,22 @@ class Openssl(Package): make() make("install") + + def url_for_version(self, version): + # This URL is computed pinging the place where the latest version is stored. To avoid slowdown + # due to repeated pinging, we store the URL in a private attribute + openssl_url = getattr(self, '_openssl_url', None) + + if openssl_url is None: + latest = 'http://www.openssl.org/source/openssl-{version}.tar.gz' + older = 'http://www.openssl.org/source/old/{version_number}/openssl-{version_full}.tar.gz' + # Try to use the url where the latest tarballs are stored. If the url does not exist (404), then + # return the url for older format + version_number = '.'.join([str(x) for x in version[:-1]]) + older_url = older.format(version_number=version_number, version_full=version) + latest_url = latest.format(version=version) + response = urllib.urlopen(latest.format(version=version)) + openssl_url = older_url if response.getcode() == 404 else latest_url + self._openssl_url = openssl_url + + return openssl_url |