summaryrefslogtreecommitdiff
path: root/databases/postgresql15-client/Makefile
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2022-10-19 13:16:45 +0000
committeradam <adam@pkgsrc.org>2022-10-19 13:16:45 +0000
commit26b127389fefffc69cbf62b33373d74319234437 (patch)
treed09dd39fe7de800b9606c17a8936e93b2686c01a /databases/postgresql15-client/Makefile
parentc33dc385cbba6dc09631b030d0ce9b22e76c923c (diff)
downloadpkgsrc-26b127389fefffc69cbf62b33373d74319234437.tar.gz
postgresql15: added version 15.0
PostgreSQL 15 contains many new features and enhancements, including: Support for the SQL MERGE command. Selective publication of tables' contents within logical replication publications, through the ability to specify column lists and row filter conditions. More options for compression, including support for Zstandard (zstd) compression. This includes support for performing compression on the server side during pg_basebackup. Support for structured server log output using the JSON format. Performance improvements, particularly for in-memory and on-disk sorting.
Diffstat (limited to 'databases/postgresql15-client/Makefile')
-rw-r--r--databases/postgresql15-client/Makefile93
1 files changed, 93 insertions, 0 deletions
diff --git a/databases/postgresql15-client/Makefile b/databases/postgresql15-client/Makefile
new file mode 100644
index 00000000000..5ab5886342e
--- /dev/null
+++ b/databases/postgresql15-client/Makefile
@@ -0,0 +1,93 @@
+# $NetBSD: Makefile,v 1.1 2022/10/19 13:16:45 adam Exp $
+
+PKGNAME= ${DISTNAME:S/-/15-client-/}
+COMMENT= PostgreSQL database client programs
+
+.include "../../databases/postgresql15/Makefile.common"
+
+USE_TOOLS+= gzip msgfmt tar
+TOOLS_BROKEN+= perl
+CONFIGURE_ARGS+= --with-openssl
+CONFIGURE_ARGS+= --with-zlib
+
+# Override INSTALL script to avoid unprivileged user/group
+# leaking into the binary package
+CONFIGURE_ARGS+= INSTALL=${INSTALL:Q}\ -c
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Cygwin"
+INSTALLATION_DIRS+= bin
+.endif
+
+# 1. The thread-safety test in ${WRSRC}/src/tools/thread does not pass on
+# NetBSD earlier than 4.0 or DragonFly.
+# 2. configure with --enable-thread-safety fails on OpenBSD.
+.if (${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 040000) || \
+ ${OPSYS} == "DragonFly" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD"
+PGSQL_THREAD_SAFETY?= no
+.endif
+PGSQL_THREAD_SAFETY?= yes
+BUILD_DEFS+= PGSQL_THREAD_SAFETY
+
+.if !empty(PGSQL_THREAD_SAFETY:M[yY][eE][sS])
+. include "../../mk/pthread.buildlink3.mk"
+. if (${PTHREAD_TYPE} == "native")
+CONFIGURE_ARGS+= --enable-thread-safety
+. endif
+.else
+CONFIGURE_ARGS+= --disable-thread-safety
+.endif
+
+BUILD_DIRS+= src/fe_utils
+INSTALL_DIRS= src/include
+INSTALL_DIRS+= src/common
+INSTALL_DIRS+= src/port
+INSTALL_DIRS+= src/interfaces
+INSTALL_DIRS+= src/bin
+BUILD_DIRS+= ${INSTALL_DIRS}
+# Without this, the Darwin build fails (related to -bundle_loader).
+BUILD_DIRS+= src/backend
+
+.for f in pg_service.conf psqlrc
+CONF_FILES+= share/postgresql/${f}.sample ${PKG_SYSCONFDIR}/${f}
+.endfor
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+
+SUBST_CLASSES+= pgxs
+SUBST_STAGE.pgxs= post-build
+SUBST_MESSAGE.pgxs= Fixing workdir tools references in pgxs Makefile
+SUBST_FILES.pgxs= src/Makefile.global
+SUBST_SED.pgxs= -e 's,${TOOLS_CMD.bison},${TOOLS_PATH.bison},'
+SUBST_SED.pgxs+= -e 's,${TOOLS_CMD.lex},${TOOLS_PATH.lex},'
+SUBST_SED.pgxs+= -e 's,${TOOLS_CMD.mkdir},${TOOLS_PATH.mkdir},'
+SUBST_SED.pgxs+= -e 's,${WRKDIR}/.wrapper/bin/ld,${LD},'
+SUBST_SED.pgxs+= -e 's,${WRKDIR}/.wrapper,${PREFIX},'
+SUBST_SED.pgxs+= -e 's,${WRKSRC},/dev/null,'
+
+INSTALLATION_DIRS+= lib/postgresql/pgxs
+INSTALLATION_DIRS+= lib/postgresql/pgxs/config
+INSTALLATION_DIRS+= lib/postgresql/pgxs/src
+INSTALLATION_DIRS+= lib/postgresql/pgxs/src/makefiles
+
+DEST_PGXS= ${DESTDIR}${PREFIX}/lib/postgresql/pgxs
+PGXS_FILES= config/install-sh
+PGXS_FILES+= src/makefiles/pgxs.mk src/Makefile.global
+PGXS_FILES+= src/Makefile.port src/Makefile.shlib
+PGXS_FILES+= src/nls-global.mk
+
+# On Solaris, avoid conflicts between "${SSLBASE}/include/openssl/des.h"
+# and "/usr/include/crypt.h" -- we want the definitions in the former.
+.if ${OPSYS} == "SunOS"
+post-wrapper:
+ touch ${BUILDLINK_DIR}/include/crypt.h
+.endif
+
+post-install:
+.for file in ${PGXS_FILES}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${DEST_PGXS}/${file}
+.endfor
+
+.include "../../mk/bsd.pkg.mk"