git: b4e71c8402d0 - main - databases/postgresql??-*: Update to latest minor versions

From: Palle Girgensohn <girgen_at_FreeBSD.org>
Date: Thu, 08 Aug 2024 13:02:51 UTC
The branch main has been updated by girgen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b4e71c8402d027a49eeddb5b585b591019654bb8

commit b4e71c8402d027a49eeddb5b585b591019654bb8
Author:     Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2024-08-08 09:25:22 +0000
Commit:     Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2024-08-08 13:02:46 +0000

    databases/postgresql??-*: Update to latest minor versions
    
    The PostgreSQL Global Development Group has released an update to all
    supported versions of PostgreSQL, including 16.4, 15.8, 14.13, 13.16,
    and 12.20. This release fixes 1 security vulnerability and over 55 bugs
    reported over the last several months.
    
    PR:     279671 - make the rc script service jails aware
    PR:     279536 - remove LLVM max version restriction
    PR:     278887 - SETENV -> SETENVI for -contrib ports
    
    Release notes:  https://www.postgresql.org/docs/release/
---
 databases/postgresql12-client/Makefile            |  6 ++++++
 databases/postgresql12-contrib/Makefile           |  4 ++--
 databases/postgresql12-plperl/Makefile            |  6 +++---
 databases/postgresql12-plpython/Makefile          |  4 ++--
 databases/postgresql12-pltcl/Makefile             |  4 ++--
 databases/postgresql12-server/Makefile            |  2 +-
 databases/postgresql12-server/distinfo            |  6 +++---
 databases/postgresql12-server/files/postgresql.in |  1 +
 databases/postgresql13-client/Makefile            |  6 ++++++
 databases/postgresql13-contrib/Makefile           |  4 ++--
 databases/postgresql13-plperl/Makefile            |  6 +++---
 databases/postgresql13-plpython/Makefile          |  4 ++--
 databases/postgresql13-pltcl/Makefile             |  4 ++--
 databases/postgresql13-server/Makefile            |  2 +-
 databases/postgresql13-server/distinfo            |  6 +++---
 databases/postgresql13-server/files/postgresql.in |  1 +
 databases/postgresql14-client/Makefile            |  6 ++++++
 databases/postgresql14-contrib/Makefile           |  4 ++--
 databases/postgresql14-docs/Makefile              |  2 +-
 databases/postgresql14-plperl/Makefile            |  6 +++---
 databases/postgresql14-plpython/Makefile          |  4 ++--
 databases/postgresql14-pltcl/Makefile             |  4 ++--
 databases/postgresql14-server/Makefile            |  2 +-
 databases/postgresql14-server/distinfo            |  6 +++---
 databases/postgresql14-server/files/postgresql.in |  1 +
 databases/postgresql15-client/Makefile            |  6 ++++++
 databases/postgresql15-contrib/Makefile           |  4 ++--
 databases/postgresql15-docs/Makefile              |  2 +-
 databases/postgresql15-plperl/Makefile            |  6 +++---
 databases/postgresql15-plpython/Makefile          |  4 ++--
 databases/postgresql15-pltcl/Makefile             |  4 ++--
 databases/postgresql15-server/Makefile            |  2 +-
 databases/postgresql15-server/distinfo            |  6 +++---
 databases/postgresql15-server/files/postgresql.in |  1 +
 databases/postgresql16-client/Makefile            |  6 ++++++
 databases/postgresql16-contrib/Makefile           |  4 ++--
 databases/postgresql16-docs/Makefile              |  2 +-
 databases/postgresql16-plperl/Makefile            |  6 +++---
 databases/postgresql16-plpython/Makefile          |  4 ++--
 databases/postgresql16-pltcl/Makefile             |  4 ++--
 databases/postgresql16-server/Makefile            | 15 ++-------------
 databases/postgresql16-server/distinfo            |  6 +++---
 databases/postgresql16-server/files/postgresql.in |  1 +
 43 files changed, 104 insertions(+), 80 deletions(-)

diff --git a/databases/postgresql12-client/Makefile b/databases/postgresql12-client/Makefile
index ef76a8c6ec70..1133e4894dc5 100644
--- a/databases/postgresql12-client/Makefile
+++ b/databases/postgresql12-client/Makefile
@@ -15,4 +15,10 @@ COMPONENT=	-client
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
+OPTIONS_DEFINE+=LIBEDIT DOCS
+LIBEDIT_DESC=	Use non-GPL libedit instead of readline
+LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
+LIBEDIT_USES=	libedit
+LIBEDIT_USES_OFF=readline
+
 .include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql12-contrib/Makefile b/databases/postgresql12-contrib/Makefile
index af4be8ec800f..a59562e889f8 100644
--- a/databases/postgresql12-contrib/Makefile
+++ b/databases/postgresql12-contrib/Makefile
@@ -7,7 +7,7 @@ COMMENT=	The contrib utilities from the PostgreSQL distribution
 
 MASTERDIR=	${.CURDIR}/../postgresql12-server
 
-USES=		bison pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g}
+USES=		bison pgsql:${PORTVERSION:R}
 
 BUILD_DIRS=	src/port src/include src/common contrib
 INSTALL_DIRS=	contrib
@@ -33,7 +33,7 @@ XML_LIB_DEPENDS=libxslt.so:textproc/libxslt \
 		libxml2.so:textproc/libxml2
 
 post-configure:
-	@cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
+	@cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
 
 post-install:
 	@- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/extension/README
diff --git a/databases/postgresql12-plperl/Makefile b/databases/postgresql12-plperl/Makefile
index a92a6e1d5d82..1b9d8c7f1bbf 100644
--- a/databases/postgresql12-plperl/Makefile
+++ b/databases/postgresql12-plperl/Makefile
@@ -2,14 +2,14 @@ PORTNAME=	postgresql
 # Keep the ?=, this port is used as master by the other plperl.
 PORTREVISION?=	0
 CATEGORIES=	databases perl5
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Write SQL functions for PostgreSQL using Perl5
 
-RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER}-server
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=12
 
diff --git a/databases/postgresql12-plpython/Makefile b/databases/postgresql12-plpython/Makefile
index 39890880e032..dacc50f87f42 100644
--- a/databases/postgresql12-plpython/Makefile
+++ b/databases/postgresql12-plpython/Makefile
@@ -2,7 +2,7 @@ PORTNAME=	postgresql
 CATEGORIES=	databases python
 # Keep the ?=, it is used as master by the other plpython ports.
 PORTREVISION?=	0
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Python to write SQL functions
@@ -11,7 +11,7 @@ WWW=		https://www.postgresql.org/
 USES+=		pgsql:${WANT_PGSQL_VER} ${WANT_PYTHON_USE}
 WANT_PGSQL=	server
 
-MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=	12
 WANT_PYTHON_USE?=	python
diff --git a/databases/postgresql12-pltcl/Makefile b/databases/postgresql12-pltcl/Makefile
index 2004114427ca..25c81560e802 100644
--- a/databases/postgresql12-pltcl/Makefile
+++ b/databases/postgresql12-pltcl/Makefile
@@ -2,12 +2,12 @@ PORTNAME=	postgresql
 # Keep the ?=, it is used by the other pltcl ports.
 PORTREVISION?=	0
 CATEGORIES=	databases tcl
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Tcl to write SQL functions
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=12
 
diff --git a/databases/postgresql12-server/Makefile b/databases/postgresql12-server/Makefile
index 6ba84eb2c9c6..6256f9d500b8 100644
--- a/databases/postgresql12-server/Makefile
+++ b/databases/postgresql12-server/Makefile
@@ -1,4 +1,4 @@
-DISTVERSION?=	12.19
+DISTVERSION?=	12.20
 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
 # not their own.  Probably best to keep it at ?=0 when reset here too.
 PORTREVISION?=	0
diff --git a/databases/postgresql12-server/distinfo b/databases/postgresql12-server/distinfo
index a9c254216026..6611b9e57b17 100644
--- a/databases/postgresql12-server/distinfo
+++ b/databases/postgresql12-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715095959
-SHA256 (postgresql/postgresql-12.19.tar.bz2) = 617e3de52c22e822f4f57d01d5b2240503e198a9eccaf598a851109bd18e6fbb
-SIZE (postgresql/postgresql-12.19.tar.bz2) = 21218699
+TIMESTAMP = 1722892656
+SHA256 (postgresql/postgresql-12.20.tar.bz2) = 2d543af3009fec7fd5af35f7a70c95085d3eef6b508e517aa9493e99b15e9ea9
+SIZE (postgresql/postgresql-12.20.tar.bz2) = 21256573
diff --git a/databases/postgresql12-server/files/postgresql.in b/databases/postgresql12-server/files/postgresql.in
index 08f6faf12c55..3cf6475a9a9b 100644
--- a/databases/postgresql12-server/files/postgresql.in
+++ b/databases/postgresql12-server/files/postgresql.in
@@ -37,6 +37,7 @@ eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%"
 : ${postgresql_data:="${_pgdir}"}
 : ${postgresql_login_class:=""}
 : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"}
+: ${postgresql_svcj_options:="net_basic"}
 
 name=postgresql
 rcvar=postgresql_enable
diff --git a/databases/postgresql13-client/Makefile b/databases/postgresql13-client/Makefile
index 1958a960a653..4d4849b56ebe 100644
--- a/databases/postgresql13-client/Makefile
+++ b/databases/postgresql13-client/Makefile
@@ -15,4 +15,10 @@ COMPONENT=	-client
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
+OPTIONS_DEFINE+=LIBEDIT DOCS
+LIBEDIT_DESC=	Use non-GPL libedit instead of readline
+LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
+LIBEDIT_USES=	libedit
+LIBEDIT_USES_OFF=readline
+
 .include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql13-contrib/Makefile b/databases/postgresql13-contrib/Makefile
index 4a03a65926a4..ad8a568951ee 100644
--- a/databases/postgresql13-contrib/Makefile
+++ b/databases/postgresql13-contrib/Makefile
@@ -7,7 +7,7 @@ COMMENT=	The contrib utilities from the PostgreSQL distribution
 
 MASTERDIR=	${.CURDIR}/../postgresql13-server
 
-USES=		bison pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g}
+USES=		bison pgsql:${PORTVERSION:R}
 
 BUILD_DIRS=	src/port src/include src/common contrib
 INSTALL_DIRS=	contrib
@@ -33,7 +33,7 @@ XML_LIB_DEPENDS=libxslt.so:textproc/libxslt \
 		libxml2.so:textproc/libxml2
 
 post-configure:
-	@cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
+	@cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
 
 post-install:
 	@- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/extension/README
diff --git a/databases/postgresql13-plperl/Makefile b/databases/postgresql13-plperl/Makefile
index 0fbc8e295468..24f81e37fd45 100644
--- a/databases/postgresql13-plperl/Makefile
+++ b/databases/postgresql13-plperl/Makefile
@@ -2,14 +2,14 @@ PORTNAME=	postgresql
 # Keep the ?=, this port is used as master by the other plperl.
 PORTREVISION?=	0
 CATEGORIES=	databases perl5
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Write SQL functions for PostgreSQL using Perl5
 
-RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER}-server
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=13
 
diff --git a/databases/postgresql13-plpython/Makefile b/databases/postgresql13-plpython/Makefile
index f0b547833a63..d5ea59e84622 100644
--- a/databases/postgresql13-plpython/Makefile
+++ b/databases/postgresql13-plpython/Makefile
@@ -2,7 +2,7 @@ PORTNAME=	postgresql
 CATEGORIES=	databases python
 # Keep the ?=, it is used as master by the other plpython ports.
 PORTREVISION?=	0
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Python to write SQL functions
@@ -11,7 +11,7 @@ WWW=		https://www.postgresql.org/
 USES+=		pgsql:${WANT_PGSQL_VER} ${WANT_PYTHON_USE}
 WANT_PGSQL=	server
 
-MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=	13
 WANT_PYTHON_USE?=	python
diff --git a/databases/postgresql13-pltcl/Makefile b/databases/postgresql13-pltcl/Makefile
index a91e161e41b4..82e49bd5554f 100644
--- a/databases/postgresql13-pltcl/Makefile
+++ b/databases/postgresql13-pltcl/Makefile
@@ -2,12 +2,12 @@ PORTNAME=	postgresql
 # Keep the ?=, it is used by the other pltcl ports.
 PORTREVISION?=	0
 CATEGORIES=	databases tcl
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Tcl to write SQL functions
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=13
 
diff --git a/databases/postgresql13-server/Makefile b/databases/postgresql13-server/Makefile
index 1ff3d0035045..844eac64f852 100644
--- a/databases/postgresql13-server/Makefile
+++ b/databases/postgresql13-server/Makefile
@@ -1,4 +1,4 @@
-DISTVERSION?=	13.15
+DISTVERSION?=	13.16
 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
 # not their own.  Probably best to keep it at ?=0 when reset here too.
 PORTREVISION?=	0
diff --git a/databases/postgresql13-server/distinfo b/databases/postgresql13-server/distinfo
index 7bed84f9d7ba..7bffa271dab4 100644
--- a/databases/postgresql13-server/distinfo
+++ b/databases/postgresql13-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715095960
-SHA256 (postgresql/postgresql-13.15.tar.bz2) = 42edd415446d33b8c242be76d1ad057531b2264b2e86939339b7075c6e4ec925
-SIZE (postgresql/postgresql-13.15.tar.bz2) = 21597871
+TIMESTAMP = 1722892657
+SHA256 (postgresql/postgresql-13.16.tar.bz2) = c9cbbb6129f02328204828066bb3785c00a85c8ca8fd329c2a8a53c1f5cd8865
+SIZE (postgresql/postgresql-13.16.tar.bz2) = 21639411
diff --git a/databases/postgresql13-server/files/postgresql.in b/databases/postgresql13-server/files/postgresql.in
index 08f6faf12c55..3cf6475a9a9b 100644
--- a/databases/postgresql13-server/files/postgresql.in
+++ b/databases/postgresql13-server/files/postgresql.in
@@ -37,6 +37,7 @@ eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%"
 : ${postgresql_data:="${_pgdir}"}
 : ${postgresql_login_class:=""}
 : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"}
+: ${postgresql_svcj_options:="net_basic"}
 
 name=postgresql
 rcvar=postgresql_enable
diff --git a/databases/postgresql14-client/Makefile b/databases/postgresql14-client/Makefile
index 28d80a5e2858..965e37834a6d 100644
--- a/databases/postgresql14-client/Makefile
+++ b/databases/postgresql14-client/Makefile
@@ -15,4 +15,10 @@ COMPONENT=	-client
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
+OPTIONS_DEFINE+=LIBEDIT DOCS
+LIBEDIT_DESC=	Use non-GPL libedit instead of readline
+LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
+LIBEDIT_USES=	libedit
+LIBEDIT_USES_OFF=readline
+
 .include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql14-contrib/Makefile b/databases/postgresql14-contrib/Makefile
index 5c4e80059c55..e60bf88b53b4 100644
--- a/databases/postgresql14-contrib/Makefile
+++ b/databases/postgresql14-contrib/Makefile
@@ -7,7 +7,7 @@ COMMENT=	The contrib utilities from the PostgreSQL distribution
 
 MASTERDIR=	${.CURDIR}/../postgresql14-server
 
-USES=		bison pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g}
+USES=		bison pgsql:${PORTVERSION:R}
 
 BUILD_DIRS=	src/port src/include src/common contrib
 INSTALL_DIRS=	contrib
@@ -33,7 +33,7 @@ XML_LIB_DEPENDS=libxslt.so:textproc/libxslt \
 		libxml2.so:textproc/libxml2
 
 post-configure:
-	@cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
+	@cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
 
 post-install:
 	@- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/extension/README
diff --git a/databases/postgresql14-docs/Makefile b/databases/postgresql14-docs/Makefile
index ced0a182a749..b1543fa51ad2 100644
--- a/databases/postgresql14-docs/Makefile
+++ b/databases/postgresql14-docs/Makefile
@@ -5,7 +5,7 @@ PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S,.,,}-docs
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	The PostgreSQL documentation set
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 WANT_PGSQL_VER?=14
 
 DISTV=		${DISTVERSION:R}
diff --git a/databases/postgresql14-plperl/Makefile b/databases/postgresql14-plperl/Makefile
index 6eb771999a68..3cb6e894c99e 100644
--- a/databases/postgresql14-plperl/Makefile
+++ b/databases/postgresql14-plperl/Makefile
@@ -2,14 +2,14 @@ PORTNAME=	postgresql
 # Keep the ?=, this port is used as master by the other plperl.
 PORTREVISION?=	0
 CATEGORIES=	databases perl5
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Write SQL functions for PostgreSQL using Perl5
 
-RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER}-server
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=14
 
diff --git a/databases/postgresql14-plpython/Makefile b/databases/postgresql14-plpython/Makefile
index 44d70613b9b7..47c468226bdc 100644
--- a/databases/postgresql14-plpython/Makefile
+++ b/databases/postgresql14-plpython/Makefile
@@ -2,7 +2,7 @@ PORTNAME=	postgresql
 CATEGORIES=	databases python
 # Keep the ?=, it is used as master by the other plpython ports.
 PORTREVISION?=	0
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Python to write SQL functions
@@ -11,7 +11,7 @@ WWW=		https://www.postgresql.org/
 USES+=		pgsql:${WANT_PGSQL_VER} ${WANT_PYTHON_USE}
 WANT_PGSQL=	server
 
-MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=	14
 WANT_PYTHON_USE?=	python
diff --git a/databases/postgresql14-pltcl/Makefile b/databases/postgresql14-pltcl/Makefile
index fe4078b0fe21..d7468f28f0ca 100644
--- a/databases/postgresql14-pltcl/Makefile
+++ b/databases/postgresql14-pltcl/Makefile
@@ -2,12 +2,12 @@ PORTNAME=	postgresql
 # Keep the ?=, it is used by the other pltcl ports.
 PORTREVISION?=	0
 CATEGORIES=	databases tcl
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Tcl to write SQL functions
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=14
 
diff --git a/databases/postgresql14-server/Makefile b/databases/postgresql14-server/Makefile
index 6dc8a6c17b13..1c4bfcbf70fe 100644
--- a/databases/postgresql14-server/Makefile
+++ b/databases/postgresql14-server/Makefile
@@ -1,4 +1,4 @@
-DISTVERSION?=	14.12
+DISTVERSION?=	14.13
 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
 # not their own.  Probably best to keep it at ?=0 when reset here too.
 PORTREVISION?=	0
diff --git a/databases/postgresql14-server/distinfo b/databases/postgresql14-server/distinfo
index 97f5e287f4d5..1b18f55021c2 100644
--- a/databases/postgresql14-server/distinfo
+++ b/databases/postgresql14-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715095961
-SHA256 (postgresql/postgresql-14.12.tar.bz2) = 6118d08f9ddcc1bd83cf2b7cc74d3b583bdcec2f37e6245a8ac003b8faa80923
-SIZE (postgresql/postgresql-14.12.tar.bz2) = 22390865
+TIMESTAMP = 1722892658
+SHA256 (postgresql/postgresql-14.13.tar.bz2) = 59aa3c4b495ab26a9ec69f3ad0a0228c51f0fe6facf3634dfad4d1197d613a56
+SIZE (postgresql/postgresql-14.13.tar.bz2) = 22414381
diff --git a/databases/postgresql14-server/files/postgresql.in b/databases/postgresql14-server/files/postgresql.in
index 08f6faf12c55..3cf6475a9a9b 100644
--- a/databases/postgresql14-server/files/postgresql.in
+++ b/databases/postgresql14-server/files/postgresql.in
@@ -37,6 +37,7 @@ eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%"
 : ${postgresql_data:="${_pgdir}"}
 : ${postgresql_login_class:=""}
 : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"}
+: ${postgresql_svcj_options:="net_basic"}
 
 name=postgresql
 rcvar=postgresql_enable
diff --git a/databases/postgresql15-client/Makefile b/databases/postgresql15-client/Makefile
index 7c66f707ba1d..dc5fd4c3da8e 100644
--- a/databases/postgresql15-client/Makefile
+++ b/databases/postgresql15-client/Makefile
@@ -15,4 +15,10 @@ COMPONENT=	-client
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
+OPTIONS_DEFINE+=LIBEDIT DOCS
+LIBEDIT_DESC=	Use non-GPL libedit instead of readline
+LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
+LIBEDIT_USES=	libedit
+LIBEDIT_USES_OFF=readline
+
 .include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql15-contrib/Makefile b/databases/postgresql15-contrib/Makefile
index 4db178d55483..8d8803e14f03 100644
--- a/databases/postgresql15-contrib/Makefile
+++ b/databases/postgresql15-contrib/Makefile
@@ -7,7 +7,7 @@ COMMENT=	The contrib utilities from the PostgreSQL distribution
 
 MASTERDIR=	${.CURDIR}/../postgresql15-server
 
-USES=		bison pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g}
+USES=		bison pgsql:${PORTVERSION:R}
 
 BUILD_DIRS=	src/port src/include src/common contrib
 INSTALL_DIRS=	contrib
@@ -33,7 +33,7 @@ XML_LIB_DEPENDS=libxslt.so:textproc/libxslt \
 		libxml2.so:textproc/libxml2
 
 post-configure:
-	@cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
+	@cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} symlinks
 
 post-install:
 	@- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/extension/README
diff --git a/databases/postgresql15-docs/Makefile b/databases/postgresql15-docs/Makefile
index 3946e7890607..f3019986cf6c 100644
--- a/databases/postgresql15-docs/Makefile
+++ b/databases/postgresql15-docs/Makefile
@@ -5,7 +5,7 @@ PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S,.,,}-docs
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	The PostgreSQL documentation set
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 WANT_PGSQL_VER?=15
 
 DISTV=		${DISTVERSION:R}
diff --git a/databases/postgresql15-plperl/Makefile b/databases/postgresql15-plperl/Makefile
index f6e703bde82d..996289b0b187 100644
--- a/databases/postgresql15-plperl/Makefile
+++ b/databases/postgresql15-plperl/Makefile
@@ -2,14 +2,14 @@ PORTNAME=	postgresql
 # Keep the ?=, this port is used as master by the other plperl.
 PORTREVISION?=	0
 CATEGORIES=	databases perl5
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Write SQL functions for PostgreSQL using Perl5
 
-RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER}-server
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=15
 
diff --git a/databases/postgresql15-plpython/Makefile b/databases/postgresql15-plpython/Makefile
index 838960cf4f27..5545b860c18b 100644
--- a/databases/postgresql15-plpython/Makefile
+++ b/databases/postgresql15-plpython/Makefile
@@ -2,7 +2,7 @@ PORTNAME=	postgresql
 CATEGORIES=	databases python
 # Keep the ?=, it is used as master by the other plpython ports.
 PORTREVISION?=	0
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Python to write SQL functions
@@ -11,7 +11,7 @@ WWW=		https://www.postgresql.org/
 USES+=		pgsql:${WANT_PGSQL_VER} ${WANT_PYTHON_USE}
 WANT_PGSQL=	server
 
-MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=	15
 WANT_PYTHON_USE?=	python
diff --git a/databases/postgresql15-pltcl/Makefile b/databases/postgresql15-pltcl/Makefile
index d62ee99fdc36..497032f0d07b 100644
--- a/databases/postgresql15-pltcl/Makefile
+++ b/databases/postgresql15-pltcl/Makefile
@@ -2,12 +2,12 @@ PORTNAME=	postgresql
 # Keep the ?=, it is used by the other pltcl ports.
 PORTREVISION?=	0
 CATEGORIES=	databases tcl
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Tcl to write SQL functions
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=15
 
diff --git a/databases/postgresql15-server/Makefile b/databases/postgresql15-server/Makefile
index ad7d23054e86..ac4c753660f0 100644
--- a/databases/postgresql15-server/Makefile
+++ b/databases/postgresql15-server/Makefile
@@ -1,4 +1,4 @@
-DISTVERSION?=	15.7
+DISTVERSION?=	15.8
 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
 # not their own.  Probably best to keep it at ?=0 when reset here too.
 PORTREVISION?=	0
diff --git a/databases/postgresql15-server/distinfo b/databases/postgresql15-server/distinfo
index 845cdd374469..cad7dae9f7de 100644
--- a/databases/postgresql15-server/distinfo
+++ b/databases/postgresql15-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715095962
-SHA256 (postgresql/postgresql-15.7.tar.bz2) = a46fe49485ab6385e39dabbbb654f5d3049206f76cd695e224268729520998f7
-SIZE (postgresql/postgresql-15.7.tar.bz2) = 23112318
+TIMESTAMP = 1722892659
+SHA256 (postgresql/postgresql-15.8.tar.bz2) = 4403515f9a69eeb3efebc98f30b8c696122bfdf895e92b3b23f5b8e769edcb6a
+SIZE (postgresql/postgresql-15.8.tar.bz2) = 23119460
diff --git a/databases/postgresql15-server/files/postgresql.in b/databases/postgresql15-server/files/postgresql.in
index 08f6faf12c55..3cf6475a9a9b 100644
--- a/databases/postgresql15-server/files/postgresql.in
+++ b/databases/postgresql15-server/files/postgresql.in
@@ -37,6 +37,7 @@ eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%"
 : ${postgresql_data:="${_pgdir}"}
 : ${postgresql_login_class:=""}
 : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"}
+: ${postgresql_svcj_options:="net_basic"}
 
 name=postgresql
 rcvar=postgresql_enable
diff --git a/databases/postgresql16-client/Makefile b/databases/postgresql16-client/Makefile
index f610a9931796..7c4351eb7245 100644
--- a/databases/postgresql16-client/Makefile
+++ b/databases/postgresql16-client/Makefile
@@ -15,4 +15,10 @@ COMPONENT=	-client
 USE_LDCONFIG=	yes
 USES=		pkgconfig
 
+OPTIONS_DEFINE+=LIBEDIT DOCS
+LIBEDIT_DESC=	Use non-GPL libedit instead of readline
+LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
+LIBEDIT_USES=	libedit
+LIBEDIT_USES_OFF=readline
+
 .include "${MASTERDIR}/Makefile"
diff --git a/databases/postgresql16-contrib/Makefile b/databases/postgresql16-contrib/Makefile
index cc85d3203809..cd8376580200 100644
--- a/databases/postgresql16-contrib/Makefile
+++ b/databases/postgresql16-contrib/Makefile
@@ -7,7 +7,7 @@ COMMENT=	The contrib utilities from the PostgreSQL distribution
 
 MASTERDIR=	${.CURDIR}/../postgresql16-server
 
-USES=		bison pgsql:${DISTVERSION:C/([0-9]\.?[0-9]).*/\1/g}
+USES=		bison pgsql:${PORTVERSION:R}
 
 BUILD_DIRS=	src/port src/include src/common contrib
 INSTALL_DIRS=	contrib
@@ -33,7 +33,7 @@ XML_LIB_DEPENDS=libxslt.so:textproc/libxslt \
 		libxml2.so:textproc/libxml2
 
 post-configure:
-	@cd ${WRKSRC}/src/backend && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} generated-headers
+	@cd ${WRKSRC}/src/backend && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${MAKE_CMD} generated-headers
 
 post-install:
 	@- ${INSTALL_DATA} ${WRKSRC}/contrib/README ${STAGEDIR}${DOCSDIR}/extension/README
diff --git a/databases/postgresql16-docs/Makefile b/databases/postgresql16-docs/Makefile
index 5b17a6c2acb8..f82101032848 100644
--- a/databases/postgresql16-docs/Makefile
+++ b/databases/postgresql16-docs/Makefile
@@ -5,7 +5,7 @@ PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S,.,,}-docs
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	The PostgreSQL documentation set
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 WANT_PGSQL_VER?=16
 
 DISTV=		${DISTVERSION:R}
diff --git a/databases/postgresql16-plperl/Makefile b/databases/postgresql16-plperl/Makefile
index 0e1cd98fb533..11fb616ea16c 100644
--- a/databases/postgresql16-plperl/Makefile
+++ b/databases/postgresql16-plperl/Makefile
@@ -2,14 +2,14 @@ PORTNAME=	postgresql
 # Keep the ?=, this port is used as master by the other plperl.
 PORTREVISION?=	0
 CATEGORIES=	databases perl5
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Write SQL functions for PostgreSQL using Perl5
 
-RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+RUN_DEPENDS=	postgres:databases/postgresql${WANT_PGSQL_VER}-server
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=16
 
diff --git a/databases/postgresql16-plpython/Makefile b/databases/postgresql16-plpython/Makefile
index 55bb8de1ab4e..5f68bc60a927 100644
--- a/databases/postgresql16-plpython/Makefile
+++ b/databases/postgresql16-plpython/Makefile
@@ -2,7 +2,7 @@ PORTNAME=	postgresql
 CATEGORIES=	databases python
 # Keep the ?=, it is used as master by the other plpython ports.
 PORTREVISION?=	0
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Python to write SQL functions
@@ -11,7 +11,7 @@ WWW=		https://www.postgresql.org/
 USES+=		pgsql:${WANT_PGSQL_VER} ${WANT_PYTHON_USE}
 WANT_PGSQL=	server
 
-MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=	16
 WANT_PYTHON_USE?=	python
diff --git a/databases/postgresql16-pltcl/Makefile b/databases/postgresql16-pltcl/Makefile
index 05ae8083d026..e0c84196b3c5 100644
--- a/databases/postgresql16-pltcl/Makefile
+++ b/databases/postgresql16-pltcl/Makefile
@@ -2,12 +2,12 @@ PORTNAME=	postgresql
 # Keep the ?=, it is used by the other pltcl ports.
 PORTREVISION?=	0
 CATEGORIES=	databases tcl
-PKGNAMESUFFIX?=	${WANT_PGSQL_VER:S/.//}${COMPONENT}
+PKGNAMESUFFIX?=	${WANT_PGSQL_VER}${COMPONENT}
 
 MAINTAINER=	pgsql@FreeBSD.org
 COMMENT=	Module for using Tcl to write SQL functions
 
-MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER:S/.//}-server
+MASTERDIR=	${.CURDIR}/../../databases/postgresql${WANT_PGSQL_VER}-server
 
 WANT_PGSQL_VER?=16
 
diff --git a/databases/postgresql16-server/Makefile b/databases/postgresql16-server/Makefile
index c73f0d255be9..13bf3276257e 100644
--- a/databases/postgresql16-server/Makefile
+++ b/databases/postgresql16-server/Makefile
@@ -1,5 +1,5 @@
 PORTNAME?=	postgresql
-DISTVERSION?=	16.3
+DISTVERSION?=	16.4
 # PORTREVISION must be ?= otherwise, all slave ports get this PORTREVISION and
 # not their own.  Probably best to keep it at ?=0 when reset here too.
 PORTREVISION?=	0
@@ -72,13 +72,8 @@ SUB_FILES+=	502.pgsql
 
 OPTIONS_SUB=	yes
 
-.if defined(CLIENT_ONLY)
-OPTIONS_DEFINE+=LIBEDIT DOCS
-LIBEDIT_DESC=	Use non-GPL libedit instead of readline
-.else
 MAKE_ENV+=	PATH=${PREFIX}/bin:${PATH}
 CONFIGURE_ENV+=	PATH=${PREFIX}/bin:${PATH}
-.endif
 
 .if defined(SERVER_ONLY)
 OPTIONS_DEFINE=	DTRACE LDAP TZDATA XML DOCS
@@ -112,7 +107,7 @@ LLVM_DESC=		Build with support for JIT-compiling expressions
 LLVM_CONFIGURE_WITH=	llvm
 LLVM_CONFIGURE_ENV=	LLVM_CONFIG=${LLVM_CONFIG} \
 			CLANG=${LOCALBASE}/bin/clang${LLVM_VERSION}
-LLVM_USES=		llvm:max=15,min=11,lib
+LLVM_USES=		llvm:min=11,lib
 
 CONFIGURE_ARGS+=	--with-icu
 LIB_DEPENDS+=		libicudata.so:devel/icu
@@ -140,12 +135,6 @@ OPTIONS_DEFAULT+=	SSL
 GSSAPI_CONFIGURE_WITH=	gssapi
 .endif # !SLAVE_ONLY
 
-.if defined(CLIENT_ONLY)
-LIBEDIT_CONFIGURE_ON+=--with-libedit-preferred
-LIBEDIT_USES=		libedit
-LIBEDIT_USES_OFF=	readline
-.endif # CLIENT_ONLY
-
 SSL_USES=		ssl
 SSL_CONFIGURE_WITH=	openssl
 
diff --git a/databases/postgresql16-server/distinfo b/databases/postgresql16-server/distinfo
index a5b9b692f324..04974993010a 100644
--- a/databases/postgresql16-server/distinfo
+++ b/databases/postgresql16-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1715095963
-SHA256 (postgresql/postgresql-16.3.tar.bz2) = 331963d5d3dc4caf4216a049fa40b66d6bcb8c730615859411b9518764e60585
-SIZE (postgresql/postgresql-16.3.tar.bz2) = 24737644
+TIMESTAMP = 1722892660
+SHA256 (postgresql/postgresql-16.4.tar.bz2) = 971766d645aa73e93b9ef4e3be44201b4f45b5477095b049125403f9f3386d6f
+SIZE (postgresql/postgresql-16.4.tar.bz2) = 24765786
diff --git a/databases/postgresql16-server/files/postgresql.in b/databases/postgresql16-server/files/postgresql.in
index 08f6faf12c55..3cf6475a9a9b 100644
--- a/databases/postgresql16-server/files/postgresql.in
+++ b/databases/postgresql16-server/files/postgresql.in
@@ -37,6 +37,7 @@ eval _pgdir="~${postgresql_user}/data%%PG_VERSION%%"
 : ${postgresql_data:="${_pgdir}"}
 : ${postgresql_login_class:=""}
 : ${postgresql_initdb_flags:="--encoding=utf-8 --lc-collate=C"}
+: ${postgresql_svcj_options:="net_basic"}
 
 name=postgresql
 rcvar=postgresql_enable