diff --git a/mingw-w64-postgresql/PKGBUILD b/mingw-w64-postgresql/PKGBUILD index af48beb967..fd3e1849ba 100644 --- a/mingw-w64-postgresql/PKGBUILD +++ b/mingw-w64-postgresql/PKGBUILD @@ -3,8 +3,8 @@ _realname=postgresql pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=14.2 -pkgrel=2 +pkgver=14.5 +pkgrel=1 pkgdesc="Libraries for use with PostgreSQL (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -32,41 +32,52 @@ source=("https://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.t postgresql-13.1-disable-wsa-invalid-event-static-assert.patch postgresql-13.1-pgevent-def.patch postgresql-14.0-use-mingw-setjmp-on-ucrt.patch) - -sha256sums=('2cf78b2e468912f8101d695db5340cf313c2e9f68a612fb71427524e8c9a977a' +sha256sums=('d4f72cb5fb857c9a9f75ec8cf091a1771272802f2178f0b2e65b7b6ff64f4a30' '607217b422349770d25af20f88e4a7925e68bb934232dff368c2ee59f24249a4' - '57c1e9b75c042af591b05b9dda60e6327b5c364bb5adc2675da8a48b47e11b81' - '1afbe207b0fe8c4178cc3f8cb4e3923c7c000207d22ec4f3875d6358b312a1d5' - 'ab9c42374b4e8a01b598810b19b583d9ee7bf5c43c39c019f66b62aacac38926' + '99e6c8b9d58a9615c7bb1e7471b8e9c074add7bffc7d2cf742bafa38e9654e1f' + 'ced0ccf978eefc1ad0641803c9759b652e588eb552ec9179cd9dfc9d94ecf499' + 'b4e2a333ec98e3a60257b247b9922c2e7bb642686b05e2119610223a98aec376' '51c72fbd380d23cf944165405221912a277b9be99e285479772b39cacbbf384f' '72c14a78eeafdd3c9a13c3e124b1941b5da090488c7bd73f08b3cd78bacd07d5' 'ffaecbe5a38877728bddbf307b379b39c645dd1ffe53aa8d84dfa96807494764' 'e65f664644faa5cbd392c575a13bace31799e19d16be64cee362ba0e4a361c23') +# Helper macros to help make tasks easier # +apply_patch_with_msg() { + for _patch in "$@" + do + msg2 "Applying ${_patch}" + patch -Nbp1 -i "${srcdir}/${_patch}" + done +} + prepare() { cd ${srcdir}/postgresql-${pkgver} - patch -p1 -i ${srcdir}/postgresql-12.0-mingw-link.patch - patch -p1 -i ${srcdir}/postgresql-9.5.1-pl-perl.patch - patch -p1 -i ${srcdir}/postgresql-9.5.1-pl-python.patch - patch -p1 -i ${srcdir}/postgresql-9.4.1-pl-tcl.patch + apply_patch_with_msg \ + postgresql-12.0-mingw-link.patch \ + postgresql-9.5.1-pl-perl.patch \ + postgresql-9.5.1-pl-python.patch \ + postgresql-9.4.1-pl-tcl.patch \ + postgresql-13.1-disable-wsa-invalid-event-static-assert.patch \ + postgresql-13.1-pgevent-def.patch \ + postgresql-14.0-use-mingw-setjmp-on-ucrt.patch #patch -p1 -i ${srcdir}/postgresql-9.4.1-mingw-enable-readline.patch - patch -p1 -i ${srcdir}/postgresql-13.1-disable-wsa-invalid-event-static-assert.patch - patch -p1 -i ${srcdir}/postgresql-13.1-pgevent-def.patch - patch -p1 -i ${srcdir}/postgresql-14.0-use-mingw-setjmp-on-ucrt.patch sed -s "s|2\\.69|2\\.71|g" -i configure.ac autoreconf -fiv } build() { - [[ -d "${srcdir}/build-${CARCH}" ]] && rm -rf "${srcdir}/build-${CARCH}" + [[ -d "${srcdir}/build-${MSYSTEM}" ]] && rm -rf "${srcdir}/build-${MSYSTEM}" + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" + if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-i686* ]]; then # clang on i686 without sse2 is not supported by postgresql # https://www.postgresql.org/message-id/20180904221627.r4c3gp4pimzz4hyp%40alap3.anarazel.de CFLAGS+=" -msse2" fi - mkdir -p "${srcdir}/build-${CARCH}" && cd "${srcdir}/build-${CARCH}" export PYTHON=${MINGW_PREFIX}/bin/python + ../postgresql-${pkgver}/configure \ --build=${MINGW_CHOST} \ --host=${MINGW_CHOST} \ @@ -93,12 +104,12 @@ build() { } check() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MSYSTEM}" make check } package() { - cd "${srcdir}/build-${CARCH}" + cd "${srcdir}/build-${MSYSTEM}" mkdir -p "${pkgdir}${MINGW_PREFIX}/"{bin,include,lib} make DESTDIR="${pkgdir}" install diff --git a/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch b/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch index b543d62f13..9980468179 100644 --- a/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch +++ b/mingw-w64-postgresql/postgresql-9.4.1-pl-tcl.patch @@ -30,7 +30,7 @@ - dlltool --dllname $(tclwithver).dll --def $(tclwithver).def --output-lib lib$(tclwithver).a - -$(tclwithver).def: $(TCLDLL) -- pexports $^ > $@ +- gendef - $^ > $@ - -endif # win32 - diff --git a/mingw-w64-postgresql/postgresql-9.5.1-pl-perl.patch b/mingw-w64-postgresql/postgresql-9.5.1-pl-perl.patch index f78ef55777..1493c671f6 100644 --- a/mingw-w64-postgresql/postgresql-9.5.1-pl-perl.patch +++ b/mingw-w64-postgresql/postgresql-9.5.1-pl-perl.patch @@ -20,7 +20,7 @@ - dlltool --dllname $(perlwithver).dll --def $(perlwithver).def --output-lib lib$(perlwithver).a - -$(perlwithver).def: $(PERLDLL) -- pexports $^ > $@ +- gendef - $^ > $@ - -endif # win32 - diff --git a/mingw-w64-postgresql/postgresql-9.5.1-pl-python.patch b/mingw-w64-postgresql/postgresql-9.5.1-pl-python.patch index 0dbe0e268b..1b3a9d8d51 100644 --- a/mingw-w64-postgresql/postgresql-9.5.1-pl-python.patch +++ b/mingw-w64-postgresql/postgresql-9.5.1-pl-python.patch @@ -30,7 +30,7 @@ - dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a - -python${pytverstr}.def: -- pexports $(PYTHONDLL) > $@ +- gendef - $(PYTHONDLL) > $@ - -endif # win32 -