swi-prolog: new version 9.2.7 (#21842)
* swi-prolog: new version 9.2.7 * minor fixes in subpackage organization * added swi-prolog-x (graphics subsystem) * Two patches: reported and fixed upstream
This commit is contained in:
11
mingw-w64-swi-prolog/01-console-add-stdbool.patch
Normal file
11
mingw-w64-swi-prolog/01-console-add-stdbool.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- 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 <signal.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdbool.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#pragma warning(disable : 4996) /* deprecate open() etc */
|
||||
|
||||
22
mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch
Normal file
22
mingw-w64-swi-prolog/02-xpce-create-fix-declaration.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
--- 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;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
_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}-python" "${MINGW_PACKAGE_PREFIX}-${_realname}-doc" "${MINGW_PACKAGE_PREFIX}-${_realname}-examples" "${MINGW_PACKAGE_PREFIX}-${_realname}-tests")
|
||||
pkgver=9.2.6
|
||||
pkgrel=2
|
||||
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
|
||||
pkgrel=1
|
||||
pkgdesc="Prolog environment (mingw-w64)"
|
||||
arch=(any)
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
@@ -26,9 +26,20 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-db"
|
||||
"${MINGW_PACKAGE_PREFIX}-libyaml"
|
||||
"${MINGW_PACKAGE_PREFIX}-openssl"
|
||||
"${MINGW_PACKAGE_PREFIX}-openjpeg2"
|
||||
"${MINGW_PACKAGE_PREFIX}-python")
|
||||
source=("https://www.swi-prolog.org/download/stable/src/swipl-${pkgver}.tar.gz")
|
||||
sha256sums=('0cb9b80b9922be8165cbac384ebe050d94553e72cf7aebfc980b4395ff01d05d')
|
||||
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')
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/swipl-${pkgver}
|
||||
patch -p1 < ${srcdir}/01-console-add-stdbool.patch
|
||||
patch -p1 < ${srcdir}/02-xpce-create-fix-declaration.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
|
||||
@@ -50,7 +61,6 @@ build() {
|
||||
-DUSE_GMP=ON \
|
||||
-DSWIPL_PACKAGES_JAVA=OFF \
|
||||
-DSWIPL_PACKAGES_ODBC=OFF \
|
||||
-DSWIPL_PACKAGES_X=OFF \
|
||||
-DBUILD_TESTING=ON \
|
||||
-DINSTALL_TESTS=ON \
|
||||
-DSWIPL_{SHARED,STATIC}_LIB=ON \
|
||||
@@ -62,9 +72,6 @@ build() {
|
||||
|
||||
check() {
|
||||
cd "${srcdir}"/build-${MSYSTEM}
|
||||
"${MINGW_PREFIX}"/bin/cmake -DBUILD_TESTING=ON ../swipl-${pkgver}
|
||||
"${MINGW_PREFIX}"/bin/cmake --build .
|
||||
|
||||
PYTHONHOME="${MINGW_PREFIX}" "${MINGW_PREFIX}"/bin/ctest
|
||||
}
|
||||
|
||||
@@ -129,6 +136,19 @@ package_swi-prolog-python() {
|
||||
cp -R "${srcdir}/Python_interface${MINGW_PREFIX}"/lib/swipl/* "${pkgdir}${MINGW_PREFIX}"/lib/swipl/
|
||||
}
|
||||
|
||||
package_swi-prolog-x() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-${_realname}-core"
|
||||
"${MINGW_PACKAGE_PREFIX}-openjpeg2")
|
||||
conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}<9.2.6")
|
||||
pkgdesc="Graphics subsystem for SWI-Prolog"
|
||||
|
||||
cd "${srcdir}/build-${MSYSTEM}"
|
||||
DESTDIR=${srcdir}/Graphics_subsystem "${MINGW_PREFIX}"/bin/cmake -DCMAKE_INSTALL_COMPONENT=Graphics_subsystem -P cmake_install.cmake
|
||||
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/swipl"
|
||||
cp -R "${srcdir}/Graphics_subsystem${MINGW_PREFIX}"/lib/swipl/* "${pkgdir}${MINGW_PREFIX}"/lib/swipl/
|
||||
}
|
||||
|
||||
package_swi-prolog-bdb() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-db"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}-core")
|
||||
@@ -218,6 +238,8 @@ package_swi-prolog-tests() {
|
||||
DESTDIR="$srcdir/install-tests" "${MINGW_PREFIX}"/bin/cmake.exe --install .
|
||||
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}/lib/swipl"
|
||||
rm -Rf "$srcdir/install-tests${MINGW_PREFIX}/lib/swipl/test/packages/swipy/tests/__pycache__"
|
||||
rm -Rf "$srcdir/install-tests${MINGW_PREFIX}/lib/swipl/test/packages/swipy/xsb_tests/__pycache__"
|
||||
mv "$srcdir/install-tests${MINGW_PREFIX}/lib/swipl/test" "${pkgdir}${MINGW_PREFIX}/lib/swipl/"
|
||||
}
|
||||
|
||||
@@ -229,6 +251,7 @@ package_swi-prolog-full() {
|
||||
"${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"
|
||||
|
||||
Reference in New Issue
Block a user