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 <hi@alecbcs.com>

---------

Co-authored-by: Alec Scott <hi@alecbcs.com>
This commit is contained in:
Arne Becker 2024-10-02 18:08:32 +01:00 committed by GitHub
parent fcf72201d3
commit f8f13ad8aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -64,7 +64,9 @@ class Postgresql(AutotoolsPackage):
variant("tcl", default=False, description="Enable Tcl bindings.") variant("tcl", default=False, description="Enable Tcl bindings.")
variant("gssapi", default=False, description="Build with GSSAPI functionality.") variant("gssapi", default=False, description="Build with GSSAPI functionality.")
variant("xml", default=False, description="Build with XML support.") 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("readline", when="lineedit=readline")
depends_on("libedit", when="lineedit=libedit") depends_on("libedit", when="lineedit=libedit")
depends_on("openssl") depends_on("openssl")
@ -103,6 +105,9 @@ def configure_args(self):
if spec.satisfies("+xml"): if spec.satisfies("+xml"):
args.append("--with-libxml") args.append("--with-libxml")
if spec.satisfies("~icu"):
args.append("--without-icu")
return args return args
def install(self, spec, prefix): def install(self, spec, prefix):