summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2022-04-19 17:26:33 +0200
committerGitHub <noreply@github.com>2022-04-19 09:26:33 -0600
commita4f32dbf8d3ed3a28692caa09a00560096452168 (patch)
tree36742d02146bc3eee48d2962e37821b568df1e8a /var
parent823b982ee1db75e17b581744b4d001cdc6705f0b (diff)
downloadspack-a4f32dbf8d3ed3a28692caa09a00560096452168.tar.gz
spack-a4f32dbf8d3ed3a28692caa09a00560096452168.tar.bz2
spack-a4f32dbf8d3ed3a28692caa09a00560096452168.tar.xz
spack-a4f32dbf8d3ed3a28692caa09a00560096452168.zip
netcdf-c: prevent overlinking to a system installation of libcurl (#28537)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/netcdf-c/package.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py
index 6876be9b8f..bd3508ac0b 100644
--- a/var/spack/repos/builtin/packages/netcdf-c/package.py
+++ b/var/spack/repos/builtin/packages/netcdf-c/package.py
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
+
from spack import *
@@ -17,7 +19,7 @@ class NetcdfC(AutotoolsPackage):
maintainers = ['skosukhin', 'WardF']
- version('master', branch='master')
+ version('main', branch='main')
version('4.8.1', sha256='bc018cc30d5da402622bf76462480664c6668b55eb16ba205a0dfb8647161dd0')
version('4.8.0', sha256='aff58f02b1c3e91dc68f989746f652fe51ff39e6270764e484920cb8db5ad092')
version('4.7.4', sha256='99930ad7b3c4c1a8e8831fb061cb02b2170fc8e5ccaeda733bd99c3b9d31666b')
@@ -78,9 +80,9 @@ class NetcdfC(AutotoolsPackage):
# description='Enable CDM Remote support')
# The patch for 4.7.0 touches configure.ac. See force_autoreconf below.
- depends_on('autoconf', type='build', when='@4.7.0')
- depends_on('automake', type='build', when='@4.7.0')
- depends_on('libtool', type='build', when='@4.7.0')
+ depends_on('autoconf', type='build', when='@4.7.0,main')
+ depends_on('automake', type='build', when='@4.7.0,main')
+ depends_on('libtool', type='build', when='@4.7.0,main')
depends_on("m4", type='build')
depends_on("hdf~netcdf", when='+hdf4')
@@ -131,6 +133,11 @@ class NetcdfC(AutotoolsPackage):
# The patch for 4.7.0 touches configure.ac.
return self.spec.satisfies('@4.7.0')
+ @when('@4.6.3:')
+ def autoreconf(self, spec, prefix):
+ if not os.path.exists(self.configure_abs_path):
+ Executable('./bootstrap')()
+
def configure_args(self):
cflags = []
cppflags = []
@@ -170,6 +177,9 @@ class NetcdfC(AutotoolsPackage):
ldflags.append(curl_libs.search_flags)
# TODO: figure out how to get correct flags via headers.cpp_flags
cppflags.append('-I' + curl.prefix.include)
+ elif self.spec.satisfies('@4.8.0:'):
+ # Prevent overlinking to a system installation of libcurl:
+ config_args.append('ac_cv_lib_curl_curl_easy_setopt=no')
if self.spec.satisfies('@4.4:'):
if '+mpi' in self.spec: