From adb0a547da2a261d7a56a0c5de61885c03ed2399 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 8 Jan 2024 08:27:31 +0700 Subject: python/python3-pygame: Added (python3 version of pygame). Signed-off-by: Willy Sudiarto Raharjo --- python/python3-pygame/setup.patch | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 python/python3-pygame/setup.patch (limited to 'python/python3-pygame/setup.patch') diff --git a/python/python3-pygame/setup.patch b/python/python3-pygame/setup.patch new file mode 100644 index 0000000000..c8c0782f79 --- /dev/null +++ b/python/python3-pygame/setup.patch @@ -0,0 +1,54 @@ +--- pygame-2.5.2/setup.orig 2024-01-06 19:06:26.065813273 +0200 ++++ pygame-2.5.2/setup.py 2024-01-06 19:29:38.623909698 +0200 +@@ -7,6 +7,7 @@ + # python setup.py install + + import glob ++import distro + import platform + import sysconfig + +@@ -125,7 +126,7 @@ + distutils.ccompiler.CCompiler.spawn = spawn + + # A (bit hacky) fix for https://github.com/pygame/pygame/issues/2613 +-# This is due to the fact that distutils uses command line args to ++# This is due to the fact that distutils uses command line args to + # export PyInit_* functions on windows, but those functions are already exported + # and that is why compiler gives warnings + from distutils.command.build_ext import build_ext +@@ -140,12 +141,10 @@ + """ + the_system = platform.system() + if the_system == 'Linux': +- if hasattr(platform, 'linux_distribution'): +- distro = platform.linux_distribution() +- if distro[0].lower() == 'ubuntu': +- the_system = 'Ubuntu' +- elif distro[0].lower() == 'debian': +- the_system = 'Debian' ++ if distro.name().lower() == 'ubuntu': ++ the_system = 'Ubuntu' ++ elif distro.name().lower() == 'slackware': ++ the_system = 'Slackware' + + help_urls = { + 'Linux': 'https://www.pygame.org/wiki/Compilation', +@@ -299,7 +298,7 @@ + for i, kwargs in enumerate(queue): + kwargs['progress'] = f'[{i + 1}/{count}] ' + cythonize_one(**kwargs) +- ++ + if cython_only: + sys.exit(0) + +@@ -458,7 +457,7 @@ + + if "freetype" in e.name and sys.platform not in ("darwin", "win32"): + # TODO: fix freetype issues here +- if sysconfig.get_config_var("MAINCC") != "clang": ++ if sysconfig.get_config_var("MAINCC") != "clang": + e.extra_compile_args.append("-Wno-error=unused-but-set-variable") + + if "mask" in e.name and sys.platform == "win32": -- cgit v1.2.3