From f8f13ad8aae485836cd74057c3bd3dc232fea07d Mon Sep 17 00:00:00 2001 From: Arne Becker <101113822+EbiArnie@users.noreply.github.com> Date: Wed, 2 Oct 2024 18:08:32 +0100 Subject: postgresql: Add icu4c dependency for versions 16+ (#46691) * postgresql: Add icu4c dependency for versions 16+ * postgresql: make ICU an option * postgresql: ICU variant only needed for v16+ * postgresql: Check for negated option Check for negated option instead of negating the test Co-authored-by: Alec Scott --------- Co-authored-by: Alec Scott --- var/spack/repos/builtin/packages/postgresql/package.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/postgresql/package.py b/var/spack/repos/builtin/packages/postgresql/package.py index c2256db1a8..3dafdc5ecd 100644 --- a/var/spack/repos/builtin/packages/postgresql/package.py +++ b/var/spack/repos/builtin/packages/postgresql/package.py @@ -64,7 +64,9 @@ class Postgresql(AutotoolsPackage): variant("tcl", default=False, description="Enable Tcl bindings.") variant("gssapi", default=False, description="Build with GSSAPI functionality.") variant("xml", default=False, description="Build with XML support.") + variant("icu", default=True, description="Build with ICU support.", when="@16:") + depends_on("icu4c", when="@16: +icu") depends_on("readline", when="lineedit=readline") depends_on("libedit", when="lineedit=libedit") depends_on("openssl") @@ -103,6 +105,9 @@ class Postgresql(AutotoolsPackage): if spec.satisfies("+xml"): args.append("--with-libxml") + if spec.satisfies("~icu"): + args.append("--without-icu") + return args def install(self, spec, prefix): -- cgit v1.2.3-70-g09d2