R: ensure Makeconf has full libs directories (#48323)
This commit is contained in:
parent
0471af4c16
commit
5fd15dc541
@ -76,6 +76,10 @@ def flag_handler(self, name, flags):
|
||||
flags.append(getattr(self.compiler, f"cxx{self.spec.variants['cxxstd'].value}_flag"))
|
||||
return (None, flags, None)
|
||||
|
||||
@property
|
||||
def libs(self):
|
||||
return find_libraries("libicu*", root=self.prefix, recursive=True)
|
||||
|
||||
|
||||
class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
|
||||
|
||||
|
@ -232,6 +232,20 @@ def configure_args(self):
|
||||
|
||||
@run_after("install")
|
||||
def copy_makeconf(self):
|
||||
# Ensure full library flags are included in Makeconf
|
||||
for _lib, _pkg in [
|
||||
("lzma", "xz"),
|
||||
("bz2", "bzip2"),
|
||||
("z", "zlib-api"),
|
||||
("tirpc", "libtirpc"),
|
||||
("icuuc", "icu4c"),
|
||||
]:
|
||||
filter_file(
|
||||
f"-l{_lib}",
|
||||
f"-L{self.spec[_pkg].libs.directories[0]} -l{_lib}",
|
||||
join_path(self.etcdir, "Makeconf"),
|
||||
)
|
||||
|
||||
# Make a copy of Makeconf because it will be needed to properly build R
|
||||
# dependencies in Spack.
|
||||
src_makeconf = join_path(self.etcdir, "Makeconf")
|
||||
|
Loading…
Reference in New Issue
Block a user