From c5f1980b424ecbe33b3218b39601dda6fd7ba7e6 Mon Sep 17 00:00:00 2001 From: ArTourter Date: Sun, 1 Sep 2024 23:32:42 +0100 Subject: [PATCH] gis/python3-shapely: Updated for version 2.0.6. Apply updstream patch to fix compilation with gcc 14 (-current) Signed-off-by: ArTourter Signed-off-by: Willy Sudiarto Raharjo --- ...506bba84e96418466ae84573c0cf8654bbeb.patch | 22 +++++++++++++++++++ .../python3-shapely.SlackBuild | 5 ++++- gis/python3-shapely/python3-shapely.info | 6 ++--- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 gis/python3-shapely/9795506bba84e96418466ae84573c0cf8654bbeb.patch diff --git a/gis/python3-shapely/9795506bba84e96418466ae84573c0cf8654bbeb.patch b/gis/python3-shapely/9795506bba84e96418466ae84573c0cf8654bbeb.patch new file mode 100644 index 0000000000..90359ce4bc --- /dev/null +++ b/gis/python3-shapely/9795506bba84e96418466ae84573c0cf8654bbeb.patch @@ -0,0 +1,22 @@ +From 9795506bba84e96418466ae84573c0cf8654bbeb Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Sun, 3 Dec 2023 11:36:36 -0500 +Subject: [PATCH] Fix incompatible pointer type passed to GEOSPolygonize_r + +--- + src/ufuncs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ufuncs.c b/src/ufuncs.c +index ed83e9619..9d08fa20c 100644 +--- a/src/ufuncs.c ++++ b/src/ufuncs.c +@@ -2160,7 +2160,7 @@ static void polygonize_func(char** args, const npy_intp* dimensions, const npy_i + + GEOS_INIT; + +- GEOSGeometry** geoms = malloc(sizeof(void*) * dimensions[1]); ++ const GEOSGeometry** geoms = malloc(sizeof(void*) * dimensions[1]); + if (geoms == NULL) { + errstate = PGERR_NO_MALLOC; + goto finish; diff --git a/gis/python3-shapely/python3-shapely.SlackBuild b/gis/python3-shapely/python3-shapely.SlackBuild index d2de6e6f15..adc113ed05 100644 --- a/gis/python3-shapely/python3-shapely.SlackBuild +++ b/gis/python3-shapely/python3-shapely.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-shapely -VERSION=${VERSION:-2.0.4} +VERSION=${VERSION:-2.0.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -66,6 +66,9 @@ find -L . \ -perm /111 -o \! -perm 755 -o -exec chmod 755 {} + -a \ \! -perm /111 -o \! -perm 644 -o -exec chmod 644 {} + +# Apply upstream patch to fix compilation with gcc 14 +patch -p1 < $CWD/9795506bba84e96418466ae84573c0cf8654bbeb.patch + # Fixing numpy dependency check in pyproject.toml: # oldest-supported-numpy has a strict check and doesn't support newer version # so we replace it. The alternative is to add --skip-dependency-check to tbe diff --git a/gis/python3-shapely/python3-shapely.info b/gis/python3-shapely/python3-shapely.info index 26699c0d97..e1b56e8498 100644 --- a/gis/python3-shapely/python3-shapely.info +++ b/gis/python3-shapely/python3-shapely.info @@ -1,8 +1,8 @@ PRGNAM="python3-shapely" -VERSION="2.0.4" +VERSION="2.0.6" HOMEPAGE="https://github.com/shapely/shapely" -DOWNLOAD="https://github.com/shapely/shapely/archive/2.0.4/shapely-2.0.4.tar.gz" -MD5SUM="078dd2876cffa8ccc3bd5a84a67a2c74" +DOWNLOAD="https://github.com/shapely/shapely/archive/2.0.6/shapely-2.0.6.tar.gz" +MD5SUM="8a8294e0d12479457e0c84a3a5d4665b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="python3-setuptools-opt python3-numpy geos"