* [PR PATCH] Postgresql 15
@ 2022-10-13 21:13 Chocimier
2023-01-12 2:29 ` github-actions
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chocimier @ 2022-10-13 21:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
There is a new pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgresql15
https://github.com/void-linux/void-packages/pull/39938
Postgresql 15
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39938.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgresql15-39938.patch --]
[-- Type: text/x-diff, Size: 58264 bytes --]
From 504d40b951aa0afc22905ed840dd4760c22470eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:19:15 +0200
Subject: [PATCH 1/7] postgis-postgresql13: remove
---
srcpkgs/postgis-postgresql13/template | 33 ---------------------------
srcpkgs/postgis-postgresql13/update | 2 --
2 files changed, 35 deletions(-)
delete mode 100644 srcpkgs/postgis-postgresql13/template
delete mode 100644 srcpkgs/postgis-postgresql13/update
diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
deleted file mode 100644
index f17ace2f9fb4..000000000000
--- a/srcpkgs/postgis-postgresql13/template
+++ /dev/null
@@ -1,33 +0,0 @@
-# Template file for 'postgis-postgresql13'
-pkgname=postgis-postgresql13
-version=3.2.1
-revision=1
-wrksrc="postgis-${version}"
-build_style=gnu-configure
-configure_args="
- --with-projdir=${XBPS_CROSS_BASE}/usr
- --with-jsondir=${XBPS_CROSS_BASE}/usr
- --with-protobufdir=${XBPS_CROSS_BASE}/usr
- --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
-hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql13-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql13-libs-devel
- proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt CUnit-devel"
-short_desc="Spatial database extender for PostgreSQL"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="GPL-2.0-or-later"
-homepage="https://postgis.net/"
-changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
-distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
-nocross="FIXME: Cannot run test program to determine PROJ version"
-
-pre_configure() {
- ./autogen.sh
-}
-
-pre_check() {
- # regression tests require running postgresql
- vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
-}
diff --git a/srcpkgs/postgis-postgresql13/update b/srcpkgs/postgis-postgresql13/update
deleted file mode 100644
index e5577e6b068a..000000000000
--- a/srcpkgs/postgis-postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgname=postgis
-ignore="*alpha* *beta* *rc*"
From 62f6f331815794185b0a1884967e43da9a59bf95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:22:27 +0200
Subject: [PATCH 2/7] postgresql13: remove
---
srcpkgs/postgresql13-client | 1 -
srcpkgs/postgresql13-contrib | 1 -
srcpkgs/postgresql13-doc | 1 -
srcpkgs/postgresql13-libs | 1 -
srcpkgs/postgresql13-libs-devel | 1 -
srcpkgs/postgresql13-plperl | 1 -
srcpkgs/postgresql13-plpython | 1 -
srcpkgs/postgresql13-pltcl | 1 -
srcpkgs/postgresql13/files/pg_config.sh.in | 143 -----------
srcpkgs/postgresql13/files/postgresql.confd | 17 --
srcpkgs/postgresql13/files/postgresql.pam | 3 -
.../postgresql13/files/postgresql13/control/t | 2 -
.../postgresql13/files/postgresql13/log/run | 2 -
srcpkgs/postgresql13/files/postgresql13/run | 27 ---
srcpkgs/postgresql13/files/profile.sh | 14 --
.../patches/pg_config-cross-value.patch | 45 ----
srcpkgs/postgresql13/patches/relocate.patch | 22 --
srcpkgs/postgresql13/template | 229 ------------------
srcpkgs/postgresql13/update | 2 -
19 files changed, 514 deletions(-)
delete mode 120000 srcpkgs/postgresql13-client
delete mode 120000 srcpkgs/postgresql13-contrib
delete mode 120000 srcpkgs/postgresql13-doc
delete mode 120000 srcpkgs/postgresql13-libs
delete mode 120000 srcpkgs/postgresql13-libs-devel
delete mode 120000 srcpkgs/postgresql13-plperl
delete mode 120000 srcpkgs/postgresql13-plpython
delete mode 120000 srcpkgs/postgresql13-pltcl
delete mode 100644 srcpkgs/postgresql13/files/pg_config.sh.in
delete mode 100644 srcpkgs/postgresql13/files/postgresql.confd
delete mode 100644 srcpkgs/postgresql13/files/postgresql.pam
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/control/t
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/log/run
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/run
delete mode 100644 srcpkgs/postgresql13/files/profile.sh
delete mode 100644 srcpkgs/postgresql13/patches/pg_config-cross-value.patch
delete mode 100644 srcpkgs/postgresql13/patches/relocate.patch
delete mode 100644 srcpkgs/postgresql13/template
delete mode 100644 srcpkgs/postgresql13/update
diff --git a/srcpkgs/postgresql13-client b/srcpkgs/postgresql13-client
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-client
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-contrib b/srcpkgs/postgresql13-contrib
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-contrib
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-doc b/srcpkgs/postgresql13-doc
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-doc
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs b/srcpkgs/postgresql13-libs
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs-devel b/srcpkgs/postgresql13-libs-devel
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs-devel
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plperl b/srcpkgs/postgresql13-plperl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plperl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plpython b/srcpkgs/postgresql13-plpython
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plpython
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-pltcl b/srcpkgs/postgresql13-pltcl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-pltcl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13/files/pg_config.sh.in b/srcpkgs/postgresql13/files/pg_config.sh.in
deleted file mode 100644
index 3d20d215d0b3..000000000000
--- a/srcpkgs/postgresql13/files/pg_config.sh.in
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-# Released to Public Domain by Doan Tran Cong Danh
-
-print() {
- printf '%s\n' "$@"
-}
-
-sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
-
-BINDIR="$sysroot/@PREFIX@/bin"
-DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-INCLUDEDIR="$sysroot/usr/include"
-PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
-INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
-LIBDIR="$sysroot/@PREFIX@/lib"
-PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
-LOCALEDIR="$sysroot/@PREFIX@/share/locale"
-MANDIR="$sysroot/@PREFIX@/share/man"
-SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
-SYSCONFDIR="$sysroot/@PREFIX@/etc/postgresql"
-PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
-
-CONFIGURE="@configure_args@"
-CC="@CC@"
-CPPFLAGS="@CPPFLAGS@"
-CFLAGS="@CFLAGS@"
-CFLAGS_SL="@CFLAGS_SL@"
-LDFLAGS="@LDFLAGS@"
-LDFLAGS_EX="@LDFLAGS_EX@"
-LDFLAGS_SL="@LDFLAGS_SL@"
-LIBS="@LIBS@"
-VERSION="PostgreSQL @FULL_VERSION@"
-
-if [ "$sysroot" != "/" ]; then
- CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
-fi
-
-usage() {
- cat <<-EOF
- $0 provides information about the installed version of PostgreSQL.
-
- Usage:
- $0 [OPTION]...
-
- Options:
- --bindir show location of user executables
- --docdir show location of documentation files
- --htmldir show location of HTML documentation files
- --includedir show location of C header files of the client interfaces
- --pkgincludedir show location of other C header files
- --includedir-server show location of C header files for the server
- --libdir show location of object code libraries
- --pkglibdir show location of dynamically loadable modules
- --localedir show location of locale support files
- --mandir show location of manual pages
- --sharedir show location of architecture-independent support files
- --sysconfdir show location of system-wide configuration files
- --pgxs show location of extension makefile
- --configure show options given to PostgreSQL was built
- --cc show CC value used when PostgreSQL was built
- --cppflags show CPPFLAGS value used when PostgreSQL was built
- --cflags show CFLAGS value used when PostgreSQL was built
- --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
- --ldflags show LDFLAGS value used when PostgreSQL was built
- --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
- --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
- --libs show LIBS value used when PostgreSQL was built
- --version show the PostgreSQL version
- -?, --help show this help, then exit
-
- With no arguments, all known items are shown.
-
- Report bugs to <pgsql-bugs@postgresql.org>.
- EOF
-}
-
-if test $# -eq 0; then
- cat <<-EOF
- BINDIR = $BINDIR
- DOCDIR = $DOCDIR
- HTMLDIR = $HTMLDIR
- INCLUDEDIR = $INCLUDEDIR
- PKGINCLUDEDIR = $PKGINCLUDEDIR
- INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
- LIBDIR = $LIBDIR
- PKGLIBDIR = $PKGLIBDIR
- LOCALEDIR = $LOCALEDIR
- MANDIR = $MANDIR
- SHAREDIR = $SHAREDIR
- SYSCONFDIR = $SYSCONFDIR
- PGXS = $PGXS
- CONFIGURE = $CONFIGURE
- CC = $CC
- CPPFLAGS = $CPPFLAGS
- CFLAGS = $CFLAGS
- CFLAGS_SL = $CFLAGS_SL
- LDFLAGS = $LDFLAGS
- LDFLAGS_EX = $LDFLAGS_EX
- LDFLAGS_SL = $LDFLAGS_SL
- LIBS = $LIBS
- VERSION = $VERSION
- EOF
-fi
-
-for arg
-do
- if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
- usage
- exit 0
- fi
-done
-
-for arg
-do
- case "$arg" in
- --bindir) print "$BINDIR" ;;
- --docdir) print "$DOCDIR" ;;
- --htmldir) print "$HTMLDIR" ;;
- --includedir) print "$INCLUDEDIR" ;;
- --pkgincludedir) print "$PKGINCLUDEDIR" ;;
- --includedir-server) print "$INCLUDEDIR_SERVER" ;;
- --libdir) print "$LIBDIR" ;;
- --pkglibdir) print "$PKGLIBDIR" ;;
- --localedir) print "$LOCALEDIR" ;;
- --mandir) print "$MANDIR" ;;
- --sharedir) print "$SHAREDIR" ;;
- --sysconfdir) print "$SYSCONFDIR" ;;
- --pgxs) print "$PGXS" ;;
- --configure) print "$CONFIGURE" ;;
- --cc) print "$CC" ;;
- --cppflags) print "$CPPFLAGS" ;;
- --cflags) print "$CFLAGS" ;;
- --cflags_sl) print "$CFLAGS_SL" ;;
- --ldflags) print "$LDFLAGS" ;;
- --ldflags_ex) print "$LDFLAGS_EX" ;;
- --ldflags_sl) print "$LDFLAGS_SL" ;;
- --libs) print "$LIBS" ;;
- --version) print "$VERSION" ;;
- esac
-done
diff --git a/srcpkgs/postgresql13/files/postgresql.confd b/srcpkgs/postgresql13/files/postgresql.confd
deleted file mode 100644
index fe7106626fa5..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.confd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Configuration file for the PostgreSQL server.
-
-# PostgreSQL's database directory
-PGROOT="/var/lib/postgresql@VERSION@"
-
-# PostgreSQL's log file.
-PGLOG="/var/log/postgresql@VERSION@.log"
-
-# Passed to initdb if necessary
-INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
-
-# Extra options to run postmaster with, e.g.:
-# -N is the maximal number of client connections
-# -B is the number of shared buffers and has to be at least 2x the value for -N
-# Please read the man-page to postmaster for more options. Many of these options
-# can be set directly in the configuration-file.
-#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql13/files/postgresql.pam b/srcpkgs/postgresql13/files/postgresql.pam
deleted file mode 100644
index 53724d1f86a7..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.pam
+++ /dev/null
@@ -1,3 +0,0 @@
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/srcpkgs/postgresql13/files/postgresql13/control/t b/srcpkgs/postgresql13/files/postgresql13/control/t
deleted file mode 100755
index dcedfaa20180..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/control/t
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql13/files/postgresql13/log/run b/srcpkgs/postgresql13/files/postgresql13/log/run
deleted file mode 100755
index 815d9c974079..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/log/run
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql13/files/postgresql13/run b/srcpkgs/postgresql13/files/postgresql13/run
deleted file mode 100755
index 9d044e9a1ce1..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/run
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-. /@PREFIX@/etc/default/postgresql
-: ${PGDATA:="$PGROOT/data"}
-
-if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
- echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
- ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
-fi
-
-
-if [ ! -d "$PGDATA" ]; then
- echo "Initializing database in $PGDATA"
-
- mkdir -p "$PGDATA" || exit 1
- chown -R postgres:postgres "$PGDATA"
- chmod 0700 "$PGDATA"
- su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
- rm -fr "$PGDATA"
- exit 1
- }
-
- if [ -f /@PREFIX@/etc/postgresql/postgresql.conf ]; then
- ln -sf /@PREFIX@/etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
- fi
-fi
-
-exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql13/files/profile.sh b/srcpkgs/postgresql13/files/profile.sh
deleted file mode 100644
index 54be2ca50a4f..000000000000
--- a/srcpkgs/postgresql13/files/profile.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-appendpath () {
- case ":$PATH:" in
- *:"$1":*)
- ;;
- *)
- PATH="${PATH:+$PATH:}$1"
- esac
-}
-
-appendpath '/@PREFIX@/bin'
-
-unset appendpath
-
-export PATH
diff --git a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch b/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
deleted file mode 100644
index cc0a9fc19133..000000000000
--- a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Sources: Doan Tran Cong Danh
-Upstream: No
- - First part needs to be rework in configure script to be usable
- upstream
- - Second part would un-usable for Windows
-diff --git src/common/Makefile src/common/Makefile
-index ec04710..2af845f 100644
---- a/src/common/Makefile
-+++ b/src/common/Makefile
-@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
-
- # don't include subdirectory-path-dependent -I and -L switches
- STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
-+STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
-+STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
- STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
-+STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
- override CPPFLAGS += -DVAL_CC="\"$(CC)\""
- override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
--override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
-+override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
- override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
- override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
- override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
-@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
- GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
- GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
-
--all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
-+all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
-+
-+pg_config.sh: pg_config.sh.in
-+ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
-+ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
-+ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
-+ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
-+ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
-+ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
-+ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
-+ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
-+ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
-+ $< >$@
-
- distprep: kwlist_d.h
-
diff --git a/srcpkgs/postgresql13/patches/relocate.patch b/srcpkgs/postgresql13/patches/relocate.patch
deleted file mode 100644
index d2cc14281e3a..000000000000
--- a/srcpkgs/postgresql13/patches/relocate.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
-Date: Sat, 18 Jan 2020 12:19:45 +0100
-Subject: [PATCH] relocate
-
-
-diff --git src/port/path.c src/port/path.c
-index 710988b..20dc57d 100644
---- a/src/port/path.c
-+++ b/src/port/path.c
-@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
- int tail_len;
- int i;
-
-+ goto no_match; // we relocate only binaries
-+
- /*
- * Determine the common prefix --- note we require it to end on a
- * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
---
-2.23.0
-
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
deleted file mode 100644
index 1cd078cd6d87..000000000000
--- a/srcpkgs/postgresql13/template
+++ /dev/null
@@ -1,229 +0,0 @@
-# Template file for 'postgresql13'
-pkgname=postgresql13
-version=13.8
-revision=1
-wrksrc="postgresql-${version}"
-build_style=gnu-configure
-make_build_target=world
-_major="${version%%.*}"
-_prefix="usr/lib/psql${_major}"
-configure_args="--with-openssl --with-python
- --with-pam --enable-thread-safety
- --with-perl --with-tcl --without-ldap --without-gssapi
- --without-bonjour --with-libxml --with-libxslt
- --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
-hostmakedepends="docbook2x gettext flex openjade"
-makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
- python3-devel readline-devel tcl-devel"
-short_desc="Sophisticated open-source Object-Relational DBMS"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="PostgreSQL"
-homepage="https://www.postgresql.org"
-changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
-distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
-checksum=73876fdd3a517087340458dca4ce15b8d2a4dbceb334c0441424551ae6c4cded
-make_check=ci-skip # Postgres server can't be run as root
-
-conf_files="
- /${_prefix}/etc/default/postgresql
- /${_prefix}/etc/pam.d/postgresql
- /${_prefix}/etc/postgresql/postgresql.conf
-"
-
-# Create 'postgres' user for the server.
-system_accounts="postgres"
-postgres_homedir="/var/lib/postgresql"
-postgres_shell="/bin/sh"
-postgres_descr="PostgreSQL database server user"
-make_dirs="
- /var/lib/postgresql 0750 postgres postgres
- /var/lib/postgresql${_major} 0750 postgres postgres"
-
-if [ "$CROSS_BUILD" ]; then
- configure_args+=" --without-perl --without-python --without-tcl"
-fi
-
-post_patch() {
- cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
- _substitute src/common/pg_config.sh.in
- vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
-}
-
-pre_configure() {
- _style_configure_args="${configure_args}"
- configure_args=" "
- for arg in ${_style_configure_args}; do
- case $arg in
- --prefix=*|*dir=*) : ;; # skip
- *) configure_args+=" $arg"
- esac
- done
- configure_args="--prefix=/${_prefix}
- --sysconfdir=/${_prefix}/etc
- --includedir=/usr/include
- ${configure_args}"
-}
-
-post_build() {
- make -C contrib ${makejobs}
-}
-
-pre_check() {
- ln -sr tmp_install/${_prefix} /${_prefix%/*}
-}
-
-post_install() {
- vmkdir usr/share/man
- cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
- for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
- mv $i ${i%.*}-${_major}.${i##*.}
- done
- vmkdir ${_prefix}/share/doc
- cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
- vsv ${pkgname}
- find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
- vlicense COPYRIGHT
-
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
- vinstall ${FILESDIR}/postgresql.confd 644 ${_prefix}/etc/default postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/default/postgresql
- vinstall ${FILESDIR}/postgresql.pam 644 ${_prefix}/etc/pam.d postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/pam.d/postgresql
- vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
- 644 ${_prefix}/etc/postgresql postgresql.conf
- vbin src/common/pg_config.sh
-
- vsed -i 's/install_bin = .*/install_bin = install/g' \
- ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
-}
-
-_substitute() {
- sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
-}
-
-postgresql13-doc_package() {
- short_desc="PostgreSQL documentation"
- pkg_install() {
- vmove ${_prefix}/share/doc
- }
-}
-
-postgresql13-libs_package() {
- short_desc="PostgreSQL shared libraries"
- conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0"
- pkg_install() {
- vmove "${_prefix}/lib/*.so*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name libpq5\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
- }
-}
-
-postgresql13-libs-devel_package() {
- depends="postgresql-libs>=${version}_${revision}"
- short_desc="PostgreSQL shared libraries (development files)"
- conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0"
- pkg_install() {
- vmkdir usr/bin
- vmkdir usr/lib
- for f in pg_config ecpg; do
- vmove ${_prefix}/bin/${f}
- vmove "usr/share/man/man1/$(basename ${f})*"
- ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
- done
- vmove usr/bin/pg_config.sh
- vmove usr/include
- vmove "${_prefix}/lib/*.a"
- mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
- vmove usr/share/man/man3
- vmove ${_prefix}/lib/postgresql/pgxs
- for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
- ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
- done
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pg_config\* -o -name ecpg\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-# XXX disabled for now in cross builds.
-if [ -z "$CROSS_BUILD" ]; then
-
-postgresql13-plperl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Perl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plperl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plperl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-plpython_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Python procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plpython*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plpython\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-pltcl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Tcl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/pltcl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pltcl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-fi # !CROSS_BUILD
-
-postgresql13-client_package() {
- short_desc="Client frontends programs for PostgreSQL"
- pkg_install() {
- for f in clusterdb createdb createuser dropdb \
- dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
- vacuumdb; do
- vmove ${_prefix}/bin/${f}
- vmove usr/share/man/man1/$(basename ${f})-${_major}.1
- done
- vmove usr/share/man/man7
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pgscripts\* -o \
- -name psql\* -o \
- -name pg_dump\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
- ${PKGDESTDIR}/${_prefix}/share
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
- }
-}
-
-postgresql13-contrib_package() {
- short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
- }
-}
diff --git a/srcpkgs/postgresql13/update b/srcpkgs/postgresql13/update
deleted file mode 100644
index 160ccf143338..000000000000
--- a/srcpkgs/postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://ftp.postgresql.org/pub/source/"
-pattern="v\K${version%%.*}[\d.]+(?!\w)"
From d83a415fb20c992135ce5d25acd23cf8fa90f216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:49:49 +0200
Subject: [PATCH 3/7] New package: postgresql15-15.0
---
common/shlibs | 8 +-
srcpkgs/postgresql-libs | 2 +-
srcpkgs/postgresql-libs-devel | 2 +-
srcpkgs/postgresql15-client | 1 +
srcpkgs/postgresql15-contrib | 1 +
srcpkgs/postgresql15-doc | 1 +
srcpkgs/postgresql15-plperl | 1 +
srcpkgs/postgresql15-plpython | 1 +
srcpkgs/postgresql15-pltcl | 1 +
srcpkgs/postgresql15/files/pg_config.sh.in | 143 +++++++++++
srcpkgs/postgresql15/files/postgresql.confd | 17 ++
srcpkgs/postgresql15/files/postgresql.pam | 3 +
.../postgresql15/files/postgresql15/control/t | 2 +
.../postgresql15/files/postgresql15/log/run | 2 +
srcpkgs/postgresql15/files/postgresql15/run | 27 ++
srcpkgs/postgresql15/files/profile.sh | 14 ++
.../patches/pg_config-cross-value.patch | 45 ++++
srcpkgs/postgresql15/patches/relocate.patch | 22 ++
srcpkgs/postgresql15/template | 230 ++++++++++++++++++
srcpkgs/postgresql15/update | 2 +
20 files changed, 519 insertions(+), 6 deletions(-)
create mode 120000 srcpkgs/postgresql15-client
create mode 120000 srcpkgs/postgresql15-contrib
create mode 120000 srcpkgs/postgresql15-doc
create mode 120000 srcpkgs/postgresql15-plperl
create mode 120000 srcpkgs/postgresql15-plpython
create mode 120000 srcpkgs/postgresql15-pltcl
create mode 100644 srcpkgs/postgresql15/files/pg_config.sh.in
create mode 100644 srcpkgs/postgresql15/files/postgresql.confd
create mode 100644 srcpkgs/postgresql15/files/postgresql.pam
create mode 100755 srcpkgs/postgresql15/files/postgresql15/control/t
create mode 100755 srcpkgs/postgresql15/files/postgresql15/log/run
create mode 100755 srcpkgs/postgresql15/files/postgresql15/run
create mode 100644 srcpkgs/postgresql15/files/profile.sh
create mode 100644 srcpkgs/postgresql15/patches/pg_config-cross-value.patch
create mode 100644 srcpkgs/postgresql15/patches/relocate.patch
create mode 100644 srcpkgs/postgresql15/template
create mode 100644 srcpkgs/postgresql15/update
diff --git a/common/shlibs b/common/shlibs
index fe70a5765f50..3b145af38c66 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -558,10 +558,10 @@ libKF5PurposeWidgets.so.5 purpose-5.48.0_1
libKF5Purpose.so.5 purpose-5.48.0_1
libKF5PulseAudioQt.so.3 pulseaudio-qt-1.3_1
libReviewboardHelpers.so.5 purpose-5.48.0_1
-libecpg_compat.so.3 postgresql-libs-14.0_1
-libecpg.so.6 postgresql-libs-14.0_1
-libpgtypes.so.3 postgresql-libs-14.0_1
-libpq.so.5 postgresql-libs-14.0_1
+libecpg_compat.so.3 postgresql-libs-15.0_1
+libecpg.so.6 postgresql-libs-15.0_1
+libpgtypes.so.3 postgresql-libs-15.0_1
+libpq.so.5 postgresql-libs-15.0_1
libmypaint.so.0 libmypaint-1.6.1_1
libgssapi_krb5.so.2 mit-krb5-libs-1.8_1
libgssrpc.so.4 mit-krb5-libs-1.8_1
diff --git a/srcpkgs/postgresql-libs b/srcpkgs/postgresql-libs
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs
+++ b/srcpkgs/postgresql-libs
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql-libs-devel b/srcpkgs/postgresql-libs-devel
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs-devel
+++ b/srcpkgs/postgresql-libs-devel
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-client b/srcpkgs/postgresql15-client
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-client
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-contrib b/srcpkgs/postgresql15-contrib
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-contrib
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-doc b/srcpkgs/postgresql15-doc
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-doc
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plperl b/srcpkgs/postgresql15-plperl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plperl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plpython b/srcpkgs/postgresql15-plpython
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plpython
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-pltcl b/srcpkgs/postgresql15-pltcl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-pltcl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15/files/pg_config.sh.in b/srcpkgs/postgresql15/files/pg_config.sh.in
new file mode 100644
index 000000000000..68068a82e01e
--- /dev/null
+++ b/srcpkgs/postgresql15/files/pg_config.sh.in
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Released to Public Domain by Doan Tran Cong Danh
+
+print() {
+ printf '%s\n' "$@"
+}
+
+sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
+
+BINDIR="$sysroot/@PREFIX@/bin"
+DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+INCLUDEDIR="$sysroot/usr/include"
+PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
+INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
+LIBDIR="$sysroot/@PREFIX@/lib"
+PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
+LOCALEDIR="$sysroot/@PREFIX@/share/locale"
+MANDIR="$sysroot/@PREFIX@/share/man"
+SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
+SYSCONFDIR="$sysroot/etc/psql@VERSION@/postgresql"
+PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
+
+CONFIGURE="@configure_args@"
+CC="@CC@"
+CPPFLAGS="@CPPFLAGS@"
+CFLAGS="@CFLAGS@"
+CFLAGS_SL="@CFLAGS_SL@"
+LDFLAGS="@LDFLAGS@"
+LDFLAGS_EX="@LDFLAGS_EX@"
+LDFLAGS_SL="@LDFLAGS_SL@"
+LIBS="@LIBS@"
+VERSION="PostgreSQL @FULL_VERSION@"
+
+if [ "$sysroot" != "/" ]; then
+ CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
+fi
+
+usage() {
+ cat <<-EOF
+ $0 provides information about the installed version of PostgreSQL.
+
+ Usage:
+ $0 [OPTION]...
+
+ Options:
+ --bindir show location of user executables
+ --docdir show location of documentation files
+ --htmldir show location of HTML documentation files
+ --includedir show location of C header files of the client interfaces
+ --pkgincludedir show location of other C header files
+ --includedir-server show location of C header files for the server
+ --libdir show location of object code libraries
+ --pkglibdir show location of dynamically loadable modules
+ --localedir show location of locale support files
+ --mandir show location of manual pages
+ --sharedir show location of architecture-independent support files
+ --sysconfdir show location of system-wide configuration files
+ --pgxs show location of extension makefile
+ --configure show options given to PostgreSQL was built
+ --cc show CC value used when PostgreSQL was built
+ --cppflags show CPPFLAGS value used when PostgreSQL was built
+ --cflags show CFLAGS value used when PostgreSQL was built
+ --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
+ --ldflags show LDFLAGS value used when PostgreSQL was built
+ --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
+ --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
+ --libs show LIBS value used when PostgreSQL was built
+ --version show the PostgreSQL version
+ -?, --help show this help, then exit
+
+ With no arguments, all known items are shown.
+
+ Report bugs to <pgsql-bugs@postgresql.org>.
+ EOF
+}
+
+if test $# -eq 0; then
+ cat <<-EOF
+ BINDIR = $BINDIR
+ DOCDIR = $DOCDIR
+ HTMLDIR = $HTMLDIR
+ INCLUDEDIR = $INCLUDEDIR
+ PKGINCLUDEDIR = $PKGINCLUDEDIR
+ INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
+ LIBDIR = $LIBDIR
+ PKGLIBDIR = $PKGLIBDIR
+ LOCALEDIR = $LOCALEDIR
+ MANDIR = $MANDIR
+ SHAREDIR = $SHAREDIR
+ SYSCONFDIR = $SYSCONFDIR
+ PGXS = $PGXS
+ CONFIGURE = $CONFIGURE
+ CC = $CC
+ CPPFLAGS = $CPPFLAGS
+ CFLAGS = $CFLAGS
+ CFLAGS_SL = $CFLAGS_SL
+ LDFLAGS = $LDFLAGS
+ LDFLAGS_EX = $LDFLAGS_EX
+ LDFLAGS_SL = $LDFLAGS_SL
+ LIBS = $LIBS
+ VERSION = $VERSION
+ EOF
+fi
+
+for arg
+do
+ if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
+ usage
+ exit 0
+ fi
+done
+
+for arg
+do
+ case "$arg" in
+ --bindir) print "$BINDIR" ;;
+ --docdir) print "$DOCDIR" ;;
+ --htmldir) print "$HTMLDIR" ;;
+ --includedir) print "$INCLUDEDIR" ;;
+ --pkgincludedir) print "$PKGINCLUDEDIR" ;;
+ --includedir-server) print "$INCLUDEDIR_SERVER" ;;
+ --libdir) print "$LIBDIR" ;;
+ --pkglibdir) print "$PKGLIBDIR" ;;
+ --localedir) print "$LOCALEDIR" ;;
+ --mandir) print "$MANDIR" ;;
+ --sharedir) print "$SHAREDIR" ;;
+ --sysconfdir) print "$SYSCONFDIR" ;;
+ --pgxs) print "$PGXS" ;;
+ --configure) print "$CONFIGURE" ;;
+ --cc) print "$CC" ;;
+ --cppflags) print "$CPPFLAGS" ;;
+ --cflags) print "$CFLAGS" ;;
+ --cflags_sl) print "$CFLAGS_SL" ;;
+ --ldflags) print "$LDFLAGS" ;;
+ --ldflags_ex) print "$LDFLAGS_EX" ;;
+ --ldflags_sl) print "$LDFLAGS_SL" ;;
+ --libs) print "$LIBS" ;;
+ --version) print "$VERSION" ;;
+ esac
+done
diff --git a/srcpkgs/postgresql15/files/postgresql.confd b/srcpkgs/postgresql15/files/postgresql.confd
new file mode 100644
index 000000000000..fe7106626fa5
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.confd
@@ -0,0 +1,17 @@
+# Configuration file for the PostgreSQL server.
+
+# PostgreSQL's database directory
+PGROOT="/var/lib/postgresql@VERSION@"
+
+# PostgreSQL's log file.
+PGLOG="/var/log/postgresql@VERSION@.log"
+
+# Passed to initdb if necessary
+INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
+
+# Extra options to run postmaster with, e.g.:
+# -N is the maximal number of client connections
+# -B is the number of shared buffers and has to be at least 2x the value for -N
+# Please read the man-page to postmaster for more options. Many of these options
+# can be set directly in the configuration-file.
+#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql15/files/postgresql.pam b/srcpkgs/postgresql15/files/postgresql.pam
new file mode 100644
index 000000000000..53724d1f86a7
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/srcpkgs/postgresql15/files/postgresql15/control/t b/srcpkgs/postgresql15/files/postgresql15/control/t
new file mode 100755
index 000000000000..dcedfaa20180
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/control/t
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql15/files/postgresql15/log/run b/srcpkgs/postgresql15/files/postgresql15/log/run
new file mode 100755
index 000000000000..815d9c974079
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql15/files/postgresql15/run b/srcpkgs/postgresql15/files/postgresql15/run
new file mode 100755
index 000000000000..3aee9440e847
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/run
@@ -0,0 +1,27 @@
+#!/bin/sh
+. /etc/psql@VERSION@/default/postgresql
+: ${PGDATA:="$PGROOT/data"}
+
+if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
+ echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
+ ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
+fi
+
+
+if [ ! -d "$PGDATA" ]; then
+ echo "Initializing database in $PGDATA"
+
+ mkdir -p "$PGDATA" || exit 1
+ chown -R postgres:postgres "$PGDATA"
+ chmod 0700 "$PGDATA"
+ su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
+ rm -fr "$PGDATA"
+ exit 1
+ }
+
+ if [ -f /etc/psql@VERSION@/postgresql/postgresql.conf ]; then
+ ln -sf /etc/psql@VERSION@/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
+ fi
+fi
+
+exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql15/files/profile.sh b/srcpkgs/postgresql15/files/profile.sh
new file mode 100644
index 000000000000..54be2ca50a4f
--- /dev/null
+++ b/srcpkgs/postgresql15/files/profile.sh
@@ -0,0 +1,14 @@
+appendpath () {
+ case ":$PATH:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH="${PATH:+$PATH:}$1"
+ esac
+}
+
+appendpath '/@PREFIX@/bin'
+
+unset appendpath
+
+export PATH
diff --git a/srcpkgs/postgresql15/patches/pg_config-cross-value.patch b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
new file mode 100644
index 000000000000..cc0a9fc19133
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
@@ -0,0 +1,45 @@
+Sources: Doan Tran Cong Danh
+Upstream: No
+ - First part needs to be rework in configure script to be usable
+ upstream
+ - Second part would un-usable for Windows
+diff --git src/common/Makefile src/common/Makefile
+index ec04710..2af845f 100644
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
+
+ # don't include subdirectory-path-dependent -I and -L switches
+ STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
++STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
++STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
+ STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
++STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
+ override CPPFLAGS += -DVAL_CC="\"$(CC)\""
+ override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
+-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
++override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
+ override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
+ override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
+ override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
+@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
+ GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
+ GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
+
+-all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
++all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
++
++pg_config.sh: pg_config.sh.in
++ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
++ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
++ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
++ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
++ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
++ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
++ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
++ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
++ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
++ $< >$@
+
+ distprep: kwlist_d.h
+
diff --git a/srcpkgs/postgresql15/patches/relocate.patch b/srcpkgs/postgresql15/patches/relocate.patch
new file mode 100644
index 000000000000..d2cc14281e3a
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/relocate.patch
@@ -0,0 +1,22 @@
+From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Sat, 18 Jan 2020 12:19:45 +0100
+Subject: [PATCH] relocate
+
+
+diff --git src/port/path.c src/port/path.c
+index 710988b..20dc57d 100644
+--- a/src/port/path.c
++++ b/src/port/path.c
+@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
+ int tail_len;
+ int i;
+
++ goto no_match; // we relocate only binaries
++
+ /*
+ * Determine the common prefix --- note we require it to end on a
+ * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
+--
+2.23.0
+
diff --git a/srcpkgs/postgresql15/template b/srcpkgs/postgresql15/template
new file mode 100644
index 000000000000..fab9b3ed9bdb
--- /dev/null
+++ b/srcpkgs/postgresql15/template
@@ -0,0 +1,230 @@
+# Template file for 'postgresql15'
+pkgname=postgresql15
+version=15.0
+revision=1
+wrksrc="postgresql-${version}"
+build_style=gnu-configure
+make_build_target=world
+_major="${version%%.*}"
+_prefix="usr/lib/psql${_major}"
+_sysconfdir="etc/psql${_major}"
+configure_args="--with-openssl --with-python
+ --with-pam --enable-thread-safety
+ --with-perl --with-tcl --without-ldap --without-gssapi
+ --without-bonjour --with-libxml --with-libxslt
+ --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
+hostmakedepends="docbook2x gettext flex openjade"
+makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
+ python3-devel readline-devel tcl-devel"
+short_desc="Sophisticated open-source Object-Relational DBMS"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="PostgreSQL"
+homepage="https://www.postgresql.org"
+changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
+distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
+checksum=72ec74f4a7c16e684f43ea42e215497fcd4c55d028a68fb72e99e61ff40da4d6
+make_check=ci-skip # Postgres server can't be run as root
+
+conf_files="
+ /${_sysconfdir}/default/postgresql
+ /${_sysconfdir}/pam.d/postgresql
+ /${_sysconfdir}/postgresql/postgresql.conf
+"
+
+# Create 'postgres' user for the server.
+system_accounts="postgres"
+postgres_homedir="/var/lib/postgresql"
+postgres_shell="/bin/sh"
+postgres_descr="PostgreSQL database server user"
+make_dirs="
+ /var/lib/postgresql 0750 postgres postgres
+ /var/lib/postgresql${_major} 0750 postgres postgres"
+
+if [ "$CROSS_BUILD" ]; then
+ configure_args+=" --without-perl --without-python --without-tcl"
+fi
+
+post_patch() {
+ cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
+ _substitute src/common/pg_config.sh.in
+ vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
+}
+
+pre_configure() {
+ _style_configure_args="${configure_args}"
+ configure_args=" "
+ for arg in ${_style_configure_args}; do
+ case $arg in
+ --prefix=*|*dir=*) : ;; # skip
+ *) configure_args+=" $arg"
+ esac
+ done
+ configure_args="--prefix=/${_prefix}
+ --sysconfdir=/${_sysconfdir}
+ --includedir=/usr/include
+ ${configure_args}"
+}
+
+post_build() {
+ make -C contrib ${makejobs}
+}
+
+pre_check() {
+ ln -sr tmp_install/${_prefix} /${_prefix%/*}
+}
+
+post_install() {
+ vmkdir usr/share/man
+ cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
+ for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
+ mv $i ${i%.*}-${_major}.${i##*.}
+ done
+ vmkdir ${_prefix}/share/doc
+ cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
+ vsv ${pkgname}
+ find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
+ vlicense COPYRIGHT
+
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
+ vinstall ${FILESDIR}/postgresql.confd 644 ${_sysconfdir}/default postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/default/postgresql
+ vinstall ${FILESDIR}/postgresql.pam 644 ${_sysconfdir}/pam.d postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/pam.d/postgresql
+ vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
+ 644 ${_sysconfdir}/postgresql postgresql.conf
+ vbin src/common/pg_config.sh
+
+ vsed -i 's/install_bin = .*/install_bin = install/g' \
+ ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
+}
+
+_substitute() {
+ sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
+}
+
+postgresql15-doc_package() {
+ short_desc="PostgreSQL documentation"
+ pkg_install() {
+ vmove ${_prefix}/share/doc
+ }
+}
+
+postgresql-libs_package() {
+ short_desc="PostgreSQL shared libraries"
+ conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0 postgresql14-libs>=0"
+ pkg_install() {
+ vmove "${_prefix}/lib/*.so*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name libpq5\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
+ }
+}
+
+postgresql-libs-devel_package() {
+ depends="postgresql-libs>=${version}_${revision}"
+ short_desc="PostgreSQL shared libraries (development files)"
+ conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0 postgresql14-libs-devel>=0"
+ pkg_install() {
+ vmkdir usr/bin
+ vmkdir usr/lib
+ for f in pg_config ecpg; do
+ vmove ${_prefix}/bin/${f}
+ vmove "usr/share/man/man1/$(basename ${f})*"
+ ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
+ done
+ vmove usr/bin/pg_config.sh
+ vmove usr/include
+ vmove "${_prefix}/lib/*.a"
+ mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
+ vmove usr/share/man/man3
+ vmove ${_prefix}/lib/postgresql/pgxs
+ for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
+ ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
+ done
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pg_config\* -o -name ecpg\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+# XXX disabled for now in cross builds.
+if [ -z "$CROSS_BUILD" ]; then
+
+postgresql15-plperl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Perl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plperl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plperl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-plpython_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Python procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plpython*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plpython\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-pltcl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Tcl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/pltcl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pltcl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+fi # !CROSS_BUILD
+
+postgresql15-client_package() {
+ short_desc="Client frontends programs for PostgreSQL"
+ pkg_install() {
+ for f in clusterdb createdb createuser dropdb \
+ dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
+ vacuumdb; do
+ vmove ${_prefix}/bin/${f}
+ vmove usr/share/man/man1/$(basename ${f})-${_major}.1
+ done
+ vmove usr/share/man/man7
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pgscripts\* -o \
+ -name psql\* -o \
+ -name pg_dump\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
+ ${PKGDESTDIR}/${_prefix}/share
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
+ }
+}
+
+postgresql15-contrib_package() {
+ short_desc="PostgreSQL contributed programs and extensions"
+ pkg_install() {
+ make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
+ }
+}
diff --git a/srcpkgs/postgresql15/update b/srcpkgs/postgresql15/update
new file mode 100644
index 000000000000..160ccf143338
--- /dev/null
+++ b/srcpkgs/postgresql15/update
@@ -0,0 +1,2 @@
+site="https://ftp.postgresql.org/pub/source/"
+pattern="v\K${version%%.*}[\d.]+(?!\w)"
From 5cc055e78ba90874e0c5dd6d12405f4c6722e24e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:52:48 +0200
Subject: [PATCH 4/7] New package: postgresql14-libs-14.5
---
srcpkgs/postgresql14-libs | 1 +
srcpkgs/postgresql14-libs-devel | 1 +
srcpkgs/postgresql14/template | 6 +++---
3 files changed, 5 insertions(+), 3 deletions(-)
create mode 120000 srcpkgs/postgresql14-libs
create mode 120000 srcpkgs/postgresql14-libs-devel
diff --git a/srcpkgs/postgresql14-libs b/srcpkgs/postgresql14-libs
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14-libs-devel b/srcpkgs/postgresql14-libs-devel
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs-devel
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 00584734435c..dc9e2a1924c2 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql14'
pkgname=postgresql14
version=14.5
-revision=1
+revision=2
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@@ -110,7 +110,7 @@ postgresql14-doc_package() {
}
}
-postgresql-libs_package() {
+postgresql14-libs_package() {
short_desc="PostgreSQL shared libraries"
conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0"
pkg_install() {
@@ -124,7 +124,7 @@ postgresql-libs_package() {
}
}
-postgresql-libs-devel_package() {
+postgresql14-libs-devel_package() {
depends="postgresql-libs>=${version}_${revision}"
short_desc="PostgreSQL shared libraries (development files)"
conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0"
From 5e835f88e03f51070e3da6d6a582249b07031d28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:56:13 +0200
Subject: [PATCH 5/7] postgis-postgresql14: build with postgresql14-libs
---
srcpkgs/postgis-postgresql14/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index a7540659ab5a..db8b8776af28 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgis-postgresql14'
pkgname=postgis-postgresql14
version=3.2.1
-revision=2
+revision=3
wrksrc="postgis-${version}"
build_style=gnu-configure
configure_args="
@@ -10,8 +10,8 @@ configure_args="
--with-protobufdir=${XBPS_CROSS_BASE}/usr
--with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ libgdal-tools postgresql14-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql14-libs-devel
proj-devel protobuf-c-devel pcre-devel json-c-devel"
checkdepends="libxslt CUnit-devel"
short_desc="Spatial database extender for PostgreSQL"
From b20a6a3b5db17787dc34452735bc6adc58fc5616 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:06 +0200
Subject: [PATCH 6/7] New package: postgis-postgresql15-3.2.1
---
srcpkgs/postgis | 2 +-
srcpkgs/postgis-postgresql14/template | 6 -----
srcpkgs/postgis-postgresql15/template | 39 +++++++++++++++++++++++++++
srcpkgs/postgis-postgresql15/update | 2 ++
4 files changed, 42 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/postgis-postgresql15/template
create mode 100644 srcpkgs/postgis-postgresql15/update
diff --git a/srcpkgs/postgis b/srcpkgs/postgis
index 07d2a298867d..3bacb4f025ed 120000
--- a/srcpkgs/postgis
+++ b/srcpkgs/postgis
@@ -1 +1 @@
-postgis-postgresql14
\ No newline at end of file
+postgis-postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index db8b8776af28..46b12c29b8d7 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -31,9 +31,3 @@ pre_check() {
# regression tests require running postgresql
vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
}
-
-postgis_package() {
- build_style=meta
- short_desc+=" (meta package)"
- depends="postgis-postgresql14"
-}
diff --git a/srcpkgs/postgis-postgresql15/template b/srcpkgs/postgis-postgresql15/template
new file mode 100644
index 000000000000..25e1230a0497
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/template
@@ -0,0 +1,39 @@
+# Template file for 'postgis-postgresql15'
+pkgname=postgis-postgresql15
+version=3.2.1
+revision=1
+wrksrc="postgis-${version}"
+build_style=gnu-configure
+configure_args="
+ --with-projdir=${XBPS_CROSS_BASE}/usr
+ --with-jsondir=${XBPS_CROSS_BASE}/usr
+ --with-protobufdir=${XBPS_CROSS_BASE}/usr
+ --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
+hostmakedepends="automake libtool perl pkg-config geos
+ libgdal-tools postgresql-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ proj-devel protobuf-c-devel pcre-devel json-c-devel"
+checkdepends="libxslt CUnit-devel"
+short_desc="Spatial database extender for PostgreSQL"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="GPL-2.0-or-later"
+homepage="https://postgis.net/"
+changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
+distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
+checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+nocross="FIXME: Cannot run test program to determine PROJ version"
+
+pre_configure() {
+ ./autogen.sh
+}
+
+pre_check() {
+ # regression tests require running postgresql
+ vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}
+
+postgis_package() {
+ build_style=meta
+ short_desc+=" (meta package)"
+ depends="${sourcepkg}"
+}
diff --git a/srcpkgs/postgis-postgresql15/update b/srcpkgs/postgis-postgresql15/update
new file mode 100644
index 000000000000..e5577e6b068a
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/update
@@ -0,0 +1,2 @@
+pkgname=postgis
+ignore="*alpha* *beta* *rc*"
From e40a82f3d1f4c15d4556932d2d6cea9beb4171c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:19 +0200
Subject: [PATCH 7/7] postgresql: update to 15.
---
srcpkgs/postgresql/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template
index 349e0c92ac16..99f8adc3d420 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=14
-revision=2
+version=15
+revision=1
build_style=meta
depends="postgresql${version}"
short_desc="PostgreSQL server meta package"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Postgresql 15
2022-10-13 21:13 [PR PATCH] Postgresql 15 Chocimier
@ 2023-01-12 2:29 ` github-actions
2023-01-17 20:13 ` [PR PATCH] [Updated] " Chocimier
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: github-actions @ 2023-01-12 2:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/39938#issuecomment-1379733350
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] Postgresql 15
2022-10-13 21:13 [PR PATCH] Postgresql 15 Chocimier
2023-01-12 2:29 ` github-actions
@ 2023-01-17 20:13 ` Chocimier
2023-02-04 18:52 ` Chocimier
2023-02-04 19:48 ` [PR PATCH] [Merged]: " Chocimier
3 siblings, 0 replies; 5+ messages in thread
From: Chocimier @ 2023-01-17 20:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgresql15
https://github.com/void-linux/void-packages/pull/39938
Postgresql 15
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39938.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgresql15-39938.patch --]
[-- Type: text/x-diff, Size: 58017 bytes --]
From 01a093bd01f760f45823e1c1f9037cb613989537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:19:15 +0200
Subject: [PATCH 1/7] postgis-postgresql13: remove
---
srcpkgs/postgis-postgresql13/template | 32 ---------------------------
srcpkgs/postgis-postgresql13/update | 2 --
2 files changed, 34 deletions(-)
delete mode 100644 srcpkgs/postgis-postgresql13/template
delete mode 100644 srcpkgs/postgis-postgresql13/update
diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
deleted file mode 100644
index 6a6cedb505e7..000000000000
--- a/srcpkgs/postgis-postgresql13/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'postgis-postgresql13'
-pkgname=postgis-postgresql13
-version=3.2.1
-revision=2
-build_style=gnu-configure
-configure_args="
- --with-projdir=${XBPS_CROSS_BASE}/usr
- --with-jsondir=${XBPS_CROSS_BASE}/usr
- --with-protobufdir=${XBPS_CROSS_BASE}/usr
- --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
-hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql13-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql13-libs-devel
- proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt CUnit-devel"
-short_desc="Spatial database extender for PostgreSQL"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="GPL-2.0-or-later"
-homepage="https://postgis.net/"
-changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
-distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
-nocross="FIXME: Cannot run test program to determine PROJ version"
-
-pre_configure() {
- ./autogen.sh
-}
-
-pre_check() {
- # regression tests require running postgresql
- vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
-}
diff --git a/srcpkgs/postgis-postgresql13/update b/srcpkgs/postgis-postgresql13/update
deleted file mode 100644
index e5577e6b068a..000000000000
--- a/srcpkgs/postgis-postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgname=postgis
-ignore="*alpha* *beta* *rc*"
From c5d91425ae15757417291568e882b09d9fa7c10b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:22:27 +0200
Subject: [PATCH 2/7] postgresql13: remove
---
srcpkgs/postgresql13-client | 1 -
srcpkgs/postgresql13-contrib | 1 -
srcpkgs/postgresql13-doc | 1 -
srcpkgs/postgresql13-libs | 1 -
srcpkgs/postgresql13-libs-devel | 1 -
srcpkgs/postgresql13-plperl | 1 -
srcpkgs/postgresql13-plpython | 1 -
srcpkgs/postgresql13-pltcl | 1 -
srcpkgs/postgresql13/files/pg_config.sh.in | 143 -----------
srcpkgs/postgresql13/files/postgresql.confd | 17 --
srcpkgs/postgresql13/files/postgresql.pam | 3 -
.../postgresql13/files/postgresql13/control/t | 2 -
.../postgresql13/files/postgresql13/log/run | 2 -
srcpkgs/postgresql13/files/postgresql13/run | 27 ---
srcpkgs/postgresql13/files/profile.sh | 14 --
.../patches/pg_config-cross-value.patch | 45 ----
srcpkgs/postgresql13/patches/relocate.patch | 22 --
srcpkgs/postgresql13/template | 228 ------------------
srcpkgs/postgresql13/update | 2 -
19 files changed, 513 deletions(-)
delete mode 120000 srcpkgs/postgresql13-client
delete mode 120000 srcpkgs/postgresql13-contrib
delete mode 120000 srcpkgs/postgresql13-doc
delete mode 120000 srcpkgs/postgresql13-libs
delete mode 120000 srcpkgs/postgresql13-libs-devel
delete mode 120000 srcpkgs/postgresql13-plperl
delete mode 120000 srcpkgs/postgresql13-plpython
delete mode 120000 srcpkgs/postgresql13-pltcl
delete mode 100644 srcpkgs/postgresql13/files/pg_config.sh.in
delete mode 100644 srcpkgs/postgresql13/files/postgresql.confd
delete mode 100644 srcpkgs/postgresql13/files/postgresql.pam
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/control/t
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/log/run
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/run
delete mode 100644 srcpkgs/postgresql13/files/profile.sh
delete mode 100644 srcpkgs/postgresql13/patches/pg_config-cross-value.patch
delete mode 100644 srcpkgs/postgresql13/patches/relocate.patch
delete mode 100644 srcpkgs/postgresql13/template
delete mode 100644 srcpkgs/postgresql13/update
diff --git a/srcpkgs/postgresql13-client b/srcpkgs/postgresql13-client
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-client
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-contrib b/srcpkgs/postgresql13-contrib
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-contrib
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-doc b/srcpkgs/postgresql13-doc
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-doc
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs b/srcpkgs/postgresql13-libs
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs-devel b/srcpkgs/postgresql13-libs-devel
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs-devel
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plperl b/srcpkgs/postgresql13-plperl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plperl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plpython b/srcpkgs/postgresql13-plpython
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plpython
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-pltcl b/srcpkgs/postgresql13-pltcl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-pltcl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13/files/pg_config.sh.in b/srcpkgs/postgresql13/files/pg_config.sh.in
deleted file mode 100644
index 3d20d215d0b3..000000000000
--- a/srcpkgs/postgresql13/files/pg_config.sh.in
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-# Released to Public Domain by Doan Tran Cong Danh
-
-print() {
- printf '%s\n' "$@"
-}
-
-sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
-
-BINDIR="$sysroot/@PREFIX@/bin"
-DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-INCLUDEDIR="$sysroot/usr/include"
-PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
-INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
-LIBDIR="$sysroot/@PREFIX@/lib"
-PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
-LOCALEDIR="$sysroot/@PREFIX@/share/locale"
-MANDIR="$sysroot/@PREFIX@/share/man"
-SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
-SYSCONFDIR="$sysroot/@PREFIX@/etc/postgresql"
-PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
-
-CONFIGURE="@configure_args@"
-CC="@CC@"
-CPPFLAGS="@CPPFLAGS@"
-CFLAGS="@CFLAGS@"
-CFLAGS_SL="@CFLAGS_SL@"
-LDFLAGS="@LDFLAGS@"
-LDFLAGS_EX="@LDFLAGS_EX@"
-LDFLAGS_SL="@LDFLAGS_SL@"
-LIBS="@LIBS@"
-VERSION="PostgreSQL @FULL_VERSION@"
-
-if [ "$sysroot" != "/" ]; then
- CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
-fi
-
-usage() {
- cat <<-EOF
- $0 provides information about the installed version of PostgreSQL.
-
- Usage:
- $0 [OPTION]...
-
- Options:
- --bindir show location of user executables
- --docdir show location of documentation files
- --htmldir show location of HTML documentation files
- --includedir show location of C header files of the client interfaces
- --pkgincludedir show location of other C header files
- --includedir-server show location of C header files for the server
- --libdir show location of object code libraries
- --pkglibdir show location of dynamically loadable modules
- --localedir show location of locale support files
- --mandir show location of manual pages
- --sharedir show location of architecture-independent support files
- --sysconfdir show location of system-wide configuration files
- --pgxs show location of extension makefile
- --configure show options given to PostgreSQL was built
- --cc show CC value used when PostgreSQL was built
- --cppflags show CPPFLAGS value used when PostgreSQL was built
- --cflags show CFLAGS value used when PostgreSQL was built
- --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
- --ldflags show LDFLAGS value used when PostgreSQL was built
- --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
- --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
- --libs show LIBS value used when PostgreSQL was built
- --version show the PostgreSQL version
- -?, --help show this help, then exit
-
- With no arguments, all known items are shown.
-
- Report bugs to <pgsql-bugs@postgresql.org>.
- EOF
-}
-
-if test $# -eq 0; then
- cat <<-EOF
- BINDIR = $BINDIR
- DOCDIR = $DOCDIR
- HTMLDIR = $HTMLDIR
- INCLUDEDIR = $INCLUDEDIR
- PKGINCLUDEDIR = $PKGINCLUDEDIR
- INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
- LIBDIR = $LIBDIR
- PKGLIBDIR = $PKGLIBDIR
- LOCALEDIR = $LOCALEDIR
- MANDIR = $MANDIR
- SHAREDIR = $SHAREDIR
- SYSCONFDIR = $SYSCONFDIR
- PGXS = $PGXS
- CONFIGURE = $CONFIGURE
- CC = $CC
- CPPFLAGS = $CPPFLAGS
- CFLAGS = $CFLAGS
- CFLAGS_SL = $CFLAGS_SL
- LDFLAGS = $LDFLAGS
- LDFLAGS_EX = $LDFLAGS_EX
- LDFLAGS_SL = $LDFLAGS_SL
- LIBS = $LIBS
- VERSION = $VERSION
- EOF
-fi
-
-for arg
-do
- if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
- usage
- exit 0
- fi
-done
-
-for arg
-do
- case "$arg" in
- --bindir) print "$BINDIR" ;;
- --docdir) print "$DOCDIR" ;;
- --htmldir) print "$HTMLDIR" ;;
- --includedir) print "$INCLUDEDIR" ;;
- --pkgincludedir) print "$PKGINCLUDEDIR" ;;
- --includedir-server) print "$INCLUDEDIR_SERVER" ;;
- --libdir) print "$LIBDIR" ;;
- --pkglibdir) print "$PKGLIBDIR" ;;
- --localedir) print "$LOCALEDIR" ;;
- --mandir) print "$MANDIR" ;;
- --sharedir) print "$SHAREDIR" ;;
- --sysconfdir) print "$SYSCONFDIR" ;;
- --pgxs) print "$PGXS" ;;
- --configure) print "$CONFIGURE" ;;
- --cc) print "$CC" ;;
- --cppflags) print "$CPPFLAGS" ;;
- --cflags) print "$CFLAGS" ;;
- --cflags_sl) print "$CFLAGS_SL" ;;
- --ldflags) print "$LDFLAGS" ;;
- --ldflags_ex) print "$LDFLAGS_EX" ;;
- --ldflags_sl) print "$LDFLAGS_SL" ;;
- --libs) print "$LIBS" ;;
- --version) print "$VERSION" ;;
- esac
-done
diff --git a/srcpkgs/postgresql13/files/postgresql.confd b/srcpkgs/postgresql13/files/postgresql.confd
deleted file mode 100644
index fe7106626fa5..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.confd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Configuration file for the PostgreSQL server.
-
-# PostgreSQL's database directory
-PGROOT="/var/lib/postgresql@VERSION@"
-
-# PostgreSQL's log file.
-PGLOG="/var/log/postgresql@VERSION@.log"
-
-# Passed to initdb if necessary
-INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
-
-# Extra options to run postmaster with, e.g.:
-# -N is the maximal number of client connections
-# -B is the number of shared buffers and has to be at least 2x the value for -N
-# Please read the man-page to postmaster for more options. Many of these options
-# can be set directly in the configuration-file.
-#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql13/files/postgresql.pam b/srcpkgs/postgresql13/files/postgresql.pam
deleted file mode 100644
index 53724d1f86a7..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.pam
+++ /dev/null
@@ -1,3 +0,0 @@
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/srcpkgs/postgresql13/files/postgresql13/control/t b/srcpkgs/postgresql13/files/postgresql13/control/t
deleted file mode 100755
index dcedfaa20180..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/control/t
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql13/files/postgresql13/log/run b/srcpkgs/postgresql13/files/postgresql13/log/run
deleted file mode 100755
index 815d9c974079..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/log/run
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql13/files/postgresql13/run b/srcpkgs/postgresql13/files/postgresql13/run
deleted file mode 100755
index 9d044e9a1ce1..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/run
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-. /@PREFIX@/etc/default/postgresql
-: ${PGDATA:="$PGROOT/data"}
-
-if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
- echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
- ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
-fi
-
-
-if [ ! -d "$PGDATA" ]; then
- echo "Initializing database in $PGDATA"
-
- mkdir -p "$PGDATA" || exit 1
- chown -R postgres:postgres "$PGDATA"
- chmod 0700 "$PGDATA"
- su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
- rm -fr "$PGDATA"
- exit 1
- }
-
- if [ -f /@PREFIX@/etc/postgresql/postgresql.conf ]; then
- ln -sf /@PREFIX@/etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
- fi
-fi
-
-exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql13/files/profile.sh b/srcpkgs/postgresql13/files/profile.sh
deleted file mode 100644
index 54be2ca50a4f..000000000000
--- a/srcpkgs/postgresql13/files/profile.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-appendpath () {
- case ":$PATH:" in
- *:"$1":*)
- ;;
- *)
- PATH="${PATH:+$PATH:}$1"
- esac
-}
-
-appendpath '/@PREFIX@/bin'
-
-unset appendpath
-
-export PATH
diff --git a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch b/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
deleted file mode 100644
index cc0a9fc19133..000000000000
--- a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Sources: Doan Tran Cong Danh
-Upstream: No
- - First part needs to be rework in configure script to be usable
- upstream
- - Second part would un-usable for Windows
-diff --git src/common/Makefile src/common/Makefile
-index ec04710..2af845f 100644
---- a/src/common/Makefile
-+++ b/src/common/Makefile
-@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
-
- # don't include subdirectory-path-dependent -I and -L switches
- STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
-+STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
-+STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
- STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
-+STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
- override CPPFLAGS += -DVAL_CC="\"$(CC)\""
- override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
--override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
-+override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
- override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
- override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
- override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
-@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
- GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
- GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
-
--all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
-+all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
-+
-+pg_config.sh: pg_config.sh.in
-+ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
-+ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
-+ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
-+ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
-+ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
-+ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
-+ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
-+ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
-+ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
-+ $< >$@
-
- distprep: kwlist_d.h
-
diff --git a/srcpkgs/postgresql13/patches/relocate.patch b/srcpkgs/postgresql13/patches/relocate.patch
deleted file mode 100644
index d2cc14281e3a..000000000000
--- a/srcpkgs/postgresql13/patches/relocate.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
-Date: Sat, 18 Jan 2020 12:19:45 +0100
-Subject: [PATCH] relocate
-
-
-diff --git src/port/path.c src/port/path.c
-index 710988b..20dc57d 100644
---- a/src/port/path.c
-+++ b/src/port/path.c
-@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
- int tail_len;
- int i;
-
-+ goto no_match; // we relocate only binaries
-+
- /*
- * Determine the common prefix --- note we require it to end on a
- * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
---
-2.23.0
-
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
deleted file mode 100644
index 0f1ea0072b11..000000000000
--- a/srcpkgs/postgresql13/template
+++ /dev/null
@@ -1,228 +0,0 @@
-# Template file for 'postgresql13'
-pkgname=postgresql13
-version=13.8
-revision=3
-build_style=gnu-configure
-make_build_target=world
-_major="${version%%.*}"
-_prefix="usr/lib/psql${_major}"
-configure_args="--with-openssl --with-python
- --with-pam --enable-thread-safety
- --with-perl --with-tcl --without-ldap --without-gssapi
- --without-bonjour --with-libxml --with-libxslt
- --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
-hostmakedepends="docbook2x gettext flex openjade"
-makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
- python3-devel readline-devel tcl-devel"
-short_desc="Sophisticated open-source Object-Relational DBMS"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="PostgreSQL"
-homepage="https://www.postgresql.org"
-changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
-distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
-checksum=73876fdd3a517087340458dca4ce15b8d2a4dbceb334c0441424551ae6c4cded
-make_check=ci-skip # Postgres server can't be run as root
-
-conf_files="
- /${_prefix}/etc/default/postgresql
- /${_prefix}/etc/pam.d/postgresql
- /${_prefix}/etc/postgresql/postgresql.conf
-"
-
-# Create 'postgres' user for the server.
-system_accounts="postgres"
-postgres_homedir="/var/lib/postgresql"
-postgres_shell="/bin/sh"
-postgres_descr="PostgreSQL database server user"
-make_dirs="
- /var/lib/postgresql 0750 postgres postgres
- /var/lib/postgresql${_major} 0750 postgres postgres"
-
-if [ "$CROSS_BUILD" ]; then
- configure_args+=" --without-perl --without-python --without-tcl"
-fi
-
-post_patch() {
- cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
- _substitute src/common/pg_config.sh.in
- vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
-}
-
-pre_configure() {
- _style_configure_args="${configure_args}"
- configure_args=" "
- for arg in ${_style_configure_args}; do
- case $arg in
- --prefix=*|*dir=*) : ;; # skip
- *) configure_args+=" $arg"
- esac
- done
- configure_args="--prefix=/${_prefix}
- --sysconfdir=/${_prefix}/etc
- --includedir=/usr/include
- ${configure_args}"
-}
-
-post_build() {
- make -C contrib ${makejobs}
-}
-
-pre_check() {
- ln -sr tmp_install/${_prefix} /${_prefix%/*}
-}
-
-post_install() {
- vmkdir usr/share/man
- cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
- for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
- mv $i ${i%.*}-${_major}.${i##*.}
- done
- vmkdir ${_prefix}/share/doc
- cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
- vsv ${pkgname}
- find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
- vlicense COPYRIGHT
-
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
- vinstall ${FILESDIR}/postgresql.confd 644 ${_prefix}/etc/default postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/default/postgresql
- vinstall ${FILESDIR}/postgresql.pam 644 ${_prefix}/etc/pam.d postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/pam.d/postgresql
- vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
- 644 ${_prefix}/etc/postgresql postgresql.conf
- vbin src/common/pg_config.sh
-
- vsed -i 's/install_bin = .*/install_bin = install/g' \
- ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
-}
-
-_substitute() {
- sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
-}
-
-postgresql13-doc_package() {
- short_desc="PostgreSQL documentation"
- pkg_install() {
- vmove ${_prefix}/share/doc
- }
-}
-
-postgresql13-libs_package() {
- short_desc="PostgreSQL shared libraries"
- conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0"
- pkg_install() {
- vmove "${_prefix}/lib/*.so*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name libpq5\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
- }
-}
-
-postgresql13-libs-devel_package() {
- depends="postgresql-libs>=${version}_${revision} openssl-devel"
- short_desc="PostgreSQL shared libraries (development files)"
- conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0"
- pkg_install() {
- vmkdir usr/bin
- vmkdir usr/lib
- for f in pg_config ecpg; do
- vmove ${_prefix}/bin/${f}
- vmove "usr/share/man/man1/$(basename ${f})*"
- ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
- done
- vmove usr/bin/pg_config.sh
- vmove usr/include
- vmove "${_prefix}/lib/*.a"
- mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
- vmove usr/share/man/man3
- vmove ${_prefix}/lib/postgresql/pgxs
- for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
- ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
- done
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pg_config\* -o -name ecpg\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-# XXX disabled for now in cross builds.
-if [ -z "$CROSS_BUILD" ]; then
-
-postgresql13-plperl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Perl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plperl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plperl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-plpython_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Python procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plpython*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plpython\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-pltcl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Tcl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/pltcl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pltcl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-fi # !CROSS_BUILD
-
-postgresql13-client_package() {
- short_desc="Client frontends programs for PostgreSQL"
- pkg_install() {
- for f in clusterdb createdb createuser dropdb \
- dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
- vacuumdb; do
- vmove ${_prefix}/bin/${f}
- vmove usr/share/man/man1/$(basename ${f})-${_major}.1
- done
- vmove usr/share/man/man7
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pgscripts\* -o \
- -name psql\* -o \
- -name pg_dump\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
- ${PKGDESTDIR}/${_prefix}/share
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
- }
-}
-
-postgresql13-contrib_package() {
- short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
- }
-}
diff --git a/srcpkgs/postgresql13/update b/srcpkgs/postgresql13/update
deleted file mode 100644
index 160ccf143338..000000000000
--- a/srcpkgs/postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://ftp.postgresql.org/pub/source/"
-pattern="v\K${version%%.*}[\d.]+(?!\w)"
From 39edf18a1e86d02a034d879ec13adbd391d7bfdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:49:49 +0200
Subject: [PATCH 3/7] New package: postgresql15-15.1
---
common/shlibs | 8 +-
srcpkgs/postgresql-libs | 2 +-
srcpkgs/postgresql-libs-devel | 2 +-
srcpkgs/postgresql15-client | 1 +
srcpkgs/postgresql15-contrib | 1 +
srcpkgs/postgresql15-doc | 1 +
srcpkgs/postgresql15-plperl | 1 +
srcpkgs/postgresql15-plpython | 1 +
srcpkgs/postgresql15-pltcl | 1 +
srcpkgs/postgresql15/files/pg_config.sh.in | 143 +++++++++++
srcpkgs/postgresql15/files/postgresql.confd | 17 ++
srcpkgs/postgresql15/files/postgresql.pam | 3 +
.../postgresql15/files/postgresql15/control/t | 2 +
.../postgresql15/files/postgresql15/log/run | 2 +
srcpkgs/postgresql15/files/postgresql15/run | 27 ++
srcpkgs/postgresql15/files/profile.sh | 14 ++
.../patches/pg_config-cross-value.patch | 45 ++++
srcpkgs/postgresql15/patches/relocate.patch | 22 ++
srcpkgs/postgresql15/template | 230 ++++++++++++++++++
srcpkgs/postgresql15/update | 2 +
20 files changed, 519 insertions(+), 6 deletions(-)
create mode 120000 srcpkgs/postgresql15-client
create mode 120000 srcpkgs/postgresql15-contrib
create mode 120000 srcpkgs/postgresql15-doc
create mode 120000 srcpkgs/postgresql15-plperl
create mode 120000 srcpkgs/postgresql15-plpython
create mode 120000 srcpkgs/postgresql15-pltcl
create mode 100644 srcpkgs/postgresql15/files/pg_config.sh.in
create mode 100644 srcpkgs/postgresql15/files/postgresql.confd
create mode 100644 srcpkgs/postgresql15/files/postgresql.pam
create mode 100755 srcpkgs/postgresql15/files/postgresql15/control/t
create mode 100755 srcpkgs/postgresql15/files/postgresql15/log/run
create mode 100755 srcpkgs/postgresql15/files/postgresql15/run
create mode 100644 srcpkgs/postgresql15/files/profile.sh
create mode 100644 srcpkgs/postgresql15/patches/pg_config-cross-value.patch
create mode 100644 srcpkgs/postgresql15/patches/relocate.patch
create mode 100644 srcpkgs/postgresql15/template
create mode 100644 srcpkgs/postgresql15/update
diff --git a/common/shlibs b/common/shlibs
index 0a803960ab55..2cbd12222a08 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -568,10 +568,10 @@ libKF5PurposeWidgets.so.5 purpose-5.48.0_1
libKF5Purpose.so.5 purpose-5.48.0_1
libKF5PulseAudioQt.so.3 pulseaudio-qt-1.3_1
libReviewboardHelpers.so.5 purpose-5.48.0_1
-libecpg_compat.so.3 postgresql-libs-14.0_1
-libecpg.so.6 postgresql-libs-14.0_1
-libpgtypes.so.3 postgresql-libs-14.0_1
-libpq.so.5 postgresql-libs-14.0_1
+libecpg_compat.so.3 postgresql-libs-15.0_1
+libecpg.so.6 postgresql-libs-15.0_1
+libpgtypes.so.3 postgresql-libs-15.0_1
+libpq.so.5 postgresql-libs-15.0_1
libmypaint.so.0 libmypaint-1.6.1_1
libgssapi_krb5.so.2 mit-krb5-libs-1.8_1
libgssrpc.so.4 mit-krb5-libs-1.8_1
diff --git a/srcpkgs/postgresql-libs b/srcpkgs/postgresql-libs
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs
+++ b/srcpkgs/postgresql-libs
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql-libs-devel b/srcpkgs/postgresql-libs-devel
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs-devel
+++ b/srcpkgs/postgresql-libs-devel
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-client b/srcpkgs/postgresql15-client
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-client
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-contrib b/srcpkgs/postgresql15-contrib
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-contrib
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-doc b/srcpkgs/postgresql15-doc
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-doc
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plperl b/srcpkgs/postgresql15-plperl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plperl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plpython b/srcpkgs/postgresql15-plpython
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plpython
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-pltcl b/srcpkgs/postgresql15-pltcl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-pltcl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15/files/pg_config.sh.in b/srcpkgs/postgresql15/files/pg_config.sh.in
new file mode 100644
index 000000000000..68068a82e01e
--- /dev/null
+++ b/srcpkgs/postgresql15/files/pg_config.sh.in
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Released to Public Domain by Doan Tran Cong Danh
+
+print() {
+ printf '%s\n' "$@"
+}
+
+sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
+
+BINDIR="$sysroot/@PREFIX@/bin"
+DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+INCLUDEDIR="$sysroot/usr/include"
+PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
+INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
+LIBDIR="$sysroot/@PREFIX@/lib"
+PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
+LOCALEDIR="$sysroot/@PREFIX@/share/locale"
+MANDIR="$sysroot/@PREFIX@/share/man"
+SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
+SYSCONFDIR="$sysroot/etc/psql@VERSION@/postgresql"
+PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
+
+CONFIGURE="@configure_args@"
+CC="@CC@"
+CPPFLAGS="@CPPFLAGS@"
+CFLAGS="@CFLAGS@"
+CFLAGS_SL="@CFLAGS_SL@"
+LDFLAGS="@LDFLAGS@"
+LDFLAGS_EX="@LDFLAGS_EX@"
+LDFLAGS_SL="@LDFLAGS_SL@"
+LIBS="@LIBS@"
+VERSION="PostgreSQL @FULL_VERSION@"
+
+if [ "$sysroot" != "/" ]; then
+ CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
+fi
+
+usage() {
+ cat <<-EOF
+ $0 provides information about the installed version of PostgreSQL.
+
+ Usage:
+ $0 [OPTION]...
+
+ Options:
+ --bindir show location of user executables
+ --docdir show location of documentation files
+ --htmldir show location of HTML documentation files
+ --includedir show location of C header files of the client interfaces
+ --pkgincludedir show location of other C header files
+ --includedir-server show location of C header files for the server
+ --libdir show location of object code libraries
+ --pkglibdir show location of dynamically loadable modules
+ --localedir show location of locale support files
+ --mandir show location of manual pages
+ --sharedir show location of architecture-independent support files
+ --sysconfdir show location of system-wide configuration files
+ --pgxs show location of extension makefile
+ --configure show options given to PostgreSQL was built
+ --cc show CC value used when PostgreSQL was built
+ --cppflags show CPPFLAGS value used when PostgreSQL was built
+ --cflags show CFLAGS value used when PostgreSQL was built
+ --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
+ --ldflags show LDFLAGS value used when PostgreSQL was built
+ --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
+ --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
+ --libs show LIBS value used when PostgreSQL was built
+ --version show the PostgreSQL version
+ -?, --help show this help, then exit
+
+ With no arguments, all known items are shown.
+
+ Report bugs to <pgsql-bugs@postgresql.org>.
+ EOF
+}
+
+if test $# -eq 0; then
+ cat <<-EOF
+ BINDIR = $BINDIR
+ DOCDIR = $DOCDIR
+ HTMLDIR = $HTMLDIR
+ INCLUDEDIR = $INCLUDEDIR
+ PKGINCLUDEDIR = $PKGINCLUDEDIR
+ INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
+ LIBDIR = $LIBDIR
+ PKGLIBDIR = $PKGLIBDIR
+ LOCALEDIR = $LOCALEDIR
+ MANDIR = $MANDIR
+ SHAREDIR = $SHAREDIR
+ SYSCONFDIR = $SYSCONFDIR
+ PGXS = $PGXS
+ CONFIGURE = $CONFIGURE
+ CC = $CC
+ CPPFLAGS = $CPPFLAGS
+ CFLAGS = $CFLAGS
+ CFLAGS_SL = $CFLAGS_SL
+ LDFLAGS = $LDFLAGS
+ LDFLAGS_EX = $LDFLAGS_EX
+ LDFLAGS_SL = $LDFLAGS_SL
+ LIBS = $LIBS
+ VERSION = $VERSION
+ EOF
+fi
+
+for arg
+do
+ if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
+ usage
+ exit 0
+ fi
+done
+
+for arg
+do
+ case "$arg" in
+ --bindir) print "$BINDIR" ;;
+ --docdir) print "$DOCDIR" ;;
+ --htmldir) print "$HTMLDIR" ;;
+ --includedir) print "$INCLUDEDIR" ;;
+ --pkgincludedir) print "$PKGINCLUDEDIR" ;;
+ --includedir-server) print "$INCLUDEDIR_SERVER" ;;
+ --libdir) print "$LIBDIR" ;;
+ --pkglibdir) print "$PKGLIBDIR" ;;
+ --localedir) print "$LOCALEDIR" ;;
+ --mandir) print "$MANDIR" ;;
+ --sharedir) print "$SHAREDIR" ;;
+ --sysconfdir) print "$SYSCONFDIR" ;;
+ --pgxs) print "$PGXS" ;;
+ --configure) print "$CONFIGURE" ;;
+ --cc) print "$CC" ;;
+ --cppflags) print "$CPPFLAGS" ;;
+ --cflags) print "$CFLAGS" ;;
+ --cflags_sl) print "$CFLAGS_SL" ;;
+ --ldflags) print "$LDFLAGS" ;;
+ --ldflags_ex) print "$LDFLAGS_EX" ;;
+ --ldflags_sl) print "$LDFLAGS_SL" ;;
+ --libs) print "$LIBS" ;;
+ --version) print "$VERSION" ;;
+ esac
+done
diff --git a/srcpkgs/postgresql15/files/postgresql.confd b/srcpkgs/postgresql15/files/postgresql.confd
new file mode 100644
index 000000000000..fe7106626fa5
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.confd
@@ -0,0 +1,17 @@
+# Configuration file for the PostgreSQL server.
+
+# PostgreSQL's database directory
+PGROOT="/var/lib/postgresql@VERSION@"
+
+# PostgreSQL's log file.
+PGLOG="/var/log/postgresql@VERSION@.log"
+
+# Passed to initdb if necessary
+INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
+
+# Extra options to run postmaster with, e.g.:
+# -N is the maximal number of client connections
+# -B is the number of shared buffers and has to be at least 2x the value for -N
+# Please read the man-page to postmaster for more options. Many of these options
+# can be set directly in the configuration-file.
+#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql15/files/postgresql.pam b/srcpkgs/postgresql15/files/postgresql.pam
new file mode 100644
index 000000000000..53724d1f86a7
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/srcpkgs/postgresql15/files/postgresql15/control/t b/srcpkgs/postgresql15/files/postgresql15/control/t
new file mode 100755
index 000000000000..dcedfaa20180
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/control/t
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql15/files/postgresql15/log/run b/srcpkgs/postgresql15/files/postgresql15/log/run
new file mode 100755
index 000000000000..815d9c974079
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql15/files/postgresql15/run b/srcpkgs/postgresql15/files/postgresql15/run
new file mode 100755
index 000000000000..3aee9440e847
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/run
@@ -0,0 +1,27 @@
+#!/bin/sh
+. /etc/psql@VERSION@/default/postgresql
+: ${PGDATA:="$PGROOT/data"}
+
+if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
+ echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
+ ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
+fi
+
+
+if [ ! -d "$PGDATA" ]; then
+ echo "Initializing database in $PGDATA"
+
+ mkdir -p "$PGDATA" || exit 1
+ chown -R postgres:postgres "$PGDATA"
+ chmod 0700 "$PGDATA"
+ su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
+ rm -fr "$PGDATA"
+ exit 1
+ }
+
+ if [ -f /etc/psql@VERSION@/postgresql/postgresql.conf ]; then
+ ln -sf /etc/psql@VERSION@/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
+ fi
+fi
+
+exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql15/files/profile.sh b/srcpkgs/postgresql15/files/profile.sh
new file mode 100644
index 000000000000..54be2ca50a4f
--- /dev/null
+++ b/srcpkgs/postgresql15/files/profile.sh
@@ -0,0 +1,14 @@
+appendpath () {
+ case ":$PATH:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH="${PATH:+$PATH:}$1"
+ esac
+}
+
+appendpath '/@PREFIX@/bin'
+
+unset appendpath
+
+export PATH
diff --git a/srcpkgs/postgresql15/patches/pg_config-cross-value.patch b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
new file mode 100644
index 000000000000..cc0a9fc19133
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
@@ -0,0 +1,45 @@
+Sources: Doan Tran Cong Danh
+Upstream: No
+ - First part needs to be rework in configure script to be usable
+ upstream
+ - Second part would un-usable for Windows
+diff --git src/common/Makefile src/common/Makefile
+index ec04710..2af845f 100644
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
+
+ # don't include subdirectory-path-dependent -I and -L switches
+ STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
++STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
++STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
+ STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
++STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
+ override CPPFLAGS += -DVAL_CC="\"$(CC)\""
+ override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
+-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
++override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
+ override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
+ override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
+ override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
+@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
+ GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
+ GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
+
+-all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
++all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
++
++pg_config.sh: pg_config.sh.in
++ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
++ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
++ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
++ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
++ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
++ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
++ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
++ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
++ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
++ $< >$@
+
+ distprep: kwlist_d.h
+
diff --git a/srcpkgs/postgresql15/patches/relocate.patch b/srcpkgs/postgresql15/patches/relocate.patch
new file mode 100644
index 000000000000..d2cc14281e3a
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/relocate.patch
@@ -0,0 +1,22 @@
+From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Sat, 18 Jan 2020 12:19:45 +0100
+Subject: [PATCH] relocate
+
+
+diff --git src/port/path.c src/port/path.c
+index 710988b..20dc57d 100644
+--- a/src/port/path.c
++++ b/src/port/path.c
+@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
+ int tail_len;
+ int i;
+
++ goto no_match; // we relocate only binaries
++
+ /*
+ * Determine the common prefix --- note we require it to end on a
+ * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
+--
+2.23.0
+
diff --git a/srcpkgs/postgresql15/template b/srcpkgs/postgresql15/template
new file mode 100644
index 000000000000..0618740e6346
--- /dev/null
+++ b/srcpkgs/postgresql15/template
@@ -0,0 +1,230 @@
+# Template file for 'postgresql15'
+pkgname=postgresql15
+version=15.1
+revision=1
+wrksrc="postgresql-${version}"
+build_style=gnu-configure
+make_build_target=world
+_major="${version%%.*}"
+_prefix="usr/lib/psql${_major}"
+_sysconfdir="etc/psql${_major}"
+configure_args="--with-openssl --with-python
+ --with-pam --enable-thread-safety
+ --with-perl --with-tcl --without-ldap --without-gssapi
+ --without-bonjour --with-libxml --with-libxslt
+ --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
+hostmakedepends="docbook2x gettext flex openjade"
+makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
+ python3-devel readline-devel tcl-devel"
+short_desc="Sophisticated open-source Object-Relational DBMS"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="PostgreSQL"
+homepage="https://www.postgresql.org"
+changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
+distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
+checksum=64fdf23d734afad0dfe4077daca96ac51dcd697e68ae2d3d4ca6c45cb14e21ae
+make_check=ci-skip # Postgres server can't be run as root
+
+conf_files="
+ /${_sysconfdir}/default/postgresql
+ /${_sysconfdir}/pam.d/postgresql
+ /${_sysconfdir}/postgresql/postgresql.conf
+"
+
+# Create 'postgres' user for the server.
+system_accounts="postgres"
+postgres_homedir="/var/lib/postgresql"
+postgres_shell="/bin/sh"
+postgres_descr="PostgreSQL database server user"
+make_dirs="
+ /var/lib/postgresql 0750 postgres postgres
+ /var/lib/postgresql${_major} 0750 postgres postgres"
+
+if [ "$CROSS_BUILD" ]; then
+ configure_args+=" --without-perl --without-python --without-tcl"
+fi
+
+post_patch() {
+ cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
+ _substitute src/common/pg_config.sh.in
+ vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
+}
+
+pre_configure() {
+ _style_configure_args="${configure_args}"
+ configure_args=" "
+ for arg in ${_style_configure_args}; do
+ case $arg in
+ --prefix=*|*dir=*) : ;; # skip
+ *) configure_args+=" $arg"
+ esac
+ done
+ configure_args="--prefix=/${_prefix}
+ --sysconfdir=/${_sysconfdir}
+ --includedir=/usr/include
+ ${configure_args}"
+}
+
+post_build() {
+ make -C contrib ${makejobs}
+}
+
+pre_check() {
+ ln -sr tmp_install/${_prefix} /${_prefix%/*}
+}
+
+post_install() {
+ vmkdir usr/share/man
+ cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
+ for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
+ mv $i ${i%.*}-${_major}.${i##*.}
+ done
+ vmkdir ${_prefix}/share/doc
+ cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
+ vsv ${pkgname}
+ find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
+ vlicense COPYRIGHT
+
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
+ vinstall ${FILESDIR}/postgresql.confd 644 ${_sysconfdir}/default postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/default/postgresql
+ vinstall ${FILESDIR}/postgresql.pam 644 ${_sysconfdir}/pam.d postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/pam.d/postgresql
+ vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
+ 644 ${_sysconfdir}/postgresql postgresql.conf
+ vbin src/common/pg_config.sh
+
+ vsed -i 's/install_bin = .*/install_bin = install/g' \
+ ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
+}
+
+_substitute() {
+ sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
+}
+
+postgresql15-doc_package() {
+ short_desc="PostgreSQL documentation"
+ pkg_install() {
+ vmove ${_prefix}/share/doc
+ }
+}
+
+postgresql-libs_package() {
+ short_desc="PostgreSQL shared libraries"
+ conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0 postgresql14-libs>=0"
+ pkg_install() {
+ vmove "${_prefix}/lib/*.so*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name libpq5\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
+ }
+}
+
+postgresql-libs-devel_package() {
+ depends="postgresql-libs>=${version}_${revision}"
+ short_desc="PostgreSQL shared libraries (development files)"
+ conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0 postgresql14-libs-devel>=0"
+ pkg_install() {
+ vmkdir usr/bin
+ vmkdir usr/lib
+ for f in pg_config ecpg; do
+ vmove ${_prefix}/bin/${f}
+ vmove "usr/share/man/man1/$(basename ${f})*"
+ ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
+ done
+ vmove usr/bin/pg_config.sh
+ vmove usr/include
+ vmove "${_prefix}/lib/*.a"
+ mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
+ vmove usr/share/man/man3
+ vmove ${_prefix}/lib/postgresql/pgxs
+ for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
+ ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
+ done
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pg_config\* -o -name ecpg\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+# XXX disabled for now in cross builds.
+if [ -z "$CROSS_BUILD" ]; then
+
+postgresql15-plperl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Perl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plperl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plperl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-plpython_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Python procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plpython*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plpython\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-pltcl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Tcl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/pltcl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pltcl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+fi # !CROSS_BUILD
+
+postgresql15-client_package() {
+ short_desc="Client frontends programs for PostgreSQL"
+ pkg_install() {
+ for f in clusterdb createdb createuser dropdb \
+ dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
+ vacuumdb; do
+ vmove ${_prefix}/bin/${f}
+ vmove usr/share/man/man1/$(basename ${f})-${_major}.1
+ done
+ vmove usr/share/man/man7
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pgscripts\* -o \
+ -name psql\* -o \
+ -name pg_dump\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
+ ${PKGDESTDIR}/${_prefix}/share
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
+ }
+}
+
+postgresql15-contrib_package() {
+ short_desc="PostgreSQL contributed programs and extensions"
+ pkg_install() {
+ make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
+ }
+}
diff --git a/srcpkgs/postgresql15/update b/srcpkgs/postgresql15/update
new file mode 100644
index 000000000000..160ccf143338
--- /dev/null
+++ b/srcpkgs/postgresql15/update
@@ -0,0 +1,2 @@
+site="https://ftp.postgresql.org/pub/source/"
+pattern="v\K${version%%.*}[\d.]+(?!\w)"
From f61e038de8b1cccc4799781065f917cd10ea4509 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:52:48 +0200
Subject: [PATCH 4/7] New package: postgresql14-libs-14.5
---
srcpkgs/postgresql14-libs | 1 +
srcpkgs/postgresql14-libs-devel | 1 +
srcpkgs/postgresql14/template | 6 +++---
3 files changed, 5 insertions(+), 3 deletions(-)
create mode 120000 srcpkgs/postgresql14-libs
create mode 120000 srcpkgs/postgresql14-libs-devel
diff --git a/srcpkgs/postgresql14-libs b/srcpkgs/postgresql14-libs
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14-libs-devel b/srcpkgs/postgresql14-libs-devel
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs-devel
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 9c1d31ce1444..3dc23d8a952f 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql14'
pkgname=postgresql14
version=14.5
-revision=3
+revision=4
build_style=gnu-configure
make_build_target=world
_major="${version%%.*}"
@@ -109,7 +109,7 @@ postgresql14-doc_package() {
}
}
-postgresql-libs_package() {
+postgresql14-libs_package() {
short_desc="PostgreSQL shared libraries"
conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0"
pkg_install() {
@@ -123,7 +123,7 @@ postgresql-libs_package() {
}
}
-postgresql-libs-devel_package() {
+postgresql14-libs-devel_package() {
depends="postgresql-libs>=${version}_${revision} openssl-devel"
short_desc="PostgreSQL shared libraries (development files)"
conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0"
From 82429f5ea774c0db2d5abbbf4cbc62ad95186996 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:56:13 +0200
Subject: [PATCH 5/7] postgis-postgresql14: build with postgresql14-libs
---
srcpkgs/postgis-postgresql14/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index c1d68a3c9dee..ce731066b9db 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -9,8 +9,8 @@ configure_args="
--with-protobufdir=${XBPS_CROSS_BASE}/usr
--with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ libgdal-tools postgresql14-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql14-libs-devel
proj-devel protobuf-c-devel pcre-devel json-c-devel"
checkdepends="libxslt CUnit-devel"
short_desc="Spatial database extender for PostgreSQL"
From 413d862ce045eec6e0cedd32e8f032d8198fa0aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:06 +0200
Subject: [PATCH 6/7] New package: postgis-postgresql15-3.2.1
---
srcpkgs/postgis | 2 +-
srcpkgs/postgis-postgresql14/template | 6 -----
srcpkgs/postgis-postgresql15/template | 39 +++++++++++++++++++++++++++
srcpkgs/postgis-postgresql15/update | 2 ++
4 files changed, 42 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/postgis-postgresql15/template
create mode 100644 srcpkgs/postgis-postgresql15/update
diff --git a/srcpkgs/postgis b/srcpkgs/postgis
index 07d2a298867d..3bacb4f025ed 120000
--- a/srcpkgs/postgis
+++ b/srcpkgs/postgis
@@ -1 +1 @@
-postgis-postgresql14
\ No newline at end of file
+postgis-postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index ce731066b9db..34899cbd3f22 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -30,9 +30,3 @@ pre_check() {
# regression tests require running postgresql
vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
}
-
-postgis_package() {
- build_style=meta
- short_desc+=" (meta package)"
- depends="postgis-postgresql14"
-}
diff --git a/srcpkgs/postgis-postgresql15/template b/srcpkgs/postgis-postgresql15/template
new file mode 100644
index 000000000000..25e1230a0497
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/template
@@ -0,0 +1,39 @@
+# Template file for 'postgis-postgresql15'
+pkgname=postgis-postgresql15
+version=3.2.1
+revision=1
+wrksrc="postgis-${version}"
+build_style=gnu-configure
+configure_args="
+ --with-projdir=${XBPS_CROSS_BASE}/usr
+ --with-jsondir=${XBPS_CROSS_BASE}/usr
+ --with-protobufdir=${XBPS_CROSS_BASE}/usr
+ --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
+hostmakedepends="automake libtool perl pkg-config geos
+ libgdal-tools postgresql-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ proj-devel protobuf-c-devel pcre-devel json-c-devel"
+checkdepends="libxslt CUnit-devel"
+short_desc="Spatial database extender for PostgreSQL"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="GPL-2.0-or-later"
+homepage="https://postgis.net/"
+changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
+distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
+checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+nocross="FIXME: Cannot run test program to determine PROJ version"
+
+pre_configure() {
+ ./autogen.sh
+}
+
+pre_check() {
+ # regression tests require running postgresql
+ vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}
+
+postgis_package() {
+ build_style=meta
+ short_desc+=" (meta package)"
+ depends="${sourcepkg}"
+}
diff --git a/srcpkgs/postgis-postgresql15/update b/srcpkgs/postgis-postgresql15/update
new file mode 100644
index 000000000000..e5577e6b068a
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/update
@@ -0,0 +1,2 @@
+pkgname=postgis
+ignore="*alpha* *beta* *rc*"
From 07c9b416f005e242734c3db18727a8fb18abd8b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:19 +0200
Subject: [PATCH 7/7] postgresql: update to 15.
---
srcpkgs/postgresql/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template
index 349e0c92ac16..99f8adc3d420 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=14
-revision=2
+version=15
+revision=1
build_style=meta
depends="postgresql${version}"
short_desc="PostgreSQL server meta package"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] Postgresql 15
2022-10-13 21:13 [PR PATCH] Postgresql 15 Chocimier
2023-01-12 2:29 ` github-actions
2023-01-17 20:13 ` [PR PATCH] [Updated] " Chocimier
@ 2023-02-04 18:52 ` Chocimier
2023-02-04 19:48 ` [PR PATCH] [Merged]: " Chocimier
3 siblings, 0 replies; 5+ messages in thread
From: Chocimier @ 2023-02-04 18:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
There is an updated pull request by Chocimier against master on the void-packages repository
https://github.com/Chocimier/void-packages-org postgresql15
https://github.com/void-linux/void-packages/pull/39938
Postgresql 15
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **NO**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/39938.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-postgresql15-39938.patch --]
[-- Type: text/x-diff, Size: 60705 bytes --]
From 1e9655ff51981d68e3d3b5101de9de619640fda6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:19:15 +0200
Subject: [PATCH 1/9] postgis-postgresql13: remove
---
srcpkgs/postgis-postgresql13/template | 32 ---------------------------
srcpkgs/postgis-postgresql13/update | 2 --
2 files changed, 34 deletions(-)
delete mode 100644 srcpkgs/postgis-postgresql13/template
delete mode 100644 srcpkgs/postgis-postgresql13/update
diff --git a/srcpkgs/postgis-postgresql13/template b/srcpkgs/postgis-postgresql13/template
deleted file mode 100644
index b95707840357..000000000000
--- a/srcpkgs/postgis-postgresql13/template
+++ /dev/null
@@ -1,32 +0,0 @@
-# Template file for 'postgis-postgresql13'
-pkgname=postgis-postgresql13
-version=3.2.1
-revision=3
-build_style=gnu-configure
-configure_args="
- --with-projdir=${XBPS_CROSS_BASE}/usr
- --with-jsondir=${XBPS_CROSS_BASE}/usr
- --with-protobufdir=${XBPS_CROSS_BASE}/usr
- --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
-hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql13-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql13-libs-devel
- proj-devel protobuf-c-devel pcre-devel json-c-devel"
-checkdepends="libxslt CUnit-devel"
-short_desc="Spatial database extender for PostgreSQL"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="GPL-2.0-or-later"
-homepage="https://postgis.net/"
-changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
-distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
-nocross="FIXME: Cannot run test program to determine PROJ version"
-
-pre_configure() {
- ./autogen.sh
-}
-
-pre_check() {
- # regression tests require running postgresql
- vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
-}
diff --git a/srcpkgs/postgis-postgresql13/update b/srcpkgs/postgis-postgresql13/update
deleted file mode 100644
index e5577e6b068a..000000000000
--- a/srcpkgs/postgis-postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-pkgname=postgis
-ignore="*alpha* *beta* *rc*"
From e1bdc38195032bd1ecd1f51e52c444e7c452f512 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 20:22:27 +0200
Subject: [PATCH 2/9] postgresql13: remove
---
srcpkgs/postgresql13-client | 1 -
srcpkgs/postgresql13-contrib | 1 -
srcpkgs/postgresql13-doc | 1 -
srcpkgs/postgresql13-libs | 1 -
srcpkgs/postgresql13-libs-devel | 1 -
srcpkgs/postgresql13-plperl | 1 -
srcpkgs/postgresql13-plpython | 1 -
srcpkgs/postgresql13-pltcl | 1 -
srcpkgs/postgresql13/files/pg_config.sh.in | 143 -----------
srcpkgs/postgresql13/files/postgresql.confd | 17 --
srcpkgs/postgresql13/files/postgresql.pam | 3 -
.../postgresql13/files/postgresql13/control/t | 2 -
.../postgresql13/files/postgresql13/log/run | 2 -
srcpkgs/postgresql13/files/postgresql13/run | 27 ---
srcpkgs/postgresql13/files/profile.sh | 14 --
.../patches/pg_config-cross-value.patch | 45 ----
srcpkgs/postgresql13/patches/relocate.patch | 22 --
srcpkgs/postgresql13/template | 228 ------------------
srcpkgs/postgresql13/update | 2 -
19 files changed, 513 deletions(-)
delete mode 120000 srcpkgs/postgresql13-client
delete mode 120000 srcpkgs/postgresql13-contrib
delete mode 120000 srcpkgs/postgresql13-doc
delete mode 120000 srcpkgs/postgresql13-libs
delete mode 120000 srcpkgs/postgresql13-libs-devel
delete mode 120000 srcpkgs/postgresql13-plperl
delete mode 120000 srcpkgs/postgresql13-plpython
delete mode 120000 srcpkgs/postgresql13-pltcl
delete mode 100644 srcpkgs/postgresql13/files/pg_config.sh.in
delete mode 100644 srcpkgs/postgresql13/files/postgresql.confd
delete mode 100644 srcpkgs/postgresql13/files/postgresql.pam
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/control/t
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/log/run
delete mode 100755 srcpkgs/postgresql13/files/postgresql13/run
delete mode 100644 srcpkgs/postgresql13/files/profile.sh
delete mode 100644 srcpkgs/postgresql13/patches/pg_config-cross-value.patch
delete mode 100644 srcpkgs/postgresql13/patches/relocate.patch
delete mode 100644 srcpkgs/postgresql13/template
delete mode 100644 srcpkgs/postgresql13/update
diff --git a/srcpkgs/postgresql13-client b/srcpkgs/postgresql13-client
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-client
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-contrib b/srcpkgs/postgresql13-contrib
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-contrib
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-doc b/srcpkgs/postgresql13-doc
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-doc
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs b/srcpkgs/postgresql13-libs
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-libs-devel b/srcpkgs/postgresql13-libs-devel
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-libs-devel
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plperl b/srcpkgs/postgresql13-plperl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plperl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-plpython b/srcpkgs/postgresql13-plpython
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-plpython
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13-pltcl b/srcpkgs/postgresql13-pltcl
deleted file mode 120000
index f6f48b1ff3a2..000000000000
--- a/srcpkgs/postgresql13-pltcl
+++ /dev/null
@@ -1 +0,0 @@
-postgresql13
\ No newline at end of file
diff --git a/srcpkgs/postgresql13/files/pg_config.sh.in b/srcpkgs/postgresql13/files/pg_config.sh.in
deleted file mode 100644
index 3d20d215d0b3..000000000000
--- a/srcpkgs/postgresql13/files/pg_config.sh.in
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/bin/sh
-# Released to Public Domain by Doan Tran Cong Danh
-
-print() {
- printf '%s\n' "$@"
-}
-
-sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
-
-BINDIR="$sysroot/@PREFIX@/bin"
-DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
-INCLUDEDIR="$sysroot/usr/include"
-PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
-INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
-LIBDIR="$sysroot/@PREFIX@/lib"
-PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
-LOCALEDIR="$sysroot/@PREFIX@/share/locale"
-MANDIR="$sysroot/@PREFIX@/share/man"
-SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
-SYSCONFDIR="$sysroot/@PREFIX@/etc/postgresql"
-PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
-
-CONFIGURE="@configure_args@"
-CC="@CC@"
-CPPFLAGS="@CPPFLAGS@"
-CFLAGS="@CFLAGS@"
-CFLAGS_SL="@CFLAGS_SL@"
-LDFLAGS="@LDFLAGS@"
-LDFLAGS_EX="@LDFLAGS_EX@"
-LDFLAGS_SL="@LDFLAGS_SL@"
-LIBS="@LIBS@"
-VERSION="PostgreSQL @FULL_VERSION@"
-
-if [ "$sysroot" != "/" ]; then
- CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
- LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
-fi
-
-usage() {
- cat <<-EOF
- $0 provides information about the installed version of PostgreSQL.
-
- Usage:
- $0 [OPTION]...
-
- Options:
- --bindir show location of user executables
- --docdir show location of documentation files
- --htmldir show location of HTML documentation files
- --includedir show location of C header files of the client interfaces
- --pkgincludedir show location of other C header files
- --includedir-server show location of C header files for the server
- --libdir show location of object code libraries
- --pkglibdir show location of dynamically loadable modules
- --localedir show location of locale support files
- --mandir show location of manual pages
- --sharedir show location of architecture-independent support files
- --sysconfdir show location of system-wide configuration files
- --pgxs show location of extension makefile
- --configure show options given to PostgreSQL was built
- --cc show CC value used when PostgreSQL was built
- --cppflags show CPPFLAGS value used when PostgreSQL was built
- --cflags show CFLAGS value used when PostgreSQL was built
- --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
- --ldflags show LDFLAGS value used when PostgreSQL was built
- --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
- --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
- --libs show LIBS value used when PostgreSQL was built
- --version show the PostgreSQL version
- -?, --help show this help, then exit
-
- With no arguments, all known items are shown.
-
- Report bugs to <pgsql-bugs@postgresql.org>.
- EOF
-}
-
-if test $# -eq 0; then
- cat <<-EOF
- BINDIR = $BINDIR
- DOCDIR = $DOCDIR
- HTMLDIR = $HTMLDIR
- INCLUDEDIR = $INCLUDEDIR
- PKGINCLUDEDIR = $PKGINCLUDEDIR
- INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
- LIBDIR = $LIBDIR
- PKGLIBDIR = $PKGLIBDIR
- LOCALEDIR = $LOCALEDIR
- MANDIR = $MANDIR
- SHAREDIR = $SHAREDIR
- SYSCONFDIR = $SYSCONFDIR
- PGXS = $PGXS
- CONFIGURE = $CONFIGURE
- CC = $CC
- CPPFLAGS = $CPPFLAGS
- CFLAGS = $CFLAGS
- CFLAGS_SL = $CFLAGS_SL
- LDFLAGS = $LDFLAGS
- LDFLAGS_EX = $LDFLAGS_EX
- LDFLAGS_SL = $LDFLAGS_SL
- LIBS = $LIBS
- VERSION = $VERSION
- EOF
-fi
-
-for arg
-do
- if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
- usage
- exit 0
- fi
-done
-
-for arg
-do
- case "$arg" in
- --bindir) print "$BINDIR" ;;
- --docdir) print "$DOCDIR" ;;
- --htmldir) print "$HTMLDIR" ;;
- --includedir) print "$INCLUDEDIR" ;;
- --pkgincludedir) print "$PKGINCLUDEDIR" ;;
- --includedir-server) print "$INCLUDEDIR_SERVER" ;;
- --libdir) print "$LIBDIR" ;;
- --pkglibdir) print "$PKGLIBDIR" ;;
- --localedir) print "$LOCALEDIR" ;;
- --mandir) print "$MANDIR" ;;
- --sharedir) print "$SHAREDIR" ;;
- --sysconfdir) print "$SYSCONFDIR" ;;
- --pgxs) print "$PGXS" ;;
- --configure) print "$CONFIGURE" ;;
- --cc) print "$CC" ;;
- --cppflags) print "$CPPFLAGS" ;;
- --cflags) print "$CFLAGS" ;;
- --cflags_sl) print "$CFLAGS_SL" ;;
- --ldflags) print "$LDFLAGS" ;;
- --ldflags_ex) print "$LDFLAGS_EX" ;;
- --ldflags_sl) print "$LDFLAGS_SL" ;;
- --libs) print "$LIBS" ;;
- --version) print "$VERSION" ;;
- esac
-done
diff --git a/srcpkgs/postgresql13/files/postgresql.confd b/srcpkgs/postgresql13/files/postgresql.confd
deleted file mode 100644
index fe7106626fa5..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.confd
+++ /dev/null
@@ -1,17 +0,0 @@
-# Configuration file for the PostgreSQL server.
-
-# PostgreSQL's database directory
-PGROOT="/var/lib/postgresql@VERSION@"
-
-# PostgreSQL's log file.
-PGLOG="/var/log/postgresql@VERSION@.log"
-
-# Passed to initdb if necessary
-INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
-
-# Extra options to run postmaster with, e.g.:
-# -N is the maximal number of client connections
-# -B is the number of shared buffers and has to be at least 2x the value for -N
-# Please read the man-page to postmaster for more options. Many of these options
-# can be set directly in the configuration-file.
-#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql13/files/postgresql.pam b/srcpkgs/postgresql13/files/postgresql.pam
deleted file mode 100644
index 53724d1f86a7..000000000000
--- a/srcpkgs/postgresql13/files/postgresql.pam
+++ /dev/null
@@ -1,3 +0,0 @@
-auth required pam_unix.so
-account required pam_unix.so
-session required pam_unix.so
diff --git a/srcpkgs/postgresql13/files/postgresql13/control/t b/srcpkgs/postgresql13/files/postgresql13/control/t
deleted file mode 100755
index dcedfaa20180..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/control/t
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql13/files/postgresql13/log/run b/srcpkgs/postgresql13/files/postgresql13/log/run
deleted file mode 100755
index 815d9c974079..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/log/run
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql13/files/postgresql13/run b/srcpkgs/postgresql13/files/postgresql13/run
deleted file mode 100755
index 9d044e9a1ce1..000000000000
--- a/srcpkgs/postgresql13/files/postgresql13/run
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-. /@PREFIX@/etc/default/postgresql
-: ${PGDATA:="$PGROOT/data"}
-
-if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
- echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
- ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
-fi
-
-
-if [ ! -d "$PGDATA" ]; then
- echo "Initializing database in $PGDATA"
-
- mkdir -p "$PGDATA" || exit 1
- chown -R postgres:postgres "$PGDATA"
- chmod 0700 "$PGDATA"
- su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
- rm -fr "$PGDATA"
- exit 1
- }
-
- if [ -f /@PREFIX@/etc/postgresql/postgresql.conf ]; then
- ln -sf /@PREFIX@/etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
- fi
-fi
-
-exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql13/files/profile.sh b/srcpkgs/postgresql13/files/profile.sh
deleted file mode 100644
index 54be2ca50a4f..000000000000
--- a/srcpkgs/postgresql13/files/profile.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-appendpath () {
- case ":$PATH:" in
- *:"$1":*)
- ;;
- *)
- PATH="${PATH:+$PATH:}$1"
- esac
-}
-
-appendpath '/@PREFIX@/bin'
-
-unset appendpath
-
-export PATH
diff --git a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch b/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
deleted file mode 100644
index cc0a9fc19133..000000000000
--- a/srcpkgs/postgresql13/patches/pg_config-cross-value.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Sources: Doan Tran Cong Danh
-Upstream: No
- - First part needs to be rework in configure script to be usable
- upstream
- - Second part would un-usable for Windows
-diff --git src/common/Makefile src/common/Makefile
-index ec04710..2af845f 100644
---- a/src/common/Makefile
-+++ b/src/common/Makefile
-@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
-
- # don't include subdirectory-path-dependent -I and -L switches
- STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
-+STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
-+STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
- STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
-+STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
- override CPPFLAGS += -DVAL_CC="\"$(CC)\""
- override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
--override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
-+override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
- override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
- override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
- override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
-@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
- GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
- GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
-
--all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
-+all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
-+
-+pg_config.sh: pg_config.sh.in
-+ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
-+ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
-+ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
-+ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
-+ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
-+ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
-+ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
-+ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
-+ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
-+ $< >$@
-
- distprep: kwlist_d.h
-
diff --git a/srcpkgs/postgresql13/patches/relocate.patch b/srcpkgs/postgresql13/patches/relocate.patch
deleted file mode 100644
index d2cc14281e3a..000000000000
--- a/srcpkgs/postgresql13/patches/relocate.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
-Date: Sat, 18 Jan 2020 12:19:45 +0100
-Subject: [PATCH] relocate
-
-
-diff --git src/port/path.c src/port/path.c
-index 710988b..20dc57d 100644
---- a/src/port/path.c
-+++ b/src/port/path.c
-@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
- int tail_len;
- int i;
-
-+ goto no_match; // we relocate only binaries
-+
- /*
- * Determine the common prefix --- note we require it to end on a
- * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
---
-2.23.0
-
diff --git a/srcpkgs/postgresql13/template b/srcpkgs/postgresql13/template
deleted file mode 100644
index 0f1ea0072b11..000000000000
--- a/srcpkgs/postgresql13/template
+++ /dev/null
@@ -1,228 +0,0 @@
-# Template file for 'postgresql13'
-pkgname=postgresql13
-version=13.8
-revision=3
-build_style=gnu-configure
-make_build_target=world
-_major="${version%%.*}"
-_prefix="usr/lib/psql${_major}"
-configure_args="--with-openssl --with-python
- --with-pam --enable-thread-safety
- --with-perl --with-tcl --without-ldap --without-gssapi
- --without-bonjour --with-libxml --with-libxslt
- --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
-hostmakedepends="docbook2x gettext flex openjade"
-makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
- python3-devel readline-devel tcl-devel"
-short_desc="Sophisticated open-source Object-Relational DBMS"
-maintainer="Piotr Wójcik <chocimier@tlen.pl>"
-license="PostgreSQL"
-homepage="https://www.postgresql.org"
-changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
-distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
-checksum=73876fdd3a517087340458dca4ce15b8d2a4dbceb334c0441424551ae6c4cded
-make_check=ci-skip # Postgres server can't be run as root
-
-conf_files="
- /${_prefix}/etc/default/postgresql
- /${_prefix}/etc/pam.d/postgresql
- /${_prefix}/etc/postgresql/postgresql.conf
-"
-
-# Create 'postgres' user for the server.
-system_accounts="postgres"
-postgres_homedir="/var/lib/postgresql"
-postgres_shell="/bin/sh"
-postgres_descr="PostgreSQL database server user"
-make_dirs="
- /var/lib/postgresql 0750 postgres postgres
- /var/lib/postgresql${_major} 0750 postgres postgres"
-
-if [ "$CROSS_BUILD" ]; then
- configure_args+=" --without-perl --without-python --without-tcl"
-fi
-
-post_patch() {
- cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
- _substitute src/common/pg_config.sh.in
- vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
-}
-
-pre_configure() {
- _style_configure_args="${configure_args}"
- configure_args=" "
- for arg in ${_style_configure_args}; do
- case $arg in
- --prefix=*|*dir=*) : ;; # skip
- *) configure_args+=" $arg"
- esac
- done
- configure_args="--prefix=/${_prefix}
- --sysconfdir=/${_prefix}/etc
- --includedir=/usr/include
- ${configure_args}"
-}
-
-post_build() {
- make -C contrib ${makejobs}
-}
-
-pre_check() {
- ln -sr tmp_install/${_prefix} /${_prefix%/*}
-}
-
-post_install() {
- vmkdir usr/share/man
- cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
- for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
- mv $i ${i%.*}-${_major}.${i##*.}
- done
- vmkdir ${_prefix}/share/doc
- cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
- vsv ${pkgname}
- find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
- vlicense COPYRIGHT
-
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
- vinstall ${FILESDIR}/postgresql.confd 644 ${_prefix}/etc/default postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/default/postgresql
- vinstall ${FILESDIR}/postgresql.pam 644 ${_prefix}/etc/pam.d postgresql
- _substitute ${DESTDIR}/${_prefix}/etc/pam.d/postgresql
- vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
- 644 ${_prefix}/etc/postgresql postgresql.conf
- vbin src/common/pg_config.sh
-
- vsed -i 's/install_bin = .*/install_bin = install/g' \
- ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
-}
-
-_substitute() {
- sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
-}
-
-postgresql13-doc_package() {
- short_desc="PostgreSQL documentation"
- pkg_install() {
- vmove ${_prefix}/share/doc
- }
-}
-
-postgresql13-libs_package() {
- short_desc="PostgreSQL shared libraries"
- conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0"
- pkg_install() {
- vmove "${_prefix}/lib/*.so*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name libpq5\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
- }
-}
-
-postgresql13-libs-devel_package() {
- depends="postgresql-libs>=${version}_${revision} openssl-devel"
- short_desc="PostgreSQL shared libraries (development files)"
- conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0"
- pkg_install() {
- vmkdir usr/bin
- vmkdir usr/lib
- for f in pg_config ecpg; do
- vmove ${_prefix}/bin/${f}
- vmove "usr/share/man/man1/$(basename ${f})*"
- ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
- done
- vmove usr/bin/pg_config.sh
- vmove usr/include
- vmove "${_prefix}/lib/*.a"
- mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
- vmove usr/share/man/man3
- vmove ${_prefix}/lib/postgresql/pgxs
- for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
- ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
- done
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pg_config\* -o -name ecpg\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-# XXX disabled for now in cross builds.
-if [ -z "$CROSS_BUILD" ]; then
-
-postgresql13-plperl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Perl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plperl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plperl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-plpython_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Python procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/plpython*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name plpython\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-postgresql13-pltcl_package() {
- depends="${sourcepkg}>=${version}_${revision}"
- short_desc="PL/Tcl procedural language for PostgreSQL"
- pkg_install() {
- vmove "${_prefix}/lib/postgresql/pltcl*"
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pltcl\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- }
-}
-
-fi # !CROSS_BUILD
-
-postgresql13-client_package() {
- short_desc="Client frontends programs for PostgreSQL"
- pkg_install() {
- for f in clusterdb createdb createuser dropdb \
- dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
- vacuumdb; do
- vmove ${_prefix}/bin/${f}
- vmove usr/share/man/man1/$(basename ${f})-${_major}.1
- done
- vmove usr/share/man/man7
- for d in $(find ${DESTDIR}/${_prefix}/share/locale \
- -type f -name pgscripts\* -o \
- -name psql\* -o \
- -name pg_dump\*); do
- mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
- done
- mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
- ${PKGDESTDIR}/${_prefix}/share
- vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
- _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
- }
-}
-
-postgresql13-contrib_package() {
- short_desc="PostgreSQL contributed programs and extensions"
- pkg_install() {
- make -C contrib install DESTDIR=${PKGDESTDIR}
- mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
- }
-}
diff --git a/srcpkgs/postgresql13/update b/srcpkgs/postgresql13/update
deleted file mode 100644
index 160ccf143338..000000000000
--- a/srcpkgs/postgresql13/update
+++ /dev/null
@@ -1,2 +0,0 @@
-site="https://ftp.postgresql.org/pub/source/"
-pattern="v\K${version%%.*}[\d.]+(?!\w)"
From e6696244df756a83be78b17bfba64960eb41758f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:49:49 +0200
Subject: [PATCH 3/9] New package: postgresql15-15.1
---
common/shlibs | 8 +-
srcpkgs/postgresql-libs | 2 +-
srcpkgs/postgresql-libs-devel | 2 +-
srcpkgs/postgresql15-client | 1 +
srcpkgs/postgresql15-contrib | 1 +
srcpkgs/postgresql15-doc | 1 +
srcpkgs/postgresql15-plperl | 1 +
srcpkgs/postgresql15-plpython | 1 +
srcpkgs/postgresql15-pltcl | 1 +
srcpkgs/postgresql15/files/pg_config.sh.in | 143 +++++++++++
srcpkgs/postgresql15/files/postgresql.confd | 17 ++
srcpkgs/postgresql15/files/postgresql.pam | 3 +
.../postgresql15/files/postgresql15/control/t | 2 +
.../postgresql15/files/postgresql15/log/run | 2 +
srcpkgs/postgresql15/files/postgresql15/run | 27 +++
srcpkgs/postgresql15/files/profile.sh | 14 ++
.../patches/pg_config-cross-value.patch | 45 ++++
srcpkgs/postgresql15/patches/relocate.patch | 22 ++
srcpkgs/postgresql15/template | 229 ++++++++++++++++++
srcpkgs/postgresql15/update | 2 +
20 files changed, 518 insertions(+), 6 deletions(-)
create mode 120000 srcpkgs/postgresql15-client
create mode 120000 srcpkgs/postgresql15-contrib
create mode 120000 srcpkgs/postgresql15-doc
create mode 120000 srcpkgs/postgresql15-plperl
create mode 120000 srcpkgs/postgresql15-plpython
create mode 120000 srcpkgs/postgresql15-pltcl
create mode 100644 srcpkgs/postgresql15/files/pg_config.sh.in
create mode 100644 srcpkgs/postgresql15/files/postgresql.confd
create mode 100644 srcpkgs/postgresql15/files/postgresql.pam
create mode 100755 srcpkgs/postgresql15/files/postgresql15/control/t
create mode 100755 srcpkgs/postgresql15/files/postgresql15/log/run
create mode 100755 srcpkgs/postgresql15/files/postgresql15/run
create mode 100644 srcpkgs/postgresql15/files/profile.sh
create mode 100644 srcpkgs/postgresql15/patches/pg_config-cross-value.patch
create mode 100644 srcpkgs/postgresql15/patches/relocate.patch
create mode 100644 srcpkgs/postgresql15/template
create mode 100644 srcpkgs/postgresql15/update
diff --git a/common/shlibs b/common/shlibs
index 523fd15af734..af1fd992b5da 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -568,10 +568,10 @@ libKF5PurposeWidgets.so.5 purpose-5.48.0_1
libKF5Purpose.so.5 purpose-5.48.0_1
libKF5PulseAudioQt.so.3 pulseaudio-qt-1.3_1
libReviewboardHelpers.so.5 purpose-5.48.0_1
-libecpg_compat.so.3 postgresql-libs-14.0_1
-libecpg.so.6 postgresql-libs-14.0_1
-libpgtypes.so.3 postgresql-libs-14.0_1
-libpq.so.5 postgresql-libs-14.0_1
+libecpg_compat.so.3 postgresql-libs-15.1_1
+libecpg.so.6 postgresql-libs-15.1_1
+libpgtypes.so.3 postgresql-libs-15.1_1
+libpq.so.5 postgresql-libs-15.1_1
libmypaint.so.0 libmypaint-1.6.1_1
libgssapi_krb5.so.2 mit-krb5-libs-1.8_1
libgssrpc.so.4 mit-krb5-libs-1.8_1
diff --git a/srcpkgs/postgresql-libs b/srcpkgs/postgresql-libs
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs
+++ b/srcpkgs/postgresql-libs
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql-libs-devel b/srcpkgs/postgresql-libs-devel
index 13d0224a054b..a44b462efd15 120000
--- a/srcpkgs/postgresql-libs-devel
+++ b/srcpkgs/postgresql-libs-devel
@@ -1 +1 @@
-postgresql14
\ No newline at end of file
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-client b/srcpkgs/postgresql15-client
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-client
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-contrib b/srcpkgs/postgresql15-contrib
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-contrib
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-doc b/srcpkgs/postgresql15-doc
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-doc
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plperl b/srcpkgs/postgresql15-plperl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plperl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-plpython b/srcpkgs/postgresql15-plpython
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-plpython
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15-pltcl b/srcpkgs/postgresql15-pltcl
new file mode 120000
index 000000000000..a44b462efd15
--- /dev/null
+++ b/srcpkgs/postgresql15-pltcl
@@ -0,0 +1 @@
+postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgresql15/files/pg_config.sh.in b/srcpkgs/postgresql15/files/pg_config.sh.in
new file mode 100644
index 000000000000..68068a82e01e
--- /dev/null
+++ b/srcpkgs/postgresql15/files/pg_config.sh.in
@@ -0,0 +1,143 @@
+#!/bin/sh
+# Released to Public Domain by Doan Tran Cong Danh
+
+print() {
+ printf '%s\n' "$@"
+}
+
+sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
+
+BINDIR="$sysroot/@PREFIX@/bin"
+DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
+INCLUDEDIR="$sysroot/usr/include"
+PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
+INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
+LIBDIR="$sysroot/@PREFIX@/lib"
+PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
+LOCALEDIR="$sysroot/@PREFIX@/share/locale"
+MANDIR="$sysroot/@PREFIX@/share/man"
+SHAREDIR="$sysroot/@PREFIX@/share/postgresql"
+SYSCONFDIR="$sysroot/etc/psql@VERSION@/postgresql"
+PGXS="$sysroot/@PREFIX@/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
+
+CONFIGURE="@configure_args@"
+CC="@CC@"
+CPPFLAGS="@CPPFLAGS@"
+CFLAGS="@CFLAGS@"
+CFLAGS_SL="@CFLAGS_SL@"
+LDFLAGS="@LDFLAGS@"
+LDFLAGS_EX="@LDFLAGS_EX@"
+LDFLAGS_SL="@LDFLAGS_SL@"
+LIBS="@LIBS@"
+VERSION="PostgreSQL @FULL_VERSION@"
+
+if [ "$sysroot" != "/" ]; then
+ CPPFLAGS="$(print "$CPPFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ CFLAGS="$(print "$CFLAGS" | sed "s,-I *\\(/@PREFIX@/include\\),-I$sysroot\\1,g")"
+ LDFLAGS="$(print "$LDFLAGS" | sed "s,-L *\\(/@PREFIX@/lib\\),-L$sysroot\\1,g")"
+fi
+
+usage() {
+ cat <<-EOF
+ $0 provides information about the installed version of PostgreSQL.
+
+ Usage:
+ $0 [OPTION]...
+
+ Options:
+ --bindir show location of user executables
+ --docdir show location of documentation files
+ --htmldir show location of HTML documentation files
+ --includedir show location of C header files of the client interfaces
+ --pkgincludedir show location of other C header files
+ --includedir-server show location of C header files for the server
+ --libdir show location of object code libraries
+ --pkglibdir show location of dynamically loadable modules
+ --localedir show location of locale support files
+ --mandir show location of manual pages
+ --sharedir show location of architecture-independent support files
+ --sysconfdir show location of system-wide configuration files
+ --pgxs show location of extension makefile
+ --configure show options given to PostgreSQL was built
+ --cc show CC value used when PostgreSQL was built
+ --cppflags show CPPFLAGS value used when PostgreSQL was built
+ --cflags show CFLAGS value used when PostgreSQL was built
+ --cflags_sl show CFLAGS_SL value used when PostgreSQL was built
+ --ldflags show LDFLAGS value used when PostgreSQL was built
+ --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built
+ --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built
+ --libs show LIBS value used when PostgreSQL was built
+ --version show the PostgreSQL version
+ -?, --help show this help, then exit
+
+ With no arguments, all known items are shown.
+
+ Report bugs to <pgsql-bugs@postgresql.org>.
+ EOF
+}
+
+if test $# -eq 0; then
+ cat <<-EOF
+ BINDIR = $BINDIR
+ DOCDIR = $DOCDIR
+ HTMLDIR = $HTMLDIR
+ INCLUDEDIR = $INCLUDEDIR
+ PKGINCLUDEDIR = $PKGINCLUDEDIR
+ INCLUDEDIR-SERVER = $INCLUDEDIR_SERVER
+ LIBDIR = $LIBDIR
+ PKGLIBDIR = $PKGLIBDIR
+ LOCALEDIR = $LOCALEDIR
+ MANDIR = $MANDIR
+ SHAREDIR = $SHAREDIR
+ SYSCONFDIR = $SYSCONFDIR
+ PGXS = $PGXS
+ CONFIGURE = $CONFIGURE
+ CC = $CC
+ CPPFLAGS = $CPPFLAGS
+ CFLAGS = $CFLAGS
+ CFLAGS_SL = $CFLAGS_SL
+ LDFLAGS = $LDFLAGS
+ LDFLAGS_EX = $LDFLAGS_EX
+ LDFLAGS_SL = $LDFLAGS_SL
+ LIBS = $LIBS
+ VERSION = $VERSION
+ EOF
+fi
+
+for arg
+do
+ if test "x$arg" = "x--help" || test "x$arg" = "x-?"; then
+ usage
+ exit 0
+ fi
+done
+
+for arg
+do
+ case "$arg" in
+ --bindir) print "$BINDIR" ;;
+ --docdir) print "$DOCDIR" ;;
+ --htmldir) print "$HTMLDIR" ;;
+ --includedir) print "$INCLUDEDIR" ;;
+ --pkgincludedir) print "$PKGINCLUDEDIR" ;;
+ --includedir-server) print "$INCLUDEDIR_SERVER" ;;
+ --libdir) print "$LIBDIR" ;;
+ --pkglibdir) print "$PKGLIBDIR" ;;
+ --localedir) print "$LOCALEDIR" ;;
+ --mandir) print "$MANDIR" ;;
+ --sharedir) print "$SHAREDIR" ;;
+ --sysconfdir) print "$SYSCONFDIR" ;;
+ --pgxs) print "$PGXS" ;;
+ --configure) print "$CONFIGURE" ;;
+ --cc) print "$CC" ;;
+ --cppflags) print "$CPPFLAGS" ;;
+ --cflags) print "$CFLAGS" ;;
+ --cflags_sl) print "$CFLAGS_SL" ;;
+ --ldflags) print "$LDFLAGS" ;;
+ --ldflags_ex) print "$LDFLAGS_EX" ;;
+ --ldflags_sl) print "$LDFLAGS_SL" ;;
+ --libs) print "$LIBS" ;;
+ --version) print "$VERSION" ;;
+ esac
+done
diff --git a/srcpkgs/postgresql15/files/postgresql.confd b/srcpkgs/postgresql15/files/postgresql.confd
new file mode 100644
index 000000000000..fe7106626fa5
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.confd
@@ -0,0 +1,17 @@
+# Configuration file for the PostgreSQL server.
+
+# PostgreSQL's database directory
+PGROOT="/var/lib/postgresql@VERSION@"
+
+# PostgreSQL's log file.
+PGLOG="/var/log/postgresql@VERSION@.log"
+
+# Passed to initdb if necessary
+INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8"
+
+# Extra options to run postmaster with, e.g.:
+# -N is the maximal number of client connections
+# -B is the number of shared buffers and has to be at least 2x the value for -N
+# Please read the man-page to postmaster for more options. Many of these options
+# can be set directly in the configuration-file.
+#PGOPTS="-N 512 -B 1024"
diff --git a/srcpkgs/postgresql15/files/postgresql.pam b/srcpkgs/postgresql15/files/postgresql.pam
new file mode 100644
index 000000000000..53724d1f86a7
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/srcpkgs/postgresql15/files/postgresql15/control/t b/srcpkgs/postgresql15/files/postgresql15/control/t
new file mode 100755
index 000000000000..dcedfaa20180
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/control/t
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/kill -INT `/usr/bin/head -1 /run/runit/supervise.postgresql@VERSION@/pid`
diff --git a/srcpkgs/postgresql15/files/postgresql15/log/run b/srcpkgs/postgresql15/files/postgresql15/log/run
new file mode 100755
index 000000000000..815d9c974079
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/log/run
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec logger -p daemon.info -t postgres@VERSION@
diff --git a/srcpkgs/postgresql15/files/postgresql15/run b/srcpkgs/postgresql15/files/postgresql15/run
new file mode 100755
index 000000000000..3aee9440e847
--- /dev/null
+++ b/srcpkgs/postgresql15/files/postgresql15/run
@@ -0,0 +1,27 @@
+#!/bin/sh
+. /etc/psql@VERSION@/default/postgresql
+: ${PGDATA:="$PGROOT/data"}
+
+if [ "$PGROOT" != "/var/lib/postgresql@VERSION@" ]; then
+ echo "Creating symlink /var/lib/postgresql@VERSION@ -> $PGROOT"
+ ln -sf "$PGROOT" /var/lib/postgresql@VERSION@
+fi
+
+
+if [ ! -d "$PGDATA" ]; then
+ echo "Initializing database in $PGDATA"
+
+ mkdir -p "$PGDATA" || exit 1
+ chown -R postgres:postgres "$PGDATA"
+ chmod 0700 "$PGDATA"
+ su - postgres -c "/@PREFIX@/bin/initdb $INITOPTS -D '$PGDATA'" 2>&1 || {
+ rm -fr "$PGDATA"
+ exit 1
+ }
+
+ if [ -f /etc/psql@VERSION@/postgresql/postgresql.conf ]; then
+ ln -sf /etc/psql@VERSION@/postgresql/postgresql.conf "$PGDATA/postgresql.conf"
+ fi
+fi
+
+exec chpst -u postgres:postgres /@PREFIX@/bin/postgres -D "$PGDATA" $PGOPTS 2>&1
diff --git a/srcpkgs/postgresql15/files/profile.sh b/srcpkgs/postgresql15/files/profile.sh
new file mode 100644
index 000000000000..54be2ca50a4f
--- /dev/null
+++ b/srcpkgs/postgresql15/files/profile.sh
@@ -0,0 +1,14 @@
+appendpath () {
+ case ":$PATH:" in
+ *:"$1":*)
+ ;;
+ *)
+ PATH="${PATH:+$PATH:}$1"
+ esac
+}
+
+appendpath '/@PREFIX@/bin'
+
+unset appendpath
+
+export PATH
diff --git a/srcpkgs/postgresql15/patches/pg_config-cross-value.patch b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
new file mode 100644
index 000000000000..cc0a9fc19133
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/pg_config-cross-value.patch
@@ -0,0 +1,45 @@
+Sources: Doan Tran Cong Danh
+Upstream: No
+ - First part needs to be rework in configure script to be usable
+ upstream
+ - Second part would un-usable for Windows
+diff --git src/common/Makefile src/common/Makefile
+index ec04710..2af845f 100644
+--- a/src/common/Makefile
++++ b/src/common/Makefile
+@@ -30,10 +30,13 @@ include $(top_builddir)/src/Makefile.global
+
+ # don't include subdirectory-path-dependent -I and -L switches
+ STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include -I$(top_builddir)/src/include,$(CPPFLAGS))
++STD_CPPFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_CPPFLAGS))
++STD_CFLAGS := $(subst @XBPS_SYSROOT@,,$(CFLAGS))
+ STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/common -L$(top_builddir)/src/port,$(LDFLAGS))
++STD_LDFLAGS := $(subst @XBPS_SYSROOT@,,$(STD_LDFLAGS))
+ override CPPFLAGS += -DVAL_CC="\"$(CC)\""
+ override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
+-override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
++override CPPFLAGS += -DVAL_CFLAGS="\"$(STD_CFLAGS)\""
+ override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
+ override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
+ override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
+@@ -72,7 +75,19 @@ OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o restricted_token.o
+ GEN_KEYWORDLIST = $(PERL) -I $(TOOLSDIR) $(TOOLSDIR)/gen_keywordlist.pl
+ GEN_KEYWORDLIST_DEPS = $(TOOLSDIR)/gen_keywordlist.pl $(TOOLSDIR)/PerfectHash.pm
+
+-all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a
++all: libpgcommon.a libpgcommon_shlib.a libpgcommon_srv.a pg_config.sh
++
++pg_config.sh: pg_config.sh.in
++ sed -e "s/@configure_args@/$(subst /,\\/,$(configure_args))/" \
++ -e "s/@CC@/$(subst /,\\/,$(CC))/" \
++ -e "s/@CPPFLAGS@/$(subst /,\\/,$(STD_CPPFLAGS))/" \
++ -e "s/@CFLAGS@/$(subst /,\\/,$(STD_CFLAGS))/" \
++ -e "s/@CFLAGS_SL@/$(subst /,\\/,$(CFLAGS_SL))/" \
++ -e "s/@LDFLAGS@/$(subst /,\\/,$(STD_LDFLAGS))/" \
++ -e "s/@LDFLAGS_EX@/$(subst /,\\/,$(LDFLAGS_EX))/" \
++ -e "s/@LDFLAGS_SL@/$(subst /,\\/,$(LDFLAGS_SL))/" \
++ -e "s/@LIBS@/$(subst /,\\/,$(LIBS))/" \
++ $< >$@
+
+ distprep: kwlist_d.h
+
diff --git a/srcpkgs/postgresql15/patches/relocate.patch b/srcpkgs/postgresql15/patches/relocate.patch
new file mode 100644
index 000000000000..d2cc14281e3a
--- /dev/null
+++ b/srcpkgs/postgresql15/patches/relocate.patch
@@ -0,0 +1,22 @@
+From bf0601df89f611b33d8dbc27722351bf99e2cc18 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
+Date: Sat, 18 Jan 2020 12:19:45 +0100
+Subject: [PATCH] relocate
+
+
+diff --git src/port/path.c src/port/path.c
+index 710988b..20dc57d 100644
+--- a/src/port/path.c
++++ b/src/port/path.c
+@@ -544,6 +544,8 @@ make_relative_path(char *ret_path, const char *target_path,
+ int tail_len;
+ int i;
+
++ goto no_match; // we relocate only binaries
++
+ /*
+ * Determine the common prefix --- note we require it to end on a
+ * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
+--
+2.23.0
+
diff --git a/srcpkgs/postgresql15/template b/srcpkgs/postgresql15/template
new file mode 100644
index 000000000000..01bcb1759747
--- /dev/null
+++ b/srcpkgs/postgresql15/template
@@ -0,0 +1,229 @@
+# Template file for 'postgresql15'
+pkgname=postgresql15
+version=15.1
+revision=1
+build_style=gnu-configure
+make_build_target=world
+_major="${version%%.*}"
+_prefix="usr/lib/psql${_major}"
+_sysconfdir="etc/psql${_major}"
+configure_args="--with-openssl --with-python
+ --with-pam --enable-thread-safety
+ --with-perl --with-tcl --without-ldap --without-gssapi
+ --without-bonjour --with-libxml --with-libxslt
+ --with-system-tzdata=/usr/share/zoneinfo --enable-nls --with-uuid=e2fs"
+hostmakedepends="docbook2x gettext flex openjade"
+makedepends="libfl-devel openssl-devel libuuid-devel libxslt-devel pam-devel perl
+ python3-devel readline-devel tcl-devel"
+short_desc="Sophisticated open-source Object-Relational DBMS"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="PostgreSQL"
+homepage="https://www.postgresql.org"
+changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html"
+distfiles="https://ftp.postgresql.org/pub/source/v${version}/postgresql-${version}.tar.bz2"
+checksum=64fdf23d734afad0dfe4077daca96ac51dcd697e68ae2d3d4ca6c45cb14e21ae
+make_check=ci-skip # Postgres server can't be run as root
+
+conf_files="
+ /${_sysconfdir}/default/postgresql
+ /${_sysconfdir}/pam.d/postgresql
+ /${_sysconfdir}/postgresql/postgresql.conf
+"
+
+# Create 'postgres' user for the server.
+system_accounts="postgres"
+postgres_homedir="/var/lib/postgresql"
+postgres_shell="/bin/sh"
+postgres_descr="PostgreSQL database server user"
+make_dirs="
+ /var/lib/postgresql 0750 postgres postgres
+ /var/lib/postgresql${_major} 0750 postgres postgres"
+
+if [ "$CROSS_BUILD" ]; then
+ configure_args+=" --without-perl --without-python --without-tcl"
+fi
+
+post_patch() {
+ cp "$FILESDIR"/pg_config.sh.in src/common/pg_config.sh.in
+ _substitute src/common/pg_config.sh.in
+ vsed -i -e "s,@XBPS_SYSROOT@,${XBPS_CROSS_BASE%/}," src/common/Makefile
+}
+
+pre_configure() {
+ _style_configure_args="${configure_args}"
+ configure_args=" "
+ for arg in ${_style_configure_args}; do
+ case $arg in
+ --prefix=*|*dir=*) : ;; # skip
+ *) configure_args+=" $arg"
+ esac
+ done
+ configure_args="--prefix=/${_prefix}
+ --sysconfdir=/${_sysconfdir}
+ --includedir=/usr/include
+ ${configure_args}"
+}
+
+post_build() {
+ make -C contrib ${makejobs}
+}
+
+pre_check() {
+ ln -sr tmp_install/${_prefix} /${_prefix%/*}
+}
+
+post_install() {
+ vmkdir usr/share/man
+ cp -r doc/src/sgml/man? ${DESTDIR}/usr/share/man
+ for i in ${DESTDIR}/usr/share/man/*[^3]/*; do
+ mv $i ${i%.*}-${_major}.${i##*.}
+ done
+ vmkdir ${_prefix}/share/doc
+ cp -r doc/src/sgml/html ${DESTDIR}/${_prefix}/share/doc
+ vsv ${pkgname}
+ find "${DESTDIR}/etc/sv" -type f -exec sed -i -e s:@VERSION@:${_major}: -e s:@PREFIX@:${_prefix}: '{}' ';'
+ vlicense COPYRIGHT
+
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${DESTDIR}/etc/profile.d/${pkgname}.sh
+ vinstall ${FILESDIR}/postgresql.confd 644 ${_sysconfdir}/default postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/default/postgresql
+ vinstall ${FILESDIR}/postgresql.pam 644 ${_sysconfdir}/pam.d postgresql
+ _substitute ${DESTDIR}/${_sysconfdir}/pam.d/postgresql
+ vinstall ${DESTDIR}/${_prefix}/share/postgresql/postgresql.conf.sample \
+ 644 ${_sysconfdir}/postgresql postgresql.conf
+ vbin src/common/pg_config.sh
+
+ vsed -i 's/install_bin = .*/install_bin = install/g' \
+ ${DESTDIR}/${_prefix}/lib/postgresql/pgxs/src/Makefile.global
+}
+
+_substitute() {
+ sed -i "$1" -e s:@PREFIX@:${_prefix}: -e s:@VERSION@:${_major}: -e s:@FULL_VERSION@:${version}:
+}
+
+postgresql15-doc_package() {
+ short_desc="PostgreSQL documentation"
+ pkg_install() {
+ vmove ${_prefix}/share/doc
+ }
+}
+
+postgresql-libs_package() {
+ short_desc="PostgreSQL shared libraries"
+ conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0 postgresql14-libs>=0"
+ pkg_install() {
+ vmove "${_prefix}/lib/*.so*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name libpq5\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${PKGDESTDIR}/${_prefix}/lib/* ${PKGDESTDIR}/usr/lib
+ }
+}
+
+postgresql-libs-devel_package() {
+ depends="postgresql-libs>=${version}_${revision} openssl-devel"
+ short_desc="PostgreSQL shared libraries (development files)"
+ conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0 postgresql14-libs-devel>=0"
+ pkg_install() {
+ vmkdir usr/bin
+ vmkdir usr/lib
+ for f in pg_config ecpg; do
+ vmove ${_prefix}/bin/${f}
+ vmove "usr/share/man/man1/$(basename ${f})*"
+ ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
+ done
+ vmove usr/bin/pg_config.sh
+ vmove usr/include
+ vmove "${_prefix}/lib/*.a"
+ mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
+ vmove usr/share/man/man3
+ vmove ${_prefix}/lib/postgresql/pgxs
+ for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do
+ ln -sr "${PKGDESTDIR}/usr/lib/${f}" "${PKGDESTDIR}/${_prefix}/lib"
+ done
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pg_config\* -o -name ecpg\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+# XXX disabled for now in cross builds.
+if [ -z "$CROSS_BUILD" ]; then
+
+postgresql15-plperl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Perl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plperl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plperl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-plpython_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Python procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/plpython*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name plpython\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+postgresql15-pltcl_package() {
+ depends="${sourcepkg}>=${version}_${revision}"
+ short_desc="PL/Tcl procedural language for PostgreSQL"
+ pkg_install() {
+ vmove "${_prefix}/lib/postgresql/pltcl*"
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pltcl\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ }
+}
+
+fi # !CROSS_BUILD
+
+postgresql15-client_package() {
+ short_desc="Client frontends programs for PostgreSQL"
+ pkg_install() {
+ for f in clusterdb createdb createuser dropdb \
+ dropuser pg_dump pg_dumpall pg_isready pg_restore psql reindexdb \
+ vacuumdb; do
+ vmove ${_prefix}/bin/${f}
+ vmove usr/share/man/man1/$(basename ${f})-${_major}.1
+ done
+ vmove usr/share/man/man7
+ for d in $(find ${DESTDIR}/${_prefix}/share/locale \
+ -type f -name pgscripts\* -o \
+ -name psql\* -o \
+ -name pg_dump\*); do
+ mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
+ done
+ mv ${DESTDIR}/${_prefix}/share/postgresql/psqlrc.* \
+ ${PKGDESTDIR}/${_prefix}/share
+ vinstall ${FILESDIR}/profile.sh 644 etc/profile.d ${pkgname}.sh
+ _substitute ${PKGDESTDIR}/etc/profile.d/${pkgname}.sh
+ }
+}
+
+postgresql15-contrib_package() {
+ short_desc="PostgreSQL contributed programs and extensions"
+ pkg_install() {
+ make -C contrib install DESTDIR=${PKGDESTDIR}
+ mv ${PKGDESTDIR}/usr/include ${PKGDESTDIR}/${_prefix}
+ }
+}
diff --git a/srcpkgs/postgresql15/update b/srcpkgs/postgresql15/update
new file mode 100644
index 000000000000..160ccf143338
--- /dev/null
+++ b/srcpkgs/postgresql15/update
@@ -0,0 +1,2 @@
+site="https://ftp.postgresql.org/pub/source/"
+pattern="v\K${version%%.*}[\d.]+(?!\w)"
From 8cf8f8f48eba775e3c342b0b81c5d87500e976b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:52:48 +0200
Subject: [PATCH 4/9] New package: postgresql14-libs-14.5
---
srcpkgs/postgresql14-libs | 1 +
srcpkgs/postgresql14-libs-devel | 1 +
srcpkgs/postgresql14/template | 6 +++---
3 files changed, 5 insertions(+), 3 deletions(-)
create mode 120000 srcpkgs/postgresql14-libs
create mode 120000 srcpkgs/postgresql14-libs-devel
diff --git a/srcpkgs/postgresql14-libs b/srcpkgs/postgresql14-libs
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14-libs-devel b/srcpkgs/postgresql14-libs-devel
new file mode 120000
index 000000000000..13d0224a054b
--- /dev/null
+++ b/srcpkgs/postgresql14-libs-devel
@@ -0,0 +1 @@
+postgresql14
\ No newline at end of file
diff --git a/srcpkgs/postgresql14/template b/srcpkgs/postgresql14/template
index 9c1d31ce1444..3dc23d8a952f 100644
--- a/srcpkgs/postgresql14/template
+++ b/srcpkgs/postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql14'
pkgname=postgresql14
version=14.5
-revision=3
+revision=4
build_style=gnu-configure
make_build_target=world
_major="${version%%.*}"
@@ -109,7 +109,7 @@ postgresql14-doc_package() {
}
}
-postgresql-libs_package() {
+postgresql14-libs_package() {
short_desc="PostgreSQL shared libraries"
conflicts="postgresql9.6-libs>=0 postgresql12-libs>=0 postgresql13-libs>=0"
pkg_install() {
@@ -123,7 +123,7 @@ postgresql-libs_package() {
}
}
-postgresql-libs-devel_package() {
+postgresql14-libs-devel_package() {
depends="postgresql-libs>=${version}_${revision} openssl-devel"
short_desc="PostgreSQL shared libraries (development files)"
conflicts="postgresql9.6-libs-devel>=0 postgresql12-libs-devel>=0 postgresql13-libs-devel>=0"
From 2642135602a45441e3e34672bb3a167b5b3287ee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 22:56:13 +0200
Subject: [PATCH 5/9] postgis-postgresql14: build with postgresql14-libs
---
srcpkgs/postgis-postgresql14/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 5b07a5bd027d..1891f6b9ea2d 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgis-postgresql14'
pkgname=postgis-postgresql14
version=3.2.1
-revision=4
+revision=5
build_style=gnu-configure
configure_args="
--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -9,8 +9,8 @@ configure_args="
--with-protobufdir=${XBPS_CROSS_BASE}/usr
--with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
hostmakedepends="automake libtool perl pkg-config geos
- libgdal-tools postgresql-libs-devel which"
-makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ libgdal-tools postgresql14-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql14-libs-devel
proj-devel protobuf-c-devel pcre-devel json-c-devel"
checkdepends="libxslt CUnit-devel"
short_desc="Spatial database extender for PostgreSQL"
From 0137fdfc479183ffc4f2a832953520c9f65ca96a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:06 +0200
Subject: [PATCH 6/9] New package: postgis-postgresql15-3.2.1
---
srcpkgs/postgis | 2 +-
srcpkgs/postgis-postgresql14/template | 6 -----
srcpkgs/postgis-postgresql15/template | 38 +++++++++++++++++++++++++++
srcpkgs/postgis-postgresql15/update | 2 ++
4 files changed, 41 insertions(+), 7 deletions(-)
create mode 100644 srcpkgs/postgis-postgresql15/template
create mode 100644 srcpkgs/postgis-postgresql15/update
diff --git a/srcpkgs/postgis b/srcpkgs/postgis
index 07d2a298867d..3bacb4f025ed 120000
--- a/srcpkgs/postgis
+++ b/srcpkgs/postgis
@@ -1 +1 @@
-postgis-postgresql14
\ No newline at end of file
+postgis-postgresql15
\ No newline at end of file
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 1891f6b9ea2d..3b0fd21b5a65 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -30,9 +30,3 @@ pre_check() {
# regression tests require running postgresql
vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
}
-
-postgis_package() {
- build_style=meta
- short_desc+=" (meta package)"
- depends="postgis-postgresql14"
-}
diff --git a/srcpkgs/postgis-postgresql15/template b/srcpkgs/postgis-postgresql15/template
new file mode 100644
index 000000000000..ae140613c292
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/template
@@ -0,0 +1,38 @@
+# Template file for 'postgis-postgresql15'
+pkgname=postgis-postgresql15
+version=3.2.1
+revision=6
+build_style=gnu-configure
+configure_args="
+ --with-projdir=${XBPS_CROSS_BASE}/usr
+ --with-jsondir=${XBPS_CROSS_BASE}/usr
+ --with-protobufdir=${XBPS_CROSS_BASE}/usr
+ --with-geosconfig=${XBPS_CROSS_BASE}/usr/bin/geos-config"
+hostmakedepends="automake libtool perl pkg-config geos
+ libgdal-tools postgresql-libs-devel which"
+makedepends="geos-devel libgdal-devel libpqxx-devel libxml2-devel postgresql-libs-devel
+ proj-devel protobuf-c-devel pcre-devel json-c-devel"
+checkdepends="libxslt CUnit-devel"
+short_desc="Spatial database extender for PostgreSQL"
+maintainer="Piotr Wójcik <chocimier@tlen.pl>"
+license="GPL-2.0-or-later"
+homepage="https://postgis.net/"
+changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
+distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
+checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+nocross="FIXME: Cannot run test program to determine PROJ version"
+
+pre_configure() {
+ ./autogen.sh
+}
+
+pre_check() {
+ # regression tests require running postgresql
+ vsed -i regress/run_test.pl -e '/\/usr\/bin\/env/ a exit;'
+}
+
+postgis_package() {
+ build_style=meta
+ short_desc+=" (meta package)"
+ depends="${sourcepkg}"
+}
diff --git a/srcpkgs/postgis-postgresql15/update b/srcpkgs/postgis-postgresql15/update
new file mode 100644
index 000000000000..e5577e6b068a
--- /dev/null
+++ b/srcpkgs/postgis-postgresql15/update
@@ -0,0 +1,2 @@
+pkgname=postgis
+ignore="*alpha* *beta* *rc*"
From 405be2992c55c4d8dd9be90f8dc46ee01c5595b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Thu, 13 Oct 2022 23:05:19 +0200
Subject: [PATCH 7/9] postgresql: update to 15.
---
srcpkgs/postgresql/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template
index 349e0c92ac16..99f8adc3d420 100644
--- a/srcpkgs/postgresql/template
+++ b/srcpkgs/postgresql/template
@@ -1,7 +1,7 @@
# Template file for 'postgresql'
pkgname=postgresql
-version=14
-revision=2
+version=15
+revision=1
build_style=meta
depends="postgresql${version}"
short_desc="PostgreSQL server meta package"
From 09b2443730526c9504c0615d3d5bebee26a11267 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 4 Feb 2023 19:46:42 +0100
Subject: [PATCH 8/9] postgis-postgresql14: update to 3.3.2.
---
srcpkgs/postgis-postgresql14/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgis-postgresql14/template b/srcpkgs/postgis-postgresql14/template
index 3b0fd21b5a65..e15977173795 100644
--- a/srcpkgs/postgis-postgresql14/template
+++ b/srcpkgs/postgis-postgresql14/template
@@ -1,7 +1,7 @@
# Template file for 'postgis-postgresql14'
pkgname=postgis-postgresql14
-version=3.2.1
-revision=5
+version=3.3.2
+revision=1
build_style=gnu-configure
configure_args="
--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
homepage="https://postgis.net/"
changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=9a2a219da005a1730a39d1959a1c7cec619b1efb009b65be80ffc25bad299068
nocross="FIXME: Cannot run test program to determine PROJ version"
pre_configure() {
From 7a3652f443c226124e05309811e514b8bec78d53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= <chocimier@tlen.pl>
Date: Sat, 4 Feb 2023 19:46:43 +0100
Subject: [PATCH 9/9] postgis-postgresql15: update to 3.3.2.
---
srcpkgs/postgis-postgresql15/template | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/postgis-postgresql15/template b/srcpkgs/postgis-postgresql15/template
index ae140613c292..eb8650e16755 100644
--- a/srcpkgs/postgis-postgresql15/template
+++ b/srcpkgs/postgis-postgresql15/template
@@ -1,7 +1,7 @@
# Template file for 'postgis-postgresql15'
pkgname=postgis-postgresql15
-version=3.2.1
-revision=6
+version=3.3.2
+revision=1
build_style=gnu-configure
configure_args="
--with-projdir=${XBPS_CROSS_BASE}/usr
@@ -19,7 +19,7 @@ license="GPL-2.0-or-later"
homepage="https://postgis.net/"
changelog="https://git.osgeo.org/gitea/postgis/postgis/raw/tag/${version}/NEWS"
distfiles="https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz"
-checksum=fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e
+checksum=9a2a219da005a1730a39d1959a1c7cec619b1efb009b65be80ffc25bad299068
nocross="FIXME: Cannot run test program to determine PROJ version"
pre_configure() {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: Postgresql 15
2022-10-13 21:13 [PR PATCH] Postgresql 15 Chocimier
` (2 preceding siblings ...)
2023-02-04 18:52 ` Chocimier
@ 2023-02-04 19:48 ` Chocimier
3 siblings, 0 replies; 5+ messages in thread
From: Chocimier @ 2023-02-04 19:48 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
There's a merged pull request on the void-packages repository
Postgresql 15
https://github.com/void-linux/void-packages/pull/39938
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **yes**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-04 19:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 21:13 [PR PATCH] Postgresql 15 Chocimier
2023-01-12 2:29 ` github-actions
2023-01-17 20:13 ` [PR PATCH] [Updated] " Chocimier
2023-02-04 18:52 ` Chocimier
2023-02-04 19:48 ` [PR PATCH] [Merged]: " Chocimier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).