krb5: Fix spack install krb5 ^openssl~shared (#40306)
This commit is contained in:
parent
fe6860e0d7
commit
86d2200523
1 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,7 @@ class Krb5(AutotoolsPackage):
|
|||
depends_on("openssl")
|
||||
depends_on("gettext")
|
||||
depends_on("findutils", type="build")
|
||||
depends_on("pkgconfig", type="build", when="^openssl~shared")
|
||||
|
||||
variant(
|
||||
"shared", default=True, description="install shared libraries if True, static if false"
|
||||
|
@ -80,6 +81,11 @@ def configure_args(self):
|
|||
if "%gcc@10:" in self.spec:
|
||||
args.append("CFLAGS=-fcommon")
|
||||
|
||||
if self.spec["openssl"].satisfies("~shared"):
|
||||
pkgconf = which("pkg-config")
|
||||
ssllibs = pkgconf("--static", "--libs", "openssl", output=str)
|
||||
args.append(f"LDFLAGS={ssllibs}")
|
||||
|
||||
return args
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
|
|
Loading…
Reference in a new issue