diff options
author | Chris Green <greenc@fnal.gov> | 2023-05-02 20:18:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 18:18:30 -0700 |
commit | c110bcc5af64a0d93200b58861a9cb65c751ffbd (patch) | |
tree | 0b80341199336283d94eaf2613e4c2db355aa59d /var/spack/repos/builtin/packages/bcache/package.py | |
parent | 4edd364a8b38ba617d86a821788c4225bc325b5b (diff) | |
download | spack-c110bcc5af64a0d93200b58861a9cb65c751ffbd.tar.gz spack-c110bcc5af64a0d93200b58861a9cb65c751ffbd.tar.bz2 spack-c110bcc5af64a0d93200b58861a9cb65c751ffbd.tar.xz spack-c110bcc5af64a0d93200b58861a9cb65c751ffbd.zip |
libintl, iconv, gettext: account for libc provider and externals (#35450)
* libiconv can be provided by libc, so update packages which depend on
libiconv to require the iconv virtual instead
* Many packages need special consideration when locating iconv depending
on whether it is provided by libc (no prefix provided) or the libiconv
package (in that case we want to provide a prefix)
* It was also noticed that when an iconv external was provided, that
there was interference with linking (this should generally be handled
by Spack's compiler wrappers and bears further investigation)
* Like iconv, libintl can be provided by libc or another package, namely
gettext. It is not converted to a provider like libiconv because it
provides additional routines. The logic is similar to that of iconv
but instead of checking the provider, we check whether the gettext
installation includes libintl.
Diffstat (limited to 'var/spack/repos/builtin/packages/bcache/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/bcache/package.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/bcache/package.py b/var/spack/repos/builtin/packages/bcache/package.py index 4f24bd9cd7..724e4dff19 100644 --- a/var/spack/repos/builtin/packages/bcache/package.py +++ b/var/spack/repos/builtin/packages/bcache/package.py @@ -24,16 +24,16 @@ class Bcache(MakefilePackage): depends_on("gettext") depends_on("pkgconfig", type="build") - def setup_build_environment(self, env): - # Add -lintl if provided by gettext, otherwise libintl is provided by the system's glibc: - if "gettext" in self.spec and "intl" in self.spec["gettext"].libs.names: - env.append_flags("LDFLAGS", "-lintl") - patch( "func_crc64.patch", sha256="558b35cadab4f410ce8f87f0766424a429ca0611aa2fd247326ad10da115737d", ) + def flag_handler(self, name, flags): + if name == "ldflags" and "intl" in self.spec["gettext"].libs.names: + flags.append("-lintl") + return self.env_flags(name, flags) + def install(self, spec, prefix): mkdirp(prefix.bin) install("bcache-register", prefix.bin) |