Parallel-netcdf: update package. (#15359)
* Parallel-netcdf: update package. * Add a temporary patch for version 'develop'. * Rename version 'develop' to 'master'. * Drop the patch for 'master'.
This commit is contained in:
parent
21634e805e
commit
7118e24664
@ -0,0 +1,69 @@
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -11745,6 +11745,8 @@ _LT_EOF
|
||||
whole_archive_flag_spec=
|
||||
tmp_sharedflag='--shared' ;;
|
||||
nagfor*) # NAGFOR 5.3
|
||||
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
+ compiler_needs_object=yes
|
||||
tmp_sharedflag='-Wl,-shared' ;;
|
||||
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
|
||||
tmp_sharedflag='-qmkshrobj'
|
||||
@@ -21030,6 +21032,8 @@ _LT_EOF
|
||||
whole_archive_flag_spec_F77=
|
||||
tmp_sharedflag='--shared' ;;
|
||||
nagfor*) # NAGFOR 5.3
|
||||
+ whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
+ compiler_needs_object_F77=yes
|
||||
tmp_sharedflag='-Wl,-shared' ;;
|
||||
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
|
||||
tmp_sharedflag='-qmkshrobj'
|
||||
@@ -24765,6 +24769,8 @@ _LT_EOF
|
||||
whole_archive_flag_spec_FC=
|
||||
tmp_sharedflag='--shared' ;;
|
||||
nagfor*) # NAGFOR 5.3
|
||||
+ whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
|
||||
+ compiler_needs_object_FC=yes
|
||||
tmp_sharedflag='-Wl,-shared' ;;
|
||||
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
|
||||
tmp_sharedflag='-qmkshrobj'
|
||||
--- a/scripts/ltmain.sh
|
||||
+++ b/scripts/ltmain.sh
|
||||
@@ -7862,6 +7862,13 @@ func_mode_link ()
|
||||
# Convert "-framework foo" to "foo.ltframework"
|
||||
if test -n "$inherited_linker_flags"; then
|
||||
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
|
||||
+
|
||||
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
|
||||
+ func_cc_basename $CC
|
||||
+ case $func_cc_basename_result in
|
||||
+ nagfor*) tmp_inherited_linker_flags=`$ECHO "$tmp_inherited_linker_flags" | $SED 's/ -pthread/ -Wl,-pthread/g'` ;;
|
||||
+ esac
|
||||
+
|
||||
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
|
||||
case " $new_inherited_linker_flags " in
|
||||
*" $tmp_inherited_linker_flag "*) ;;
|
||||
@@ -8881,7 +8888,8 @@ func_mode_link ()
|
||||
xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
|
||||
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
|
||||
# On Darwin other compilers
|
||||
- case $CC in
|
||||
+ func_cc_basename $CC
|
||||
+ case $func_cc_basename_result in
|
||||
nagfor*)
|
||||
verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
|
||||
;;
|
||||
@@ -9493,6 +9501,13 @@ EOF
|
||||
;;
|
||||
esac
|
||||
|
||||
+ # Time to revert the changes made for nagfor.
|
||||
+ func_cc_basename $CC
|
||||
+ case $func_cc_basename_result in
|
||||
+ nagfor*)
|
||||
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% -Wl,-pthread% -pthread%g'` ;;
|
||||
+ esac
|
||||
+
|
||||
# move library search paths that coincide with paths to not yet
|
||||
# installed libraries to the beginning of the library search list
|
||||
new_libs=
|
@ -25,7 +25,6 @@ def url_for_version(self, version):
|
||||
|
||||
return url.format(version.dotted)
|
||||
|
||||
version('develop', branch='develop')
|
||||
version('master', branch='master')
|
||||
version('1.12.1', sha256='56f5afaa0ddc256791c405719b6436a83b92dcd5be37fe860dea103aee8250a2')
|
||||
version('1.11.2', sha256='d2c18601b364c35b5acb0a0b46cd6e14cae456e0eb854e5c789cf65f3cd6a2a7')
|
||||
@ -42,41 +41,74 @@ def url_for_version(self, version):
|
||||
variant('fortran', default=True, description='Build the Fortran Interface')
|
||||
variant('pic', default=True,
|
||||
description='Produce position-independent code (for shared libs)')
|
||||
variant('shared', default=True, description='Enable shared library')
|
||||
|
||||
depends_on('mpi')
|
||||
|
||||
depends_on('m4', type='build')
|
||||
depends_on('autoconf', when='@master', type='build')
|
||||
depends_on('automake', when='@master', type='build')
|
||||
depends_on('libtool', when='@master', type='build')
|
||||
|
||||
conflicts('+shared', when='@:1.9%nag+fortran')
|
||||
conflicts('+shared', when='@:1.8')
|
||||
|
||||
patch('nag_libtool.patch', when='@1.9:1.12.1%nag')
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
libraries = ['libpnetcdf']
|
||||
|
||||
query_parameters = self.spec.last_query.extra_parameters
|
||||
|
||||
if 'shared' in query_parameters:
|
||||
shared = True
|
||||
elif 'static' in query_parameters:
|
||||
shared = False
|
||||
else:
|
||||
shared = '+shared' in self.spec
|
||||
|
||||
libs = find_libraries(
|
||||
libraries, root=self.prefix, shared=shared, recursive=True
|
||||
)
|
||||
|
||||
if libs:
|
||||
return libs
|
||||
|
||||
msg = 'Unable to recursively locate {0} {1} libraries in {2}'
|
||||
raise spack.error.NoLibrariesError(
|
||||
msg.format('shared' if shared else 'static',
|
||||
self.spec.name,
|
||||
self.spec.prefix))
|
||||
|
||||
@when('@master')
|
||||
def autoreconf(self, spec, prefix):
|
||||
with working_dir(self.configure_directory):
|
||||
# We do not specify '-f' because we need to use libtool files from
|
||||
# the repository.
|
||||
autoreconf('-iv')
|
||||
|
||||
# See:
|
||||
# https://trac.mcs.anl.gov/projects/parallel-netcdf/browser/trunk/INSTALL
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
args = ['--with-mpi=%s' % self.spec['mpi'].prefix,
|
||||
'SEQ_CC=%s' % spack_cc]
|
||||
|
||||
args = ['--with-mpi={0}'.format(spec['mpi'].prefix)]
|
||||
args.append('MPICC={0}'.format(spec['mpi'].mpicc))
|
||||
args.append('MPICXX={0}'.format(spec['mpi'].mpicxx))
|
||||
args.append('MPIF77={0}'.format(spec['mpi'].mpifc))
|
||||
args.append('MPIF90={0}'.format(spec['mpi'].mpifc))
|
||||
args.append('SEQ_CC={0}'.format(spack_cc))
|
||||
args += self.enable_or_disable('cxx')
|
||||
args += self.enable_or_disable('fortran')
|
||||
|
||||
if '+pic' in spec:
|
||||
args.extend([
|
||||
'CFLAGS={0}'.format(self.compiler.pic_flag),
|
||||
'CXXFLAGS={0}'.format(self.compiler.pic_flag),
|
||||
'FFLAGS={0}'.format(self.compiler.pic_flag)
|
||||
])
|
||||
if '+pic' in self.spec:
|
||||
args.extend(['{0}FLAGS={1}'.format(lang, self.compiler.pic_flag)
|
||||
for lang in ['C', 'CXX', 'F', 'FC']])
|
||||
|
||||
if '~cxx' in spec:
|
||||
args.append('--disable-cxx')
|
||||
|
||||
if '~fortran' in spec:
|
||||
args.append('--disable-fortran')
|
||||
|
||||
if spec.satisfies('@1.8.0:'):
|
||||
if self.version >= Version('1.8'):
|
||||
args.append('--enable-relax-coord-bound')
|
||||
|
||||
return args
|
||||
if self.version >= Version('1.9'):
|
||||
args += self.enable_or_disable('shared')
|
||||
args.extend(['--enable-static',
|
||||
'--disable-silent-rules'])
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Installation fails in parallel
|
||||
make('install', parallel=False)
|
||||
if self.spec.satisfies('%nag+fortran+shared'):
|
||||
args.extend(['ac_cv_prog_fc_v=-Wl,-v',
|
||||
'ac_cv_prog_f77_v=-Wl,-v'])
|
||||
|
||||
return args
|
||||
|
Loading…
Reference in New Issue
Block a user