Thu Nov 23 15:39:05 2023 UTC ()
py-game_sdl2: Update to 2.1.0.8.1.3

* Support Cython 3. No considereation for performance.
* Python 3.12 is not supported.

Changelog:
* Sync with RenPy 8.1.3.


(ryoon)
diff -r1.4 -r1.5 pkgsrc/devel/py-game_sdl2/Makefile
diff -r1.1 -r1.2 pkgsrc/devel/py-game_sdl2/distinfo
diff -r0 -r1.1 pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_image.pyx
diff -r0 -r1.1 pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_mixer.pyx
diff -r0 -r1.1 pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_mixer__music.pyx
diff -r0 -r1.1 pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_rwobject.pyx

cvs diff -r1.4 -r1.5 pkgsrc/devel/py-game_sdl2/Makefile (expand / switch to unified diff)

--- pkgsrc/devel/py-game_sdl2/Makefile 2023/11/12 13:21:10 1.4
+++ pkgsrc/devel/py-game_sdl2/Makefile 2023/11/23 15:39:05 1.5
@@ -1,57 +1,57 @@ @@ -1,57 +1,57 @@
1# $NetBSD: Makefile,v 1.4 2023/11/12 13:21:10 wiz Exp $ 1# $NetBSD: Makefile,v 1.5 2023/11/23 15:39:05 ryoon Exp $
2 2
3DISTNAME= pygame_sdl2-2.1.0-for-renpy-8.0.3 3DISTNAME= pygame_sdl2-2.1.0+renpy8.1.3
4PKGNAME= ${PYPKGPREFIX}-game_sdl2-2.1.0 4PKGNAME= ${PYPKGPREFIX}-game_sdl2-2.1.0.8.1.3
5PKGREVISION= 2 
6CATEGORIES= devel games python 5CATEGORIES= devel games python
7MASTER_SITES= https://www.renpy.org/dl/8.0.3/ 6MASTER_SITES= https://www.renpy.org/dl/8.1.3/
8 7
9MAINTAINER= ryoon@NetBSD.org 8MAINTAINER= ryoon@NetBSD.org
10HOMEPAGE= https://github.com/renpy/pygame_sdl2 9HOMEPAGE= https://github.com/renpy/pygame_sdl2
11COMMENT= Set of Python modules designed for writing games for RenPy 10COMMENT= Set of Python modules designed for writing games for RenPy
12LICENSE= gnu-lgpl-v2.1 11LICENSE= gnu-lgpl-v2.1
13 12
14PYTHON_VERSIONS_INCOMPATIBLE= 27 13PYTHON_VERSIONS_INCOMPATIBLE= 27 312
15 14
16TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython 15TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython
17 16
18USE_TOOLS+= pkg-config 17USE_TOOLS+= pkg-config
19 18
20EGG_NAME= pygame_sdl2-${PKGVERSION_NOREV} 19EGG_NAME= pygame_sdl2-2.1.0
21 20
22REPLACE_PYTHON+= examples/*.py 21REPLACE_PYTHON+= examples/*.py
23REPLACE_PYTHON+= setup.py 22REPLACE_PYTHON+= setup.py
24 23
25SUBST_CLASSES+= cython 24SUBST_CLASSES+= cython
26SUBST_STAGE.cython= pre-configure 25SUBST_STAGE.cython= pre-configure
27SUBST_MESSAGE.cython= Use versioned cython_command 26SUBST_MESSAGE.cython= Use versioned cython_command
28SUBST_FILES.cython+= setuplib.py 27SUBST_FILES.cython+= setuplib.py
29SUBST_SED.cython= -e 's,cython_command = ".*,cython_command = "cython-${PYVERSSUFFIX}",g' 28SUBST_SED.cython= -e 's,cython_command = ".*,cython_command = "cython-${PYVERSSUFFIX}",g'
30 29
31.include "../../mk/bsd.prefs.mk" 30.include "../../mk/bsd.prefs.mk"
32PLIST_VARS+= darwin unix 31PLIST_VARS+= darwin unix
33.if ${OPSYS} == "Darwin" 32.if ${OPSYS} == "Darwin"
34PLIST.darwin= yes 33PLIST.darwin= yes
35.else 34.else
36. include "../../x11/libX11/buildlink3.mk" 35. include "../../x11/libX11/buildlink3.mk"
37PLIST.unix= yes 36PLIST.unix= yes
38.endif 37.endif
39 38
40post-extract: 39post-extract:
41 # Do not use pre-generated cython results. 40 # Do not use pre-generated cython results.
42 # *_api.h is missing and it faild in install stage. 41 # *_api.h is missing and it faild in install stage.
43 # These requires correct cython_dommand. 42 # These requires correct cython_command.
44 ${RM} -f ${WRKSRC}/gen/* 43 ${RM} -f ${WRKSRC}/gen/*
 44 ${RM} -f ${WRKSRC}/gen-static/*
45 ${RM} -f ${WRKSRC}/gen3/* 45 ${RM} -f ${WRKSRC}/gen3/*
46 # Do not use invalid version number. 46 # Do not use invalid version number.
47 ${RM} -f ${WRKSRC}/setup.cfg 47 ${RM} -f ${WRKSRC}/setup.cfg
48 48
49.include "../../audio/SDL2_mixer/buildlink3.mk" 49.include "../../audio/SDL2_mixer/buildlink3.mk"
50.include "../../devel/SDL2/buildlink3.mk" 50.include "../../devel/SDL2/buildlink3.mk"
51.include "../../fonts/SDL2_ttf/buildlink3.mk" 51.include "../../fonts/SDL2_ttf/buildlink3.mk"
52.include "../../graphics/SDL2_image/buildlink3.mk" 52.include "../../graphics/SDL2_image/buildlink3.mk"
53.include "../../graphics/freetype2/buildlink3.mk" 53.include "../../graphics/freetype2/buildlink3.mk"
54.include "../../graphics/png/buildlink3.mk" 54.include "../../graphics/png/buildlink3.mk"
55.include "../../lang/python/application.mk" 55.include "../../lang/python/application.mk"
56.include "../../lang/python/egg.mk" 56.include "../../lang/python/egg.mk"
57.include "../../mk/jpeg.buildlink3.mk" 57.include "../../mk/jpeg.buildlink3.mk"

cvs diff -r1.1 -r1.2 pkgsrc/devel/py-game_sdl2/distinfo (expand / switch to unified diff)

--- pkgsrc/devel/py-game_sdl2/distinfo 2023/03/10 21:06:07 1.1
+++ pkgsrc/devel/py-game_sdl2/distinfo 2023/11/23 15:39:05 1.2
@@ -1,5 +1,9 @@ @@ -1,5 +1,9 @@
1$NetBSD: distinfo,v 1.1 2023/03/10 21:06:07 ryoon Exp $ 1$NetBSD: distinfo,v 1.2 2023/11/23 15:39:05 ryoon Exp $
2 2
3BLAKE2s (pygame_sdl2-2.1.0-for-renpy-8.0.3.tar.gz) = cb25ff76ea4555e8156c92064f8749454b96c0213274aea5bbf438bfbbe851e2 3BLAKE2s (pygame_sdl2-2.1.0+renpy8.1.3.tar.gz) = da635704fee0885d0b29e6930479e05a581a41563d1f1f73e108072f5b69e248
4SHA512 (pygame_sdl2-2.1.0-for-renpy-8.0.3.tar.gz) = 135779d4de6e2bc8ade069c11d521dd0dc2bebae6dc63a374d478785fe7534626e9dc3c7f8f50c3291f4a60b26eb474c14e3971f0b9487215125bbcd5af6782c 4SHA512 (pygame_sdl2-2.1.0+renpy8.1.3.tar.gz) = 3754a29996aa1992748d49b3d178d18e0cefdf17a63c7181027a3210f7360ac01b3a1d90691bb9789085cb8b61331118e6db93be24ea81b2e24e77e3b0de556c
5Size (pygame_sdl2-2.1.0-for-renpy-8.0.3.tar.gz) = 4053740 bytes 5Size (pygame_sdl2-2.1.0+renpy8.1.3.tar.gz) = 4252499 bytes
 6SHA1 (patch-src_pygame__sdl2_image.pyx) = 91bd8fb9da47d4e70837d78fabb9adeb3e2ea25b
 7SHA1 (patch-src_pygame__sdl2_mixer.pyx) = 71bd73d47360a7e384fcc3db4767e1808d21d280
 8SHA1 (patch-src_pygame__sdl2_mixer__music.pyx) = 098415b8235d9da74933651e472852125661b02d
 9SHA1 (patch-src_pygame__sdl2_rwobject.pyx) = a87e264d3f512264ac91508d30a8083294e45341

File Added: pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_image.pyx
$NetBSD: patch-src_pygame__sdl2_image.pyx,v 1.1 2023/11/23 15:39:05 ryoon Exp $

--- src/pygame_sdl2/image.pyx.orig	2023-11-21 05:06:52.531403700 +0000
+++ src/pygame_sdl2/image.pyx
@@ -147,10 +147,10 @@ def load(fi, namehint="", size=None):
         return surf
 
 cdef extern from "write_jpeg.h":
-    int Pygame_SDL2_SaveJPEG(SDL_Surface *, char *, int) nogil
+    int Pygame_SDL2_SaveJPEG(SDL_Surface *, char *, int) noexcept nogil
 
 cdef extern from "write_png.h":
-    int Pygame_SDL2_SavePNG(const char *, SDL_Surface *, int) nogil
+    int Pygame_SDL2_SavePNG(const char *, SDL_Surface *, int) noexcept nogil
 
 def save(Surface surface not None, filename, compression=-1):
 

File Added: pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_mixer.pyx
$NetBSD: patch-src_pygame__sdl2_mixer.pyx,v 1.1 2023/11/23 15:39:05 ryoon Exp $

--- src/pygame_sdl2/mixer.pyx.orig	2023-11-21 07:03:05.449771728 +0000
+++ src/pygame_sdl2/mixer.pyx
@@ -57,7 +57,7 @@ def _play_current(int channel):
             Mix_PlayChannelTimed(channel, next_sound.chunk, 0, -1)
 
 
-cdef void channel_callback(int channel) with gil:
+cdef void channel_callback(int channel) noexcept with gil:
 
     cdef int etype = 0
     cdef SDL_Event e

File Added: pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_mixer__music.pyx
$NetBSD: patch-src_pygame__sdl2_mixer__music.pyx,v 1.1 2023/11/23 15:39:05 ryoon Exp $

--- src/pygame_sdl2/mixer_music.pyx.orig	2023-11-21 07:03:36.136395079 +0000
+++ src/pygame_sdl2/mixer_music.pyx
@@ -27,7 +27,7 @@ cdef Mix_Music *current_music = NULL
 cdef object queued_music = None
 cdef int endevent = 0
 
-cdef void music_finished():
+cdef void music_finished() noexcept:
     global queued_music
     if queued_music:
         load(queued_music)

File Added: pkgsrc/devel/py-game_sdl2/patches/patch-src_pygame__sdl2_rwobject.pyx
$NetBSD: patch-src_pygame__sdl2_rwobject.pyx,v 1.1 2023/11/23 15:39:05 ryoon Exp $

--- src/pygame_sdl2/rwobject.pyx.orig	2023-01-22 00:20:52.000000000 +0000
+++ src/pygame_sdl2/rwobject.pyx
@@ -64,7 +64,7 @@ cdef set_error(e):
     msg = <char *> e
     SDL_SetError("%s", msg)
 
-cdef Sint64 python_size(SDL_RWops *context) with gil:
+cdef Sint64 python_size(SDL_RWops *context) noexcept with gil:
     f = <object> context.hidden.unknown.data1
 
     try:
@@ -77,7 +77,7 @@ cdef Sint64 python_size(SDL_RWops *conte
 
     return rv
 
-cdef Sint64 python_seek(SDL_RWops *context, Sint64 seek, int whence) with gil:
+cdef Sint64 python_seek(SDL_RWops *context, Sint64 seek, int whence) noexcept with gil:
     f = <object> context.hidden.unknown.data1
 
     try:
@@ -89,7 +89,7 @@ cdef Sint64 python_seek(SDL_RWops *conte
 
     return rv
 
-cdef size_t python_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) with gil:
+cdef size_t python_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) noexcept with gil:
     f = <object> context.hidden.unknown.data1
 
     try:
@@ -101,7 +101,7 @@ cdef size_t python_read(SDL_RWops *conte
     memcpy(ptr, <void *><char *> data, len(data))
     return len(data)
 
-cdef size_t python_write(SDL_RWops *context, const void *ptr, size_t size, size_t maxnum) with gil:
+cdef size_t python_write(SDL_RWops *context, const void *ptr, size_t size, size_t maxnum) noexcept with gil:
     f = <object> context.hidden.unknown.data1
     data = (<char *> ptr)[:size * maxnum]
 
@@ -113,7 +113,7 @@ cdef size_t python_write(SDL_RWops *cont
 
     return len(data)
 
-cdef int python_close(SDL_RWops *context) with gil:
+cdef int python_close(SDL_RWops *context) noexcept with gil:
     if context != NULL:
         if context.hidden.unknown.data1 != NULL:
             f = <object> context.hidden.unknown.data1
@@ -136,11 +136,11 @@ cdef struct SubFile:
     Sint64 length
     Sint64 tell
 
-cdef Sint64 subfile_size(SDL_RWops *context) nogil:
+cdef Sint64 subfile_size(SDL_RWops *context) noexcept nogil:
     cdef SubFile *sf = <SubFile *> context.hidden.unknown.data1
     return sf.length
 
-cdef Sint64 subfile_seek(SDL_RWops *context, Sint64 seek, int whence) nogil:
+cdef Sint64 subfile_seek(SDL_RWops *context, Sint64 seek, int whence) noexcept nogil:
     cdef SubFile *sf = <SubFile *> context.hidden.unknown.data1
 
     if whence == RW_SEEK_SET:
@@ -152,7 +152,7 @@ cdef Sint64 subfile_seek(SDL_RWops *cont
 
     return sf.tell
 
-cdef size_t subfile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) nogil:
+cdef size_t subfile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) noexcept nogil:
     cdef SubFile *sf = <SubFile *> context.hidden.unknown.data1
 
     cdef Sint64 left = sf.length - sf.tell
@@ -171,7 +171,7 @@ cdef size_t subfile_read(SDL_RWops *cont
 
     return rv
 
-cdef int subfile_close(SDL_RWops *context) nogil:
+cdef int subfile_close(SDL_RWops *context) noexcept nogil:
     cdef SubFile *sf
 
     if context != NULL:
@@ -191,12 +191,12 @@ cdef struct BufFile:
     Uint8 *here
     Uint8 *stop
 
-cdef Sint64 buffile_size(SDL_RWops *context) nogil:
+cdef Sint64 buffile_size(SDL_RWops *context) noexcept nogil:
     cdef BufFile *bf = <BufFile *> context.hidden.unknown.data1
 
     return bf.stop - bf.base
 
-cdef Sint64 buffile_seek(SDL_RWops *context, Sint64 offset, int whence) nogil:
+cdef Sint64 buffile_seek(SDL_RWops *context, Sint64 offset, int whence) noexcept nogil:
     cdef BufFile *bf = <BufFile *> context.hidden.unknown.data1
 
     cdef Uint8 *newpos
@@ -219,7 +219,7 @@ cdef Sint64 buffile_seek(SDL_RWops *cont
 
     return bf.here - bf.base
 
-cdef size_t buffile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) nogil:
+cdef size_t buffile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) noexcept nogil:
     cdef BufFile *bf = <BufFile *> context.hidden.unknown.data1
     cdef size_t total_bytes = 0
     cdef size_t mem_available = 0
@@ -237,7 +237,7 @@ cdef size_t buffile_read(SDL_RWops *cont
 
     return (total_bytes // size)
 
-cdef size_t buffile_write(SDL_RWops *context, const void *ptr, size_t size, size_t num) nogil:
+cdef size_t buffile_write(SDL_RWops *context, const void *ptr, size_t size, size_t num) noexcept nogil:
     cdef BufFile *bf = <BufFile *> context.hidden.unknown.data1
 
     if bf.view.readonly != 0:
@@ -250,7 +250,7 @@ cdef size_t buffile_write(SDL_RWops *con
 
     return num
 
-cdef int buffile_close(SDL_RWops *context) with gil:
+cdef int buffile_close(SDL_RWops *context) noexcept with gil:
     cdef BufFile *bf
 
     if context != NULL: