community/py3-wxpython: fix build with gcc 14

This commit is contained in:
mio 2024-09-08 03:13:15 +00:00 committed by Ariadne Conill
parent 400da98146
commit 30f21a0646
2 changed files with 33 additions and 1 deletions

View File

@ -3,7 +3,7 @@
_pkgname=wxPython
pkgname=py3-wxpython
pkgver=4.2.1
pkgrel=2
pkgrel=3
pkgdesc="Cross-platform GUI toolkit for the Python language"
url="https://wxpython.org/"
arch="all"
@ -25,6 +25,7 @@ subpackages="$pkgname-doc $pkgname-lang $pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-$pkgver.tar.gz
no-attrdict.patch
no-stacktrace.patch
gcc14.patch
"
builddir="$srcdir"/$_pkgname-$pkgver
# Not all unit tests are passing. Some due to missing features of xvfb where the
@ -59,4 +60,5 @@ sha512sums="
ee9ab8effb3c71de004c3d61ec583b9980c6b75fe9bb04cf2c76025ea70afc206bc3073c44d1c83c7ba604afed9fd38c01b9ef506617ba279a4ac58e3cf34438 wxPython-4.2.1.tar.gz
461bc59bad6120f64e112688914c9e8ddf0dc34d789244025cd05210b098fe671e2b10ee37067c48a822b3e528380998935eb0d70c5aa5bf3993f6c6ad50bb43 no-attrdict.patch
ebd45621684603ca5e481d2a32e9ddf7de8dcd8c9f49745bd1e8509f6c118361d59d092032a541d56cbbe69f00f307dd507d511b425f14c733379e1f4b627719 no-stacktrace.patch
fa4e4482281f308029d046ca08498a563215b271a38538b9727722ef0c57b5fcd1335d81b937564f8158fdf5c275c276035e3ca95905a4b594623d91c2a01e5c gcc14.patch
"

View File

@ -0,0 +1,30 @@
Fix -Wincompatible-pointer-types error in bundled sip with gcc 14.
Source: https://bugs.gentoo.org/show_bug.cgi?id=919000#c1
Upstream issue: https://github.com/wxWidgets/Phoenix/issues/2493
The fix is in upstream sip but the py3-wxpython release bundles an older
version at the moment.
Error:
```
../../../../sip/siplib/siplib.c: In function 'parsePass1':
../../../../sip/siplib/siplib.c:3900:20: error: assignment to 'sipSimpleWrapper
*' {aka 'struct _sipSimpleWrapper *'} from incompatible pointer type 'PyObject
*' {aka 'struct _object *'} [-Wincompatible-pointer-types]
3900 | *selfp = va_arg(va, PyObject *);
| ^
```
--- wxPython-4.2.1-origin/sip/siplib/siplib.c
+++ wxPython-4.2.1/sip/siplib/siplib.c
@@ -3897,7 +3897,7 @@
{
case '#':
/* A ctor has an argument with the /Transfer/ annotation. */
- *selfp = va_arg(va, PyObject *);
+ *selfp = (sipSimpleWrapper *) va_arg(va, PyObject *);
break;
case 'B':