hdf5: fix libtool files (#17009)
This commit is contained in:
		| @@ -243,7 +243,19 @@ def configure_args(self): | ||||
|             extra_args.append('--with-default-api-version=' + api) | ||||
| 
 | ||||
|         if '+szip' in self.spec: | ||||
|             extra_args.append('--with-szlib=%s' % self.spec['szip'].prefix) | ||||
|             szip_spec = self.spec['szip'] | ||||
|             # The configure script of HDF5 accepts a comma-separated tuple of | ||||
|             # two paths: the first one points to the directory with include | ||||
|             # files, the second one points to the directory with library files. | ||||
|             # If the second path is not specified, the configure script assumes | ||||
|             # that it equals to prefix/lib. However, the correct directory | ||||
|             # might be prefix/lib64. It is not a problem when the building is | ||||
|             # done with Spack's compiler wrapper but it makes the Libtool | ||||
|             # files (*.la) invalid, which makes it problematic to use the | ||||
|             # installed library outside of Spack environment. | ||||
|             extra_args.append('--with-szlib=%s,%s' % | ||||
|                               (szip_spec.headers.directories[0], | ||||
|                                szip_spec.libs.directories[0])) | ||||
|         else: | ||||
|             extra_args.append('--without-szlib') | ||||
| 
 | ||||
|   | ||||
| @@ -22,3 +22,26 @@ class Libaec(CMakePackage): | ||||
|     version('1.0.2', sha256='b9e5bbbc8bf9cbfd3b9b4ce38b3311f2c88d3d99f476edb35590eb0006aa1fc5') | ||||
|     version('1.0.1', sha256='3668eb4ed36724441e488a7aadc197426afef4b1e8bd139af6d3e36023906459') | ||||
|     version('1.0.0', sha256='849f08b08ddaaffe543d06d0ced5e4ee3e526b13a67c5f422d126b1c9cf1b546') | ||||
| 
 | ||||
|     @property | ||||
|     def libs(self): | ||||
|         query = self.spec.last_query | ||||
| 
 | ||||
|         libraries = ['libaec'] | ||||
| 
 | ||||
|         if 'szip' == query.name or 'szip' in query.extra_parameters: | ||||
|             libraries.insert(0, 'libsz') | ||||
| 
 | ||||
|         shared = 'static' not in query.extra_parameters | ||||
| 
 | ||||
|         libs = find_libraries( | ||||
|             libraries, root=self.prefix, shared=shared, recursive=True | ||||
|         ) | ||||
| 
 | ||||
|         if not 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)) | ||||
|         return libs | ||||
|   | ||||
| @@ -24,6 +24,22 @@ class Libszip(AutotoolsPackage): | ||||
|     version('2.1.1', sha256='21ee958b4f2d4be2c9cabfa5e1a94877043609ce86fde5f286f105f7ff84d412') | ||||
|     version('2.1',   sha256='a816d95d5662e8279625abdbea7d0e62157d7d1f028020b1075500bf483ed5ef') | ||||
| 
 | ||||
|     @property | ||||
|     def libs(self): | ||||
|         shared = 'static' not in self.spec.last_query.extra_parameters | ||||
| 
 | ||||
|         libs = find_libraries( | ||||
|             'libsz', root=self.prefix, shared=shared, recursive=True | ||||
|         ) | ||||
| 
 | ||||
|         if not 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)) | ||||
|         return libs | ||||
| 
 | ||||
|     def configure_args(self): | ||||
|         return [ | ||||
|             '--enable-production', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sergey Kosukhin
					Sergey Kosukhin