diff options
| author | adam <adam@pkgsrc.org> | 2021-10-08 10:23:43 +0000 |
|---|---|---|
| committer | adam <adam@pkgsrc.org> | 2021-10-08 10:23:43 +0000 |
| commit | c868e780391043399005235901bbc7b355c5caca (patch) | |
| tree | f62c30bfd18f64e34e11728d6a445b9d88aac829 /databases/postgresql14 | |
| parent | 110c0fa80f5775ec5aad39b54fac2f1a247685f4 (diff) | |
| download | pkgsrc-c868e780391043399005235901bbc7b355c5caca.tar.gz | |
postgresql14: added version 14.0
PostgreSQL 14 contains many new features and enhancements, including:
Stored procedures can now return data via OUT parameters.
The SQL-standard SEARCH and CYCLE options for common table expressions have been implemented.
Subscripting can now be applied to any data type for which it is a useful notation, not only arrays. In this release, the jsonb and hstore types have gained subscripting operators.
Range types have been extended by adding multiranges, allowing representation of noncontiguous data ranges.
Numerous performance improvements have been made for parallel queries, heavily-concurrent workloads, partitioned tables, logical replication, and vacuuming.
B-tree index updates are managed more efficiently, reducing index bloat.
VACUUM automatically becomes more aggressive, and skips inessential cleanup, if the database starts to approach a transaction ID wraparound condition.
Extended statistics can now be collected on expressions, allowing better planning results for complex queries.
libpq now has the ability to pipeline multiple queries, which can boost throughput over high-latency connections.
Diffstat (limited to 'databases/postgresql14')
18 files changed, 530 insertions, 0 deletions
diff --git a/databases/postgresql14/DESCR b/databases/postgresql14/DESCR new file mode 100644 index 00000000000..9f6b5b5b0f9 --- /dev/null +++ b/databases/postgresql14/DESCR @@ -0,0 +1,9 @@ +PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS), +derived from the Berkeley Postgres database management system. While +PostgreSQL retains the powerful object-relational data model, rich data types +and easy extensibility of Postgres, it replaces the PostQuel query language +with an extended subset of SQL. + +PostgreSQL is free and the complete source is available. + +This is the meta-package for the PostgreSQL database system. diff --git a/databases/postgresql14/Makefile b/databases/postgresql14/Makefile new file mode 100644 index 00000000000..9fb24d813de --- /dev/null +++ b/databases/postgresql14/Makefile @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2021/10/08 10:23:43 adam Exp $ + +PKGNAME= ${DISTNAME:S/-/14-/} +COMMENT= Robust, next generation, object-relational DBMS + +DEPENDS+= postgresql14-client>=${PKGVERSION_NOREV}:../../databases/postgresql14-client +DEPENDS+= postgresql14-docs>=${PKGVERSION_NOREV}:../../databases/postgresql14-docs +DEPENDS+= postgresql14-server>=${PKGVERSION_NOREV}:../../databases/postgresql14-server + +META_PACKAGE= yes + +.include "Makefile.common" + +.include "../../mk/bsd.pkg.mk" diff --git a/databases/postgresql14/Makefile.common b/databases/postgresql14/Makefile.common new file mode 100644 index 00000000000..a2ea5df0864 --- /dev/null +++ b/databases/postgresql14/Makefile.common @@ -0,0 +1,138 @@ +# $NetBSD: Makefile.common,v 1.1 2021/10/08 10:23:43 adam Exp $ +# +# This Makefile fragment is included by all PostgreSQL packages built from +# the main sources of the PostgreSQL distribution except jdbc-postgresql. +# +# The PostgreSQL package naming scheme, aside from the obvious piecewise +# packages, is as follows: +# <lang>-postgresql client-side interface to PostgreSQL +# postgresql-<lang> server-side module for PostgreSQL backend +# +# used by databases/postgresql14-client/Makefile +# used by databases/postgresql14-contrib/Makefile +# used by databases/postgresql14-docs/Makefile +# used by databases/postgresql14-plperl/Makefile +# used by databases/postgresql14-plpython/Makefile +# used by databases/postgresql14-pltcl/Makefile +# used by databases/postgresql14-server/Makefile + +DISTNAME= postgresql-14.0 +CATEGORIES= databases +MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER?= adam@NetBSD.org +HOMEPAGE= https://www.postgresql.org/ +LICENSE= postgresql-license + +CONFLICTS+= postgresql-[0-9]* +CONFLICTS+= postgresql[2-9][0-9]-[0-9]* + +.if !empty(PKGNAME:M*-*-*) +module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//} +CONFLICTS+= postgresql[2-9][0-9]-${module}-[0-9]* +.endif + +DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql14/distinfo +PATCHDIR?= ${.CURDIR}/../../databases/postgresql14/patches + +USE_PKGLOCALEDIR= yes +USE_TOOLS+= bison gmake lex +PKG_SYSCONFSUBDIR= postgresql + +.include "../../mk/bsd.prefs.mk" + +PG_TEMPLATE.SunOS= solaris +PG_TEMPLATE.IRIX= irix5 +PG_TEMPLATE.MirBSD= openbsd +PG_TEMPLATE.DragonFly= freebsd +.if !defined(PG_TEMPLATE.${OPSYS}) +PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} +.endif + +PG_DATA_DIR= ${PREFIX}/share/postgresql +PG_DOC_DIR= ${PREFIX}/share/doc/postgresql +PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale +PG_ETC_DIR= ${PKG_SYSCONFDIR} + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} +CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} +CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR} +CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} +CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} + +CONFIGURE_ARGS+= --with-libxml +CONFIGURE_ARGS+= --with-readline +CONFIGURE_ARGS+= --without-perl +CONFIGURE_ARGS+= --without-python +CONFIGURE_ARGS+= --without-tcl + +# avoid pointing to a wrapper +CONFIGURE_ENV+= MSGFMT=${TOOLS_PATH.msgfmt} + +# sys/ucred.h shouldn't be included on Solaris, causes conflicts between +# procfs and largefile. +CONFIGURE_ENV.SunOS+= ac_cv_header_sys_ucred_h=no + +# pkgsrc silently filters the --as-needed linker arg, but that makes +# it leak into the pgxs Makefiles and compromises manual building +# against PostgreSQL files installed. Disable it here to prevent +# that from happening. +.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" +CONFIGURE_ENV+= pgac_cv_prog_cc_ldflags__Wl___as_needed=no +.endif + +# Postgres on Alpha has no spinlock or memory barrier implementation +# and is "unlikely to work correctly". +# https://www.postgresql.org/message-id/E1X0yaj-000753-N6%40gemulon.postgresql.org +BROKEN_ON_PLATFORM+= *-*-alpha + +.if ${MACHINE_ARCH} == "sparc" +CFLAGS.NetBSD+= -D__sparc_v8__ +.endif + +# configure fails on OpenBSD and MirBSD if thread safety is enabled. +CONFIGURE_ARGS.MirBSD+= --disable-thread-safety +CONFIGURE_ARGS.OpenBSD+= --disable-thread-safety + +# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block. +# This also limits the size of a tuple. The valid values are powers +# of 2 up to 32768, and the default size is 8196. Please don't change +# this value unless you know what you are doing. +BUILD_DEFS+= PGSQL_BLCKSZ +.if defined(PGSQL_BLCKSZ) +CONFIGURE_ARGS+= --with-blocksize=${PGSQL_BLCKSZ} +.endif + +# UUID support for contrib/uuid-ossp +# It has to be defined here, because it affects Makefile.global +.if ${OPSYS:M*BSD} +CONFIGURE_ARGS+= --with-uuid=bsd +.elif ${OPSYS} == "Darwin" || ${OPSYS} == "Linux" +CONFIGURE_ARGS+= --with-uuid=e2fs +.include "../../devel/libuuid/buildlink3.mk" +.elif ${OPSYS} == "SunOS" +CONFIGURE_ARGS+= --with-uuid=ossp +.include "../../devel/ossp-uuid/buildlink3.mk" +.endif + +# PostgreSQL explicitly forbids any use of -ffast-math +BUILDLINK_TRANSFORM+= rm:-ffast-math + +.include "../../devel/zlib/buildlink3.mk" +.include "../../textproc/libxml2/buildlink3.mk" + +.include "../../mk/readline.buildlink3.mk" +.if ${READLINE_TYPE} == "editline" +CONFIGURE_ARGS+= --with-libedit-preferred +.endif + +.if !defined(META_PACKAGE) +post-extract: + ${TOUCH} ${WRKSRC}/src/template/dragonfly + ${CP} ${WRKSRC}/src/makefiles/Makefile.freebsd \ + ${WRKSRC}/src/makefiles/Makefile.dragonfly +.endif + +.include "../../databases/postgresql14/options.mk" diff --git a/databases/postgresql14/PLIST b/databases/postgresql14/PLIST new file mode 100644 index 00000000000..55a5743bdc5 --- /dev/null +++ b/databases/postgresql14/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2021/10/08 10:23:43 adam Exp $ +@comment this plist intentionally left empty diff --git a/databases/postgresql14/distinfo b/databases/postgresql14/distinfo new file mode 100644 index 00000000000..ee04ea5e01c --- /dev/null +++ b/databases/postgresql14/distinfo @@ -0,0 +1,18 @@ +$NetBSD: distinfo,v 1.1 2021/10/08 10:23:43 adam Exp $ + +SHA1 (postgresql-14.0.tar.bz2) = 23c3ed1f42d2c439316fa978923fef469a8c379d +RMD160 (postgresql-14.0.tar.bz2) = 4765f3847c874c62b7d3ecc1fc046f9fb14a5c68 +SHA512 (postgresql-14.0.tar.bz2) = d0b5ea1bb63847a137216074f2ac2d1410723c61c279624b3034af4a130fe0e1b6d89a549c61065f025c3505af89bcd9728b04575fde2c932fa718813d2e9635 +Size (postgresql-14.0.tar.bz2) = 21836842 bytes +SHA1 (patch-config_missing) = c2d7d742922ba6861e7660c75b7b53f09e564813 +SHA1 (patch-config_perl.m4) = b3393d0f28e97f89ae20297d85553c508b3896bb +SHA1 (patch-configure) = 142ba9dc85a2408802e4b9e4943b775312d577c9 +SHA1 (patch-contrib_dblink_dblink.c) = a6f87ab9f2c28a72608d70267b71bd77437b0921 +SHA1 (patch-contrib_uuid-ossp_Makefile) = 65e975c16f2604a44961ce0ef80be28f13b798c3 +SHA1 (patch-src_Makefile.global.in) = 9690bd0e4e967dbb0f83376a9c9848e34efed74c +SHA1 (patch-src_Makefile.shlib) = 3bcdbd0d9e3c0609743e72c3cafb83b74c0e412f +SHA1 (patch-src_backend_Makefile) = 736ff7db09faf167c6e40a45a1099836f3e98911 +SHA1 (patch-src_interfaces_libpq_Makefile) = 61bcf84eb69b6ec9faabab0b61913766f4b20f8c +SHA1 (patch-src_makefiles_Makefile.solaris) = 10bf43bee54a6a1b6086c1652076544b05bf0192 +SHA1 (patch-src_pl_plperl_GNUmakefile) = 161a8f7af61b3a33b255fdee9fa7d4918decde7d +SHA1 (patch-src_pl_plperl_plperl.h) = 4ea16bbb0f9f98a609e67ceb858f22cc77be89ae diff --git a/databases/postgresql14/options.mk b/databases/postgresql14/options.mk new file mode 100644 index 00000000000..85c5f90d46e --- /dev/null +++ b/databases/postgresql14/options.mk @@ -0,0 +1,71 @@ +# $NetBSD: options.mk,v 1.1 2021/10/08 10:23:43 adam Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql14 +PKG_SUPPORTED_OPTIONS= bonjour dtrace icu llvm gssapi ldap nls pam +PKG_SUGGESTED_OPTIONS= gssapi nls + +PLIST_VARS+= gssapi llvm nls + +.include "../../mk/bsd.options.mk" + +# Bonjour support +.if !empty(PKG_OPTIONS:Mbonjour) +CONFIGURE_ARGS+= --with-bonjour +. if ${OPSYS} != "Darwin" +LIBS+= -ldns_sd +. endif +. include "../../net/mDNSResponder/buildlink3.mk" +.endif + +# Dtrace support +.if !empty(PKG_OPTIONS:Mdtrace) +CONFIGURE_ARGS+= --enable-dtrace +.endif + +# ICU collatium support +.if !empty(PKG_OPTIONS:Micu) +USE_TOOLS+= pkg-config +CONFIGURE_ARGS+= --with-icu +. include "../../textproc/icu/buildlink3.mk" +.endif + +# GSSAPI (Kerberos5) authentication for the PostgreSQL backend +.if !empty(PKG_OPTIONS:Mgssapi) +. include "../../mk/krb5.buildlink3.mk" +PLIST.gssapi= yes +CONFIGURE_ARGS+= --with-gssapi +.else +CONFIGURE_ARGS+= --without-gssapi +.endif + +# LDAP authentication for the PostgreSQL backend +.if !empty(PKG_OPTIONS:Mldap) +. include "../../databases/openldap-client/buildlink3.mk" +CONFIGURE_ARGS+= --with-ldap +.endif + +# LLVM based JIT support +.if !empty(PKG_OPTIONS:Mllvm) +. include "../../lang/llvm/buildlink3.mk" +CONFIGURE_ARGS+= --with-llvm +CONFIGURE_ENV+= CLANG=${CC} # XXX: make it be better +PLIST.llvm= yes +.endif + +# NLS support +.if !empty(PKG_OPTIONS:Mnls) +USE_PKGLOCALEDIR= yes +CONFIGURE_ARGS+= --enable-nls +PLIST.nls= yes +BROKEN_GETTEXT_DETECTION= yes +. include "../../devel/gettext-lib/buildlink3.mk" +LIBS.SunOS+= -lintl +.else +CONFIGURE_ARGS+= --disable-nls +.endif + +# PAM authentication for the PostgreSQL backend +.if !empty(PKG_OPTIONS:Mpam) +. include "../../mk/pam.buildlink3.mk" +CONFIGURE_ARGS+= --with-pam +.endif diff --git a/databases/postgresql14/patches/patch-config_missing b/databases/postgresql14/patches/patch-config_missing new file mode 100644 index 00000000000..f275ae1edfa --- /dev/null +++ b/databases/postgresql14/patches/patch-config_missing @@ -0,0 +1,13 @@ +$NetBSD: patch-config_missing,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- config/missing.orig 2012-10-05 12:14:55.000000000 +0000 ++++ config/missing +@@ -40,7 +40,7 @@ pre-packaged $1 output. + ERROR: Perl is missing on your system. It is needed unless you are building + from an unmodified official distribution of PostgreSQL. + ***" >&2 +- exit 1 ++ exit 0 + ;; + + *) diff --git a/databases/postgresql14/patches/patch-config_perl.m4 b/databases/postgresql14/patches/patch-config_perl.m4 new file mode 100644 index 00000000000..67123ec6175 --- /dev/null +++ b/databases/postgresql14/patches/patch-config_perl.m4 @@ -0,0 +1,15 @@ +$NetBSD: patch-config_perl.m4,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- config/perl.m4.orig 2018-02-05 21:01:02.000000000 +0000 ++++ config/perl.m4 +@@ -97,9 +97,7 @@ if test "$PORTNAME" = "win32" ; then + fi + fi + else +- pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]` ++ perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + fi + AC_SUBST(perl_embed_ldflags)dnl + if test -z "$perl_embed_ldflags" ; then diff --git a/databases/postgresql14/patches/patch-configure b/databases/postgresql14/patches/patch-configure new file mode 100644 index 00000000000..895d1784cd5 --- /dev/null +++ b/databases/postgresql14/patches/patch-configure @@ -0,0 +1,44 @@ +$NetBSD: patch-configure,v 1.1 2021/10/08 10:23:43 adam Exp $ + +Do not store CONFIGURE_ARGS, as these may contain working directory references. +Finally, native solaris uses -lgss for gssapi on mit-krb5. + +--- configure.orig 2021-02-08 21:54:11.000000000 +0000 ++++ configure +@@ -2805,7 +2805,7 @@ ac_configure="$SHELL $ac_aux_dir/configu + + + cat >>confdefs.h <<_ACEOF +-#define CONFIGURE_ARGS "$ac_configure_args" ++#define CONFIGURE_ARGS "" + _ACEOF + + +@@ -2971,6 +2971,7 @@ case $host_os in + darwin*) template=darwin ;; + dragonfly*) template=netbsd ;; + freebsd*) template=freebsd ;; ++ dragonfly*) template=dragonfly ;; + hpux*) template=hpux ;; + linux*|gnu*|k*bsd*-gnu) + template=linux ;; +@@ -9731,9 +9732,7 @@ if test "$PORTNAME" = "win32" ; then + fi + fi + else +- pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +- pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +- perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"` ++ perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + fi + if test -z "$perl_embed_ldflags" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -12043,7 +12042,7 @@ return gss_init_sec_context (); + return 0; + } + _ACEOF +-for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do ++for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto' 'gss -lkrb5 lcrypto'; do + if test -z "$ac_lib"; then + ac_res="none required" + else diff --git a/databases/postgresql14/patches/patch-contrib_dblink_dblink.c b/databases/postgresql14/patches/patch-contrib_dblink_dblink.c new file mode 100644 index 00000000000..c1c2f0ed8b7 --- /dev/null +++ b/databases/postgresql14/patches/patch-contrib_dblink_dblink.c @@ -0,0 +1,13 @@ +$NetBSD: patch-contrib_dblink_dblink.c,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- contrib/dblink/dblink.c.orig 2013-04-01 18:20:36.000000000 +0000 ++++ contrib/dblink/dblink.c +@@ -52,7 +52,7 @@ + #include "parser/scansup.h" + #include "utils/acl.h" + #include "utils/builtins.h" +-#include "utils/fmgroids.h" ++#include "postgresql/server/utils/fmgroids.h" + #include "utils/guc.h" + #include "utils/lsyscache.h" + #include "utils/memutils.h" diff --git a/databases/postgresql14/patches/patch-contrib_uuid-ossp_Makefile b/databases/postgresql14/patches/patch-contrib_uuid-ossp_Makefile new file mode 100644 index 00000000000..2c5e476af00 --- /dev/null +++ b/databases/postgresql14/patches/patch-contrib_uuid-ossp_Makefile @@ -0,0 +1,15 @@ +$NetBSD: patch-contrib_uuid-ossp_Makefile,v 1.1 2021/10/08 10:23:43 adam Exp $ + +Use relative path, as top_srcdir points to PREFIX. + +--- contrib/uuid-ossp/Makefile.orig 2021-03-18 11:50:26.000000000 +0000 ++++ contrib/uuid-ossp/Makefile +@@ -15,7 +15,7 @@ REGRESS = uuid_ossp + SHLIB_LINK += $(UUID_LIBS) + + # We copy some needed files verbatim from pgcrypto +-pgcrypto_src = $(top_srcdir)/contrib/pgcrypto ++pgcrypto_src = ../pgcrypto + + PG_CPPFLAGS = -I$(pgcrypto_src) + diff --git a/databases/postgresql14/patches/patch-src_Makefile.global.in b/databases/postgresql14/patches/patch-src_Makefile.global.in new file mode 100644 index 00000000000..88c91c11289 --- /dev/null +++ b/databases/postgresql14/patches/patch-src_Makefile.global.in @@ -0,0 +1,18 @@ +$NetBSD: patch-src_Makefile.global.in,v 1.1 2021/10/08 10:23:43 adam Exp $ + +Fix building on Cygwin. + +--- src/Makefile.global.in.orig 2020-09-21 20:47:36.000000000 +0000 ++++ src/Makefile.global.in +@@ -728,6 +728,11 @@ ifeq ($(PORTNAME),win32) + LIBS += -lws2_32 + endif + ++# missing for link on cygwin ? ++ifeq ($(PORTNAME),cygwin) ++LIBS += $(LDAP_LIBS_BE) ++endif ++ + # Not really standard libc functions, used by the backend. + TAS = @TAS@ + diff --git a/databases/postgresql14/patches/patch-src_Makefile.shlib b/databases/postgresql14/patches/patch-src_Makefile.shlib new file mode 100644 index 00000000000..b697c32b732 --- /dev/null +++ b/databases/postgresql14/patches/patch-src_Makefile.shlib @@ -0,0 +1,64 @@ +$NetBSD: patch-src_Makefile.shlib,v 1.1 2021/10/08 10:23:43 adam Exp $ + +Use correct linker flags. + +--- src/Makefile.shlib.orig 2020-09-21 20:47:36.000000000 +0000 ++++ src/Makefile.shlib +@@ -151,9 +151,6 @@ ifeq ($(PORTNAME), openbsd) + endif + + ifeq ($(PORTNAME), freebsd) +- ifdef SO_MAJOR_VERSION +- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) +- endif + LINK.shared = $(COMPILER) -shared + ifdef soname + LINK.shared += -Wl,-x,-soname,$(soname) +@@ -177,6 +174,17 @@ ifeq ($(PORTNAME), netbsd) + endif + endif + ++ifeq ($(PORTNAME), dragonfly) ++ ifdef ELF_SYSTEM ++ LINK.shared = $(COMPILER) -shared ++ ifdef soname ++ LINK.shared += -Wl,-x,-soname,$(soname) ++ endif ++ else ++ LINK.shared = $(LD) -x -Bshareable -Bforcearchive ++ endif ++endif ++ + ifeq ($(PORTNAME), hpux) + ifdef SO_MAJOR_VERSION + shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) +@@ -232,7 +240,7 @@ ifeq ($(PORTNAME), solaris) + ifeq ($(with_gnu_ld), yes) + LINK.shared += -Wl,-soname,$(soname) + else +- LINK.shared += -h $(soname) ++ LINK.shared += -Wl,-h,$(soname) + endif + endif + endif +@@ -429,8 +437,10 @@ ifdef soname + # we don't install $(shlib) on AIX + # (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at) + ifneq ($(PORTNAME), aix) ++ifeq ($(PORTNAME), cygwin) ++ $(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)' ++else + $(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)' +-ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) + ifneq ($(shlib), $(shlib_major)) + cd '$(DESTDIR)$(libdir)' && \ +@@ -443,7 +453,7 @@ ifneq ($(shlib), $(shlib_bare)) + $(LN_S) $(shlib) $(shlib_bare) + endif + endif # not win32 +-endif # not cygwin ++endif # cygwin + endif # not aix + ifneq (,$(findstring $(PORTNAME),win32 cygwin)) + $(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)' diff --git a/databases/postgresql14/patches/patch-src_backend_Makefile b/databases/postgresql14/patches/patch-src_backend_Makefile new file mode 100644 index 00000000000..26bb5fe0a48 --- /dev/null +++ b/databases/postgresql14/patches/patch-src_backend_Makefile @@ -0,0 +1,25 @@ +$NetBSD: patch-src_backend_Makefile,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- src/backend/Makefile.orig 2018-10-15 21:12:02.000000000 +0000 ++++ src/backend/Makefile +@@ -17,6 +17,10 @@ subdir = src/backend + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + ++CFLAGS+= $(DL_CFLAGS) ++LDFLAGS+= $(DL_LDFLAGS) ++LIBS+= $(DL_LIBS) ++ + SUBDIRS = access bootstrap catalog parser commands executor foreign lib libpq \ + main nodes optimizer partitioning port postmaster \ + regex replication rewrite \ +@@ -113,6 +117,9 @@ endif # aix + + $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport + ++$(top_builddir)/src/common/libpgcommon_srv.a: | submake-libpgport ++utils: | catalog ++ + + # The postgres.o target is needed by the rule in Makefile.global that + # creates the exports file when MAKE_EXPORTS = true. diff --git a/databases/postgresql14/patches/patch-src_interfaces_libpq_Makefile b/databases/postgresql14/patches/patch-src_interfaces_libpq_Makefile new file mode 100644 index 00000000000..257686c6d02 --- /dev/null +++ b/databases/postgresql14/patches/patch-src_interfaces_libpq_Makefile @@ -0,0 +1,13 @@ +$NetBSD: patch-src_interfaces_libpq_Makefile,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- src/interfaces/libpq/Makefile.orig 2016-02-08 21:12:28.000000000 +0000 ++++ src/interfaces/libpq/Makefile +@@ -49,7 +49,7 @@ OBJS += fe-secure-openssl.o + endif + + ifeq ($(PORTNAME), cygwin) +-override shlib = cyg$(NAME)$(DLSUFFIX) ++override shlib = cyg$(NAME)-$(SO_MAJOR_VERSION)$(DLSUFFIX) + endif + + ifeq ($(PORTNAME), win32) diff --git a/databases/postgresql14/patches/patch-src_makefiles_Makefile.solaris b/databases/postgresql14/patches/patch-src_makefiles_Makefile.solaris new file mode 100644 index 00000000000..093a3048af5 --- /dev/null +++ b/databases/postgresql14/patches/patch-src_makefiles_Makefile.solaris @@ -0,0 +1,10 @@ +$NetBSD: patch-src_makefiles_Makefile.solaris,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- src/makefiles/Makefile.solaris.orig 2019-09-30 20:06:55.000000000 +0000 ++++ src/makefiles/Makefile.solaris +@@ -23,5 +23,3 @@ ifeq ($(GCC), yes) + else + $(CC) $(CFLAGS) $< $(LDFLAGS) $(LDFLAGS_SL) -G -o $@ + endif +- +-sqlmansect = 5sql diff --git a/databases/postgresql14/patches/patch-src_pl_plperl_GNUmakefile b/databases/postgresql14/patches/patch-src_pl_plperl_GNUmakefile new file mode 100644 index 00000000000..cdbb8187eae --- /dev/null +++ b/databases/postgresql14/patches/patch-src_pl_plperl_GNUmakefile @@ -0,0 +1,21 @@ +$NetBSD: patch-src_pl_plperl_GNUmakefile,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- src/pl/plperl/GNUmakefile.orig 2018-10-15 21:12:02.000000000 +0000 ++++ src/pl/plperl/GNUmakefile +@@ -69,7 +69,6 @@ XSUBPPDIR = $(shell $(PERL) -e 'use List + + include $(top_srcdir)/src/Makefile.shlib + +-plperl.o: perlchunks.h plperl_opmask.h plperl_helpers.h + + plperl_opmask.h: plperl_opmask.pl + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi +@@ -79,7 +78,7 @@ perlchunks.h: $(PERLCHUNKS) + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi + $(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@ + +-all: all-lib ++all: perlchunks.h plperl_opmask.h plperl_helpers.h all-lib + + %.c: %.xs + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi diff --git a/databases/postgresql14/patches/patch-src_pl_plperl_plperl.h b/databases/postgresql14/patches/patch-src_pl_plperl_plperl.h new file mode 100644 index 00000000000..31f94478abc --- /dev/null +++ b/databases/postgresql14/patches/patch-src_pl_plperl_plperl.h @@ -0,0 +1,27 @@ +$NetBSD: patch-src_pl_plperl_plperl.h,v 1.1 2021/10/08 10:23:43 adam Exp $ + +--- src/pl/plperl/plperl.h.orig 2019-09-30 20:06:55.000000000 +0000 ++++ src/pl/plperl/plperl.h +@@ -68,6 +68,10 @@ + #define HAS_BOOL 1 + #endif + ++#ifdef __sun ++#define list_head sun_list_head ++#define list_tail sun_list_tail ++#endif + + /* + * Get the basic Perl API. We use PERL_NO_GET_CONTEXT mode so that our code +@@ -110,6 +114,11 @@ + #include "XSUB.h" + #endif + ++#ifdef __sun ++#undef list_head ++#undef list_tail ++#endif ++ + /* put back our *printf macros ... this must match src/include/port.h */ + #ifdef vsnprintf + #undef vsnprintf |
