[packages/python-pygame] - more build fixes
qboosh
qboosh at pld-linux.org
Thu Sep 26 20:31:09 CEST 2024
commit 913cbca464c4b1980bed5c369bc6d08c8f5a0a28
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Sep 26 20:34:15 2024 +0200
- more build fixes
pygame-py2-types.patch | 24 ++++++++++++++++++++++++
python-pygame.spec | 2 ++
x32.patch | 27 ++++++++++++++++++++++-----
3 files changed, 48 insertions(+), 5 deletions(-)
---
diff --git a/python-pygame.spec b/python-pygame.spec
index 45ac2f8..bd76181 100644
--- a/python-pygame.spec
+++ b/python-pygame.spec
@@ -13,6 +13,7 @@ License: LGPL v2.1+
Group: Libraries/Python
Source0: https://files.pythonhosted.org/packages/source/p/pygame/pygame-%{version}.tar.gz
# Source0-md5: 36f8817874f9e63acdf12914340b60e9
+Patch0: pygame-py2-types.patch
Patch2: x32.patch
URL: https://www.pygame.org/
BuildRequires: SDL-devel
@@ -78,6 +79,7 @@ Przykłady do modułów Pythona pygame.
%prep
%setup -q -n %{module}-%{version}
+%patch0 -p1
%patch2 -p1
%build
diff --git a/pygame-py2-types.patch b/pygame-py2-types.patch
new file mode 100644
index 0000000..cce99f9
--- /dev/null
+++ b/pygame-py2-types.patch
@@ -0,0 +1,24 @@
+--- pygame-1.9.6/src_c/font.c.orig 2019-04-25 08:14:17.000000000 +0200
++++ pygame-1.9.6/src_c/font.c 2024-09-26 19:48:26.221792668 +0200
+@@ -548,8 +548,8 @@ font_metrics(PyObject *self, PyObject *a
+ int advance;
+ PyObject *obj;
+ PyObject *listitem;
+- Uint16* buffer;
+- Uint16 ch;
++ char* buffer;
++ char ch;
+ PyObject *temp;
+ int surrogate;
+
+--- pygame-1.9.6/src_c/event.c.orig 2019-04-25 08:14:17.000000000 +0200
++++ pygame-1.9.6/src_c/event.c 2024-09-26 19:57:56.855188202 +0200
+@@ -1718,7 +1718,7 @@ static PyMethodDef _event_methods[] = {
+ "auto initialize for event module"},
+ #endif /* IS_SDLv2 */
+
+- {"Event", pg_Event, 3, DOC_PYGAMEEVENTEVENT},
++ {"Event", (PyCFunction)pg_Event, 3, DOC_PYGAMEEVENTEVENT},
+ {"event_name", event_name, METH_VARARGS, DOC_PYGAMEEVENTEVENTNAME},
+
+ {"set_grab", set_grab, METH_VARARGS, DOC_PYGAMEEVENTSETGRAB},
diff --git a/x32.patch b/x32.patch
index 9cb59c6..118f4d0 100644
--- a/x32.patch
+++ b/x32.patch
@@ -1,11 +1,28 @@
--- pygame-1.9.6/buildconfig/config_unix.py.orig 2019-04-25 08:14:17.000000000 +0200
-+++ pygame-1.9.6/buildconfig/config_unix.py 2024-09-26 17:35:08.789307494 +0200
-@@ -149,7 +149,7 @@ def main(sdl2=False):
++++ pygame-1.9.6/buildconfig/config_unix.py 2024-09-26 19:38:56.998397169 +0200
+@@ -149,11 +149,10 @@ def main(sdl2=False):
#these get prefixes with '/usr' and '/usr/local' or the $LOCALBASE
if sdl2:
origincdirs = ['/include', '/include/SDL2']
- origlibdirs = ['/lib','/lib64','/X11R6/lib',
-+ origlibdirs = ['/lib','/lib64','/libx32',
- '/lib/i386-linux-gnu', '/lib/x86_64-linux-gnu']
+- '/lib/i386-linux-gnu', '/lib/x86_64-linux-gnu']
++ origlibdirs = ['/lib','/lib64','/libx32']
else:
- origincdirs = ['/include', '/include/SDL', '/include/SDL']
+- origincdirs = ['/include', '/include/SDL', '/include/SDL']
+- origlibdirs = ['/lib','/lib64','/X11R6/lib']
++ origincdirs = ['/include', '/include/SDL']
++ origlibdirs = ['/lib','/lib64','/libx32']
+ if 'ORIGLIBDIRS' in os.environ and os.environ['ORIGLIBDIRS'] != "":
+ origlibdirs = os.environ['ORIGLIBDIRS'].split(":")
+
+--- pygame-1.9.6/src_c/scale_mmx.c.orig 2019-04-25 08:14:17.000000000 +0200
++++ pygame-1.9.6/src_c/scale_mmx.c 2024-09-26 20:21:01.509926690 +0200
+@@ -29,7 +29,7 @@
+ * Including source code like this may be frowned upon by some,
+ * but the alternative is ungainly conditionally compiled code.
+ */
+-# if defined(__x86_64__)
++# if defined(__x86_64__) && defined(__LP64__)
+ # include "scale_mmx64.c"
+ # elif defined(__i386__)
+ # include "scale_mmx32.c"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pygame.git/commitdiff/913cbca464c4b1980bed5c369bc6d08c8f5a0a28
More information about the pld-cvs-commit
mailing list