diff options
author | Sam James <sam@gentoo.org> | 2023-12-04 07:18:07 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-04 07:32:14 +0000 |
commit | 35e6eb22a520d6e8ea2148f6d92b9b48083f7a1f (patch) | |
tree | 514628a33a059f723b222c9eab424a3488c15ba3 /dev-python/shapely | |
parent | vala.eclass: adapt modern c workaround for gcc (diff) | |
download | gentoo-35e6eb22a520d6e8ea2148f6d92b9b48083f7a1f.tar.gz gentoo-35e6eb22a520d6e8ea2148f6d92b9b48083f7a1f.tar.bz2 gentoo-35e6eb22a520d6e8ea2148f6d92b9b48083f7a1f.zip |
dev-python/shapely: fix modern c pointer types
Bug: https://bugs.gentoo.org/885633
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/shapely')
-rw-r--r-- | dev-python/shapely/files/shapely-2.0.2-c99.patch | 19 | ||||
-rw-r--r-- | dev-python/shapely/shapely-2.0.2-r1.ebuild | 50 |
2 files changed, 69 insertions, 0 deletions
diff --git a/dev-python/shapely/files/shapely-2.0.2-c99.patch b/dev-python/shapely/files/shapely-2.0.2-c99.patch new file mode 100644 index 000000000000..a51fc8883103 --- /dev/null +++ b/dev-python/shapely/files/shapely-2.0.2-c99.patch @@ -0,0 +1,19 @@ +https://github.com/shapely/shapely/pull/1945 + +From 9795506bba84e96418466ae84573c0cf8654bbeb Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <code@musicinmybrain.net> +Date: Sun, 3 Dec 2023 11:36:36 -0500 +Subject: [PATCH] Fix incompatible pointer type passed to GEOSPolygonize_r + +--- 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/dev-python/shapely/shapely-2.0.2-r1.ebuild b/dev-python/shapely/shapely-2.0.2-r1.ebuild new file mode 100644 index 000000000000..794dd6b9b43e --- /dev/null +++ b/dev-python/shapely/shapely-2.0.2-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 + +MY_P=${P/_p/.post} +DESCRIPTION="Geometric objects, predicates, and operations" +HOMEPAGE=" + https://pypi.org/project/shapely/ + https://github.com/shapely/shapely/ +" +SRC_URI=" + https://github.com/shapely/shapely/archive/${PV/_p/.post}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~x86" + +DEPEND=" + >=sci-libs/geos-3.9 +" +RDEPEND=" + ${DEPEND} + dev-python/numpy[${PYTHON_USEDEP}] +" +BDEPEND=" + ${DEPEND} + >=dev-python/cython-0.29.32[${PYTHON_USEDEP}] + dev-python/packaging[${PYTHON_USEDEP}] +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.2-c99.patch +) + +distutils_enable_tests pytest + +python_test() { + rm -rf shapely || die + epytest --pyargs shapely +} |