From bd247bd881c8f3ef577ee4c988120c4bcfea88e9 Mon Sep 17 00:00:00 2001 From: mgondan Date: Sat, 26 Oct 2024 23:27:02 +0200 Subject: [PATCH] swi-prolog: update to 9.2.8 (#22290) * Delete mingw-w64-swi-prolog/01-console-add-stdbool.patch * Specify encoding in MQI unit tests * Delete mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch --- .../01-console-add-stdbool.patch | 11 ---------- .../01-mqi-specify-encoding.patch | 12 ++++++++++ .../02-xpce-create-fix-declaration.patch | 22 ------------------- mingw-w64-swi-prolog/PKGBUILD | 13 +++++------ 4 files changed, 17 insertions(+), 41 deletions(-) delete mode 100644 mingw-w64-swi-prolog/01-console-add-stdbool.patch create mode 100644 mingw-w64-swi-prolog/01-mqi-specify-encoding.patch delete mode 100644 mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch diff --git a/mingw-w64-swi-prolog/01-console-add-stdbool.patch b/mingw-w64-swi-prolog/01-console-add-stdbool.patch deleted file mode 100644 index 36b64f0d2f..0000000000 --- a/mingw-w64-swi-prolog/01-console-add-stdbool.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- swipl-9.2.7/src/win32/console/console.h 2024-09-04 11:09:04 +0000 -+++ swipl-9.2.7/src/win32/console/console.h 2023-01-27 17:27:29 +0000 -@@ -51,6 +51,7 @@ - - #include - #include -+#include - #ifdef _MSC_VER - #include - #pragma warning(disable : 4996) /* deprecate open() etc */ - diff --git a/mingw-w64-swi-prolog/01-mqi-specify-encoding.patch b/mingw-w64-swi-prolog/01-mqi-specify-encoding.patch new file mode 100644 index 0000000000..66b87764b9 --- /dev/null +++ b/mingw-w64-swi-prolog/01-mqi-specify-encoding.patch @@ -0,0 +1,12 @@ +--- swipl-9.2.8/packages/mqi/python/test_prologserver.py 2024-08-26 18:00:12.000000000 +0200 ++++ swipl-9.2.8/packages/mqi/python/test_prologserver.py 2024-09-04 22:30:28.330505000 +0200 +@@ -120,7 +120,7 @@ + if os.name == "nt": + call = "TASKLIST", "/FI", "imagename eq %s" % process_name + ".exe" + # use buildin check_output right away +- output = subprocess.check_output(call).decode() ++ output = subprocess.check_output(call).decode(encoding='UTF-8', errors='replace') + # check each line for process name + count = 0 + for line in output.strip().split("\r\n"): + diff --git a/mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch b/mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch deleted file mode 100644 index 4db58a8234..0000000000 --- a/mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- swipl-9.2.7/packages/xpce/deps/xpm/create.c 2024-08-26 18:00:12.000000000 +0200 -+++ swipl-9.2.7/packages/xpce/deps/xpm/create.c 2024-09-04 22:30:28.330505000 +0200 -@@ -220,16 +220,16 @@ - static int - AllocColor(display, colormap, colorname, xcolor, closure) - Display *display; -- Colormap *colormap; -+ Colormap colormap; - char *colorname; - XColor *xcolor; - void *closure; /* not used */ - { - int status; - if (colorname) -- if (!XParseColor(display, colormap, colorname, xcolor)) -+ if (!XParseColor(display, &colormap, colorname, xcolor)) - return -1; -- status = XAllocColor(display, colormap, xcolor); -+ status = XAllocColor(display, &colormap, xcolor); - return status != 0 ? 1 : 0; - } - diff --git a/mingw-w64-swi-prolog/PKGBUILD b/mingw-w64-swi-prolog/PKGBUILD index ad3dcbeea5..1ffeadf02f 100644 --- a/mingw-w64-swi-prolog/PKGBUILD +++ b/mingw-w64-swi-prolog/PKGBUILD @@ -3,7 +3,7 @@ _realname=swi-prolog pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-full" "${MINGW_PACKAGE_PREFIX}-${_realname}-core" "${MINGW_PACKAGE_PREFIX}-${_realname}-packages" "${MINGW_PACKAGE_PREFIX}-${_realname}-archive" "${MINGW_PACKAGE_PREFIX}-${_realname}-bdb" "${MINGW_PACKAGE_PREFIX}-${_realname}-pcre2" "${MINGW_PACKAGE_PREFIX}-${_realname}-yaml" "${MINGW_PACKAGE_PREFIX}-${_realname}-ssl" "${MINGW_PACKAGE_PREFIX}-${_realname}-x" "${MINGW_PACKAGE_PREFIX}-${_realname}-python" "${MINGW_PACKAGE_PREFIX}-${_realname}-doc" "${MINGW_PACKAGE_PREFIX}-${_realname}-examples" "${MINGW_PACKAGE_PREFIX}-${_realname}-tests") -pkgver=9.2.7 +pkgver=9.2.8 pkgrel=1 pkgdesc="Prolog environment (mingw-w64)" arch=(any) @@ -29,16 +29,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-openjpeg2" "${MINGW_PACKAGE_PREFIX}-python") source=("https://www.swi-prolog.org/download/stable/src/swipl-${pkgver}.tar.gz" - "01-console-add-stdbool.patch" - "02-xpce-create-fix-declaration.patch") -sha256sums=('fd4126f047e0784112741a874e2f7f8c68b5edd6426ded621df355c62d18c96f' - '7cb0be1a42477546bee0619ed61404679276f5bb97fd825222f1386c7b55a35a' - '944e794f05b1643b4109016b79d0fcff8195f9a79abc08642491779ba56148fb') + "01-mqi-specify-encoding.patch") +sha256sums=('b331637a57c913c49edcfcb10ddcf6c031278ce93d2411d54542778531abb5c7' + 'b1e2341590c46d3bcc2e4b7ad85645a91a5979d7aa6ad39e6899c9c3fbdf2f94') prepare() { cd ${srcdir}/swipl-${pkgver} - patch -p1 < ${srcdir}/01-console-add-stdbool.patch - patch -p1 < ${srcdir}/02-xpce-create-fix-declaration.patch + patch -p1 < ${srcdir}/01-mqi-specify-encoding.patch } build() {