gmp: Add cxx variant, and require it in libint package (#34881)

This commit is contained in:
Mosè Giordano 2023-01-12 18:22:56 +00:00 committed by GitHub
parent d260fa59c9
commit 57e9e77475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,7 @@ class Gmp(AutotoolsPackage, GNUMirrorPackage):
multi=True, multi=True,
description="Build shared libs, static libs or both", description="Build shared libs, static libs or both",
) )
variant("cxx", default=True, description="Enable C++ support")
# gmp's configure script seems to be broken; it sometimes misdetects # gmp's configure script seems to be broken; it sometimes misdetects
# shared library support. Regenerating it fixes the issue. # shared library support. Regenerating it fixes the issue.
@ -51,7 +52,7 @@ def flag_handler(self, name, flags):
return (flags, None, None) return (flags, None, None)
def configure_args(self): def configure_args(self):
args = ["--enable-cxx"] args = self.enable_or_disable("cxx")
args += self.enable_or_disable("libs") args += self.enable_or_disable("libs")
if "libs=static" in self.spec: if "libs=static" in self.spec:
args.append("--with-pic") args.append("--with-pic")

View File

@ -66,7 +66,7 @@ class Libint(AutotoolsPackage):
# Libint 2 dependencies # Libint 2 dependencies
# Fixme: Can maintainers please confirm that this is a required dependency # Fixme: Can maintainers please confirm that this is a required dependency
depends_on(Boost.with_default_variants, when="@2:") depends_on(Boost.with_default_variants, when="@2:")
depends_on("gmp", when="@2:") depends_on("gmp+cxx", when="@2:")
for tvariant in TUNE_VARIANTS[1:]: for tvariant in TUNE_VARIANTS[1:]:
conflicts( conflicts(