diff --git a/1945.patch b/1945.patch new file mode 100644 index 0000000..d196932 --- /dev/null +++ b/1945.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/python-Shapely.changes b/python-Shapely.changes index 5e3a7cb..7a3f241 100644 --- a/python-Shapely.changes +++ b/python-Shapely.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 29 13:21:52 UTC 2024 - John Paul Adrian Glaubitz + +- Cherry-pick upstream patch to fix build with GCC 14 + * https://github.com/shapely/shapely/pull/1945.patch + ------------------------------------------------------------------- Sun May 5 11:01:36 UTC 2024 - Ben Greiner diff --git a/python-Shapely.spec b/python-Shapely.spec index fa1c8e0..b28f1de 100644 --- a/python-Shapely.spec +++ b/python-Shapely.spec @@ -24,6 +24,8 @@ Summary: Geospatial geometries, predicates, and operations License: BSD-3-Clause URL: https://github.com/shapely/shapely Source: https://files.pythonhosted.org/packages/source/s/shapely/shapely-%{version}.tar.gz +# PATCH-FIX-UPSTREAM Fix incompatible pointer type passed to GEOSPolygonize_r +Patch: https://github.com/shapely/shapely/pull/1945.patch BuildRequires: %{python_module Cython >= 0.29 with %python-Cython < 3} BuildRequires: %{python_module devel >= 3.8} BuildRequires: %{python_module numpy-devel >= 1.25}