Update mingw-w64-postgresql to 16.0

This commit is contained in:
Martchus 2023-11-07 14:26:45 +01:00
parent 644b51667c
commit 54287988e4
4 changed files with 28 additions and 27 deletions

View File

@ -17,7 +17,7 @@ replaces=('mingw-w64-libmariadbclient')
conflicts=('mingw-w64-libmariadbclient')
provides=("mingw-w64-libmariadbclient=$pkgver")
depends=('mingw-w64-crt' 'mingw-w64-openssl' 'mingw-w64-zlib' 'mingw-w64-curl')
makedepends=('mingw-w64-cmake')
makedepends=('mingw-w64-cmake' 'ninja')
options=('!strip' '!buildflags' 'staticlibs')
source=(
"https://github.com/mariadb-corporation/mariadb-connector-c/archive/refs/tags/v$pkgver.tar.gz"
@ -42,14 +42,15 @@ build() {
cd "$srcdir/mariadb-connector-c-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
${_arch}-cmake \
-DCMAKE_BUILD_TYPE=RELEASE \
${_arch}-cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DWARNING_AS_ERROR=OFF \
-DWITH_EXTERNAL_ZLIB=ON \
-DWITH_SSL=OPENSSL \
-DWITH_MYSQLCOMPAT=ON \
-DWITH_UNIT_TESTS=OFF \
..
make
cmake --build .
popd
done
}
@ -57,7 +58,7 @@ build() {
package() {
for _arch in ${_architectures}; do
cd "$srcdir/mariadb-connector-c-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
DESTDIR="${pkgdir}" cmake --install .
ln -s mariadb "$pkgdir"/usr/${_arch}/include/mysql
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/lib/plugin/*.dll

View File

@ -1,4 +1,4 @@
From ffc33301366f141f16519fc4999944c93d1e4a61 Mon Sep 17 00:00:00 2001
From 00a71f606a758f281a982d4fa96eb6fcf85a1007 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 7 Mar 2021 18:22:06 +0100
Subject: [PATCH 1/2] Use .dll.a as extension for import libraries
@ -9,7 +9,7 @@ Subject: [PATCH 1/2] Use .dll.a as extension for import libraries
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 29a7f6d38c..106139e929 100644
index 35abce58d2..4f6731c291 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -85,7 +85,7 @@ else
@ -22,15 +22,15 @@ index 29a7f6d38c..106139e929 100644
ifndef soname
# additional flags for backend modules
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 9706a95848..21d43c072b 100644
index 3c42003175..36cc12865b 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -72,11 +72,11 @@ endif
@@ -74,11 +74,11 @@ endif
ifeq ($(PORTNAME), cygwin)
postgres: $(OBJS)
- $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) -Wl,--stack,$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) $(LDFLAGS_EX) $(export_dynamic) -Wl,--stack,$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.dll.a $(LIBS) -o $@
- $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) -Wl,--stack,$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(LIBS) -o $@
+ $(CC) $(CFLAGS) $(call expand_subsys,$^) $(LDFLAGS) -Wl,--stack,$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.dll.a $(LIBS) -o $@
-# libpostgres.a is actually built in the preceding rule, but we need this to
+# libpostgres.dll.a is actually built in the preceding rule, but we need this to
@ -40,12 +40,12 @@ index 9706a95848..21d43c072b 100644
touch $@
endif # cygwin
@@ -85,11 +85,11 @@ ifeq ($(PORTNAME), win32)
@@ -87,11 +87,11 @@ ifeq ($(PORTNAME), win32)
LIBS += -lsecur32
postgres: $(OBJS) $(WIN32RES)
- $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(LIBS) -o $@$(X)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.dll.a $(LIBS) -o $@$(X)
- $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LDFLAGS) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.a $(LIBS) -o $@$(X)
+ $(CC) $(CFLAGS) $(call expand_subsys,$(OBJS)) $(WIN32RES) $(LDFLAGS) -Wl,--stack=$(WIN32_STACK_RLIMIT) -Wl,--export-all-symbols -Wl,--out-implib=libpostgres.dll.a $(LIBS) -o $@$(X)
-# libpostgres.a is actually built in the preceding rule, but we need this to
+# libpostgres.dll.a is actually built in the preceding rule, but we need this to
@ -55,7 +55,7 @@ index 9706a95848..21d43c072b 100644
touch $@
endif # win32
@@ -198,12 +198,12 @@ distprep:
@@ -191,12 +191,12 @@ distprep:
install: all installdirs install-bin
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
@ -70,7 +70,7 @@ index 9706a95848..21d43c072b 100644
endif
endif
$(MAKE) -C catalog install-data
@@ -263,12 +263,12 @@ ifeq ($(MAKE_EXPORTS), true)
@@ -250,12 +250,12 @@ ifeq ($(MAKE_EXPORTS), true)
endif
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
@ -85,7 +85,7 @@ index 9706a95848..21d43c072b 100644
endif
endif
$(MAKE) -C catalog uninstall-data
@@ -287,10 +287,10 @@ endif
@@ -274,10 +274,10 @@ endif
clean:
rm -f $(LOCALOBJS) postgres$(X) $(POSTGRES_IMP)
ifeq ($(PORTNAME), cygwin)
@ -99,5 +99,5 @@ index 9706a95848..21d43c072b 100644
distclean: clean
--
2.30.1
2.42.0

View File

@ -1,4 +1,4 @@
From 90d0aca155c9f3fd89afbab6442c91a513bfcd94 Mon Sep 17 00:00:00 2001
From 4afcae4c759443f2be115b04277882adda4e93b0 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 7 Mar 2021 18:24:32 +0100
Subject: [PATCH 2/2] Use pthread library from MinGW
@ -8,10 +8,10 @@ Subject: [PATCH 2/2] Use pthread library from MinGW
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index d4919970f8..ec30bfeb9e 100644
index 0919d8f32f..6d81de7182 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -66,7 +66,7 @@ OBJS += \
@@ -72,7 +72,7 @@ OBJS += \
win32.o
ifeq ($(enable_thread_safety), yes)
@ -21,5 +21,5 @@ index d4919970f8..ec30bfeb9e 100644
endif
--
2.30.1
2.42.0

View File

@ -2,14 +2,14 @@
# Contributor: ant32 <antreimer@gmail.com>
pkgname=mingw-w64-postgresql
pkgver=15.0
pkgver=16.0
pkgrel=1
pkgdesc='Sophisticated object-relational DBMS (mingw-w64)'
arch=('any')
url='https://www.postgresql.org'
license=('custom:PostgreSQL')
makedepends=('mingw-w64-configure' 'libxml2')
depends=('mingw-w64-gettext' 'mingw-w64-openssl>=1.0.0' 'mingw-w64-libxml2' 'mingw-w64-readline')
depends=('mingw-w64-gettext' 'mingw-w64-openssl>=1.0.0' 'mingw-w64-libxml2' 'mingw-w64-readline' 'mingw-w64-icu')
options=(staticlibs !strip !buildflags)
provides=('mingw-w64-postgresql-libs')
conflicts=('mingw-w64-postgresql-libs')
@ -17,9 +17,9 @@ replaces=('mingw-w64-postgresql-libs')
source=("http://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2"
'0001-Use-.dll.a-as-extension-for-import-libraries.patch'
'0002-Use-pthread-library-from-MinGW.patch')
sha256sums=('72ec74f4a7c16e684f43ea42e215497fcd4c55d028a68fb72e99e61ff40da4d6'
'6119ad2418ce9995acf13b0f095ffa521250bae18cd387083c04e92b6ff22814'
'55c636400087482f896530e80f07706fff6c5c5b5654955d71944f035940e6a5')
sha256sums=('df9e823eb22330444e1d48e52cc65135a652a6fdb3ce325e3f08549339f51b99'
'44b1cceb0f5ef792acc00e9415dc2f7f777747199078ce4c8704d3420de52cf5'
'72e627524dd4994d85db43ea02d71b2c9983037306a85822f744e76b40f40f2f')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"