From 5e8368d0c9580a4a3e0a759953507b9ced07c713 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Mon, 15 Nov 2021 04:08:48 -0600 Subject: libint: fix build (#27426) - use project autogen.sh script - set boost path - make sure to build the compiler before the library --- var/spack/repos/builtin/packages/libint/package.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/libint/package.py b/var/spack/repos/builtin/packages/libint/package.py index 8f6ecfec17..d44eaa44fe 100644 --- a/var/spack/repos/builtin/packages/libint/package.py +++ b/var/spack/repos/builtin/packages/libint/package.py @@ -74,9 +74,7 @@ class Libint(AutotoolsPackage): return "{0}/v{1}.tar.gz".format(base_url, version) def autoreconf(self, spec, prefix): - libtoolize() - aclocal('-I', 'lib/autoconf') - autoconf() + which('bash')('autogen.sh') if '@2.6.0:' in spec: # skip tarball creation and removal of dir with generated code @@ -104,7 +102,10 @@ class Libint(AutotoolsPackage): def configure_args(self): - config_args = ['--enable-shared'] + config_args = [ + '--enable-shared', + '--with-boost={0}'.format(self.spec['boost'].prefix) + ] # Optimization flag names have changed in libint 2 if self.version < Version('2.0.0'): @@ -185,16 +186,18 @@ class Libint(AutotoolsPackage): packages (CP2K notably). """ - super(Libint, self).build(spec, prefix) - # upstream says that using configure/make for the generated code # is deprecated and one should use CMake, but with the currently # recent 2.7.0.b1 it still doesn't work + # first generate the libint compiler + make('export') + # now build the library with working_dir(os.path.join(self.build_directory, 'generated')): # straight from the AutotoolsPackage class: config_args = [ '--prefix={0}'.format(prefix), '--enable-shared', + '--with-boost={0}'.format(self.spec['boost'].prefix), '--with-cxx-optflags={0}'.format(self.optflags), ] config_args += self.enable_or_disable( -- cgit v1.2.3-70-g09d2