[packages/python-pygame] - added fix for portmidi 2.0.x

qboosh qboosh at pld-linux.org
Fri Oct 4 22:07:57 CEST 2024


commit 0dafabab2a4ee945bef5f28c89f4d32195ea3bda
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Oct 4 22:05:16 2024 +0200

    - added fix for portmidi 2.0.x

 pygame-portmidi.patch | 22 ++++++++++++++++++++++
 python-pygame.spec    |  2 ++
 2 files changed, 24 insertions(+)
---
diff --git a/python-pygame.spec b/python-pygame.spec
index ac100bb..56057b2 100644
--- a/python-pygame.spec
+++ b/python-pygame.spec
@@ -16,6 +16,7 @@ Group:		Libraries/Python
 Source0:	https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz
 # Source0-md5:	04e082d216b3b771b8d52769597b2fb2
 Patch0:		pygame-py2-types.patch
+Patch1:		pygame-portmidi.patch
 Patch2:		x32.patch
 URL:		https://www.pygame.org/
 %if %{with sdl1}
@@ -89,6 +90,7 @@ Przykłady do modułów Pythona pygame.
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
+%patch1 -p1
 %patch2 -p1
 
 # missing file, required for py2
diff --git a/pygame-portmidi.patch b/pygame-portmidi.patch
new file mode 100644
index 0000000..d91de6f
--- /dev/null
+++ b/pygame-portmidi.patch
@@ -0,0 +1,22 @@
+--- pygame-2.0.3/src_c/cython/pygame/pypm.pyx.orig	2021-10-31 16:49:23.000000000 +0100
++++ pygame-2.0.3/src_c/cython/pygame/pypm.pyx	2024-10-04 21:47:29.565174454 +0200
+@@ -542,7 +542,7 @@ cdef class Input:
+         self.debug = 0
+ 
+         err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
+-                           &Pt_Time, NULL)
++                           <PmTimeProcPtr>&Pt_Time, NULL)
+         if err < 0:
+             raise Exception(Pm_GetErrorText(err))
+ 
+--- pygame-2.0.3/src_c/pypm.c.orig	2021-10-31 16:49:23.000000000 +0100
++++ pygame-2.0.3/src_c/pypm.c	2024-10-04 21:47:07.065045505 +0200
+@@ -4662,7 +4662,7 @@ static int __pyx_pf_6pygame_4pypm_5Input
+  *         if err < 0:
+  *             raise Exception(Pm_GetErrorText(err))
+  */
+-  __pyx_v_err = Pm_OpenInput((&__pyx_v_self->midi), __pyx_t_2, NULL, __pyx_t_3, (&Pt_Time), NULL);
++  __pyx_v_err = Pm_OpenInput((&__pyx_v_self->midi), __pyx_t_2, NULL, __pyx_t_3, (PmTimeProcPtr)(&Pt_Time), NULL);
+ 
+   /* "pygame/pypm.pyx":546
+  *         err = Pm_OpenInput(&(self.midi), input_device, NULL, buffersize,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygame.git/commitdiff/0dafabab2a4ee945bef5f28c89f4d32195ea3bda



More information about the pld-cvs-commit mailing list