cp2k: fix dependency libraries (#28128)

* fixing build issues in cp2k dependencies

* fixing style issues

* reverting elpa.prefix.lib and grammer correction

* addressing the suggestions
This commit is contained in:
AMD Toolchain Support 2022-01-03 21:02:26 +05:30 committed by GitHub
parent c85c725b08
commit 6f95296972
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -486,7 +486,7 @@ def edit(self, spec, prefix):
# Currently AOCC support only static libraries of ELPA
if '%aocc' in spec:
libs.append(join_path(elpa.libs.directories[0],
libs.append(join_path(elpa.prefix.lib,
('libelpa{elpa_suffix}.a'
.format(elpa_suffix=elpa_suffix))))
else:

View File

@ -74,7 +74,13 @@ def url_for_version(self, version):
return "{0}/v{1}.tar.gz".format(base_url, version)
def autoreconf(self, spec, prefix):
which('bash')('autogen.sh')
if self.spec.satisfies("@2:"):
which('bash')('autogen.sh')
else:
# Fall back since autogen is not available
libtoolize()
aclocal('-I', 'lib/autoconf')
autoconf()
if '@2.6.0:' in spec:
# skip tarball creation and removal of dir with generated code
@ -103,10 +109,15 @@ def setup_build_environment(self, env):
def configure_args(self):
config_args = [
'--enable-shared',
'--with-boost={0}'.format(self.spec['boost'].prefix)
'--enable-shared'
]
if self.spec.satisfies("@2:"):
# --with-boost option available only from version 2 and above
config_args.extend([
'--with-boost={0}'.format(self.spec['boost'].prefix)
])
# Optimization flag names have changed in libint 2
if self.version < Version('2.0.0'):
config_args.extend([