From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3071F15852A for ; Tue, 20 Aug 2024 21:39:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 566182BC014; Tue, 20 Aug 2024 21:39:22 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2F7E82BC014 for ; Tue, 20 Aug 2024 21:39:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0F27F340C7C for ; Tue, 20 Aug 2024 21:39:21 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4144218EB for ; Tue, 20 Aug 2024 21:39:19 +0000 (UTC) From: "Andrew Savchenko" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrew Savchenko" Message-ID: <1724189817.b647e3d005c57a3eb511572001fa3a135ef1bacf.bircoph@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame_sdl2/files/, dev-python/pygame_sdl2/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pygame_sdl2/Manifest dev-python/pygame_sdl2/files/pygame_sdl2-8.2.3-cython-3.patch dev-python/pygame_sdl2/metadata.xml dev-python/pygame_sdl2/pygame_sdl2-8.2.3.ebuild X-VCS-Directories: dev-python/pygame_sdl2/ dev-python/pygame_sdl2/files/ X-VCS-Committer: bircoph X-VCS-Committer-Name: Andrew Savchenko X-VCS-Revision: b647e3d005c57a3eb511572001fa3a135ef1bacf X-VCS-Branch: master Date: Tue, 20 Aug 2024 21:39:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b24db920-a130-45d7-af1f-887c93ec766f X-Archives-Hash: 909275b67a105af81f8b58520811a4b9 commit: b647e3d005c57a3eb511572001fa3a135ef1bacf Author: Andrew Savchenko gentoo org> AuthorDate: Tue Aug 20 21:34:37 2024 +0000 Commit: Andrew Savchenko gentoo org> CommitDate: Tue Aug 20 21:36:57 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b647e3d0 dev-python/pygame_sdl2: restore package - Update to 8.2.3 - Test and update PYTHON_COMPAT - Fix build with cython-3 (#911781) Closes: https://bugs.gentoo.org/911781 Signed-off-by: Andrew Savchenko gentoo.org> dev-python/pygame_sdl2/Manifest | 1 + .../files/pygame_sdl2-8.2.3-cython-3.patch | 204 +++++++++++++++++++++ dev-python/pygame_sdl2/metadata.xml | 12 ++ dev-python/pygame_sdl2/pygame_sdl2-8.2.3.ebuild | 47 +++++ 4 files changed, 264 insertions(+) diff --git a/dev-python/pygame_sdl2/Manifest b/dev-python/pygame_sdl2/Manifest new file mode 100644 index 000000000000..5ed7217741c1 --- /dev/null +++ b/dev-python/pygame_sdl2/Manifest @@ -0,0 +1 @@ +DIST pygame_sdl2-2.1.0+renpy8.2.3.tar.gz 4270114 BLAKE2B ae70253fc717334e65c438d36bd2991c909ee64c6b47f9c175fd53c1567ea54d2a42ea65cda85560387e744ff792b34658d393f3018d2941e5111efba064236a SHA512 9b3ae71a648511f243d235ba5e81661dde5d0871a4517494f2789c20f95e110305e42bdb635308165cf3985d1096b296a16140c03cbd446db17997c05025b8e3 diff --git a/dev-python/pygame_sdl2/files/pygame_sdl2-8.2.3-cython-3.patch b/dev-python/pygame_sdl2/files/pygame_sdl2-8.2.3-cython-3.patch new file mode 100644 index 000000000000..2011eadfbffb --- /dev/null +++ b/dev-python/pygame_sdl2/files/pygame_sdl2-8.2.3-cython-3.patch @@ -0,0 +1,204 @@ +diff '--color=auto' -Naurd pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/mixer_music.pyx pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/mixer_music.pyx +--- pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/mixer_music.pyx 2015-04-04 18:05:58.000000000 +0300 ++++ pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/mixer_music.pyx 2024-08-20 23:31:04.313616957 +0300 +@@ -27,7 +27,7 @@ + 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) +diff '--color=auto' -Naurd pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/mixer.pyx pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/mixer.pyx +--- pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/mixer.pyx 2019-04-03 08:15:40.000000000 +0300 ++++ pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/mixer.pyx 2024-08-20 23:27:49.115394156 +0300 +@@ -57,7 +57,7 @@ + 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 +diff '--color=auto' -Naurd pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/rwobject.pyx pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/rwobject.pyx +--- pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/rwobject.pyx 2024-01-29 06:06:06.000000000 +0300 ++++ pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/rwobject.pyx 2024-08-20 23:22:53.081539270 +0300 +@@ -63,7 +63,7 @@ + msg = 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 = context.hidden.unknown.data1 + + try: +@@ -76,7 +76,7 @@ + + 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 = context.hidden.unknown.data1 + + try: +@@ -88,7 +88,7 @@ + + 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 = context.hidden.unknown.data1 + + try: +@@ -100,7 +100,7 @@ + memcpy(ptr, 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 = context.hidden.unknown.data1 + data = ( ptr)[:size * maxnum] + +@@ -112,7 +112,7 @@ + + 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 = context.hidden.unknown.data1 +@@ -135,11 +135,11 @@ + Sint64 length + Sint64 tell + +-cdef Sint64 subfile_size(SDL_RWops *context) nogil: ++cdef Sint64 subfile_size(SDL_RWops *context) noexcept nogil: + cdef SubFile *sf = 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 = context.hidden.unknown.data1 + + if whence == RW_SEEK_SET: +@@ -151,7 +151,7 @@ + + 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 = context.hidden.unknown.data1 + + cdef Sint64 left = sf.length - sf.tell +@@ -170,7 +170,7 @@ + + 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,13 +191,13 @@ + Sint64 split + Sint64 tell + +-cdef Sint64 splitfile_size(SDL_RWops *context) nogil: ++cdef Sint64 splitfile_size(SDL_RWops *context) noexcept nogil: + cdef SplitFile *sf = context.hidden.unknown.data1 + cdef Sint64 rv + + return SDL_RWsize(sf.a) + SDL_RWsize(sf.b) + +-cdef Sint64 splitfile_seek(SDL_RWops *context, Sint64 seek, int whence) nogil: ++cdef Sint64 splitfile_seek(SDL_RWops *context, Sint64 seek, int whence) noexcept nogil: + cdef SplitFile *sf = context.hidden.unknown.data1 + cdef Sint64 rv + +@@ -220,7 +220,7 @@ + else: + return sf.tell + +-cdef size_t splitfile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) nogil: ++cdef size_t splitfile_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum) noexcept nogil: + cdef SplitFile *sf = context.hidden.unknown.data1 + cdef Sint64 left = splitfile_size(context) - sf.tell + cdef size_t rv +@@ -251,7 +251,7 @@ + + return (left_read + right_read) // size + +-cdef int splitfile_close(SDL_RWops *context) nogil: ++cdef int splitfile_close(SDL_RWops *context) noexcept nogil: + cdef SplitFile *sf + + if context != NULL: +@@ -274,12 +274,12 @@ + Uint8 *here + Uint8 *stop + +-cdef Sint64 buffile_size(SDL_RWops *context) nogil: ++cdef Sint64 buffile_size(SDL_RWops *context) noexcept nogil: + cdef BufFile *bf = 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 = context.hidden.unknown.data1 + + cdef Uint8 *newpos +@@ -302,7 +302,7 @@ + + 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 = context.hidden.unknown.data1 + cdef size_t total_bytes = 0 + cdef size_t mem_available = 0 +@@ -320,7 +320,7 @@ + + 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 = context.hidden.unknown.data1 + + if bf.view.readonly != 0: +@@ -333,7 +333,7 @@ + + 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: +diff '--color=auto' -Naurd pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/surface.pyx pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/surface.pyx +--- pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/surface.pyx 2023-03-30 06:10:16.000000000 +0300 ++++ pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/surface.pyx 2024-08-20 23:23:41.720844257 +0300 +@@ -34,7 +34,7 @@ + int pygame_Blit (SDL_Surface * src, SDL_Rect * srcrect, + SDL_Surface * dst, SDL_Rect * dstrect, int the_args); + +-cdef void move_pixels(Uint8 *src, Uint8 *dst, int h, int span, int srcpitch, int dstpitch) nogil: ++cdef void move_pixels(Uint8 *src, Uint8 *dst, int h, int span, int srcpitch, int dstpitch) noexcept nogil: + if src < dst: + src += (h - 1) * srcpitch; + dst += (h - 1) * dstpitch; +diff '--color=auto' -Naurd pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/transform.pyx pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/transform.pyx +--- pygame_sdl2-2.1.0+renpy8.2.3.orig/src/pygame_sdl2/transform.pyx 2015-08-13 03:31:25.000000000 +0300 ++++ pygame_sdl2-2.1.0+renpy8.2.3/src/pygame_sdl2/transform.pyx 2024-08-20 23:24:30.513150042 +0300 +@@ -119,7 +119,7 @@ + p += x + return p[0] + +-cdef void set_at(SDL_Surface *surf, int x, int y, uint32_t color) nogil: ++cdef void set_at(SDL_Surface *surf, int x, int y, uint32_t color) noexcept nogil: + cdef uint32_t *p = surf.pixels + p += y * (surf.pitch // sizeof(uint32_t)) + p += x diff --git a/dev-python/pygame_sdl2/metadata.xml b/dev-python/pygame_sdl2/metadata.xml new file mode 100644 index 000000000000..ca10416f8e59 --- /dev/null +++ b/dev-python/pygame_sdl2/metadata.xml @@ -0,0 +1,12 @@ + + + + + bircoph@gentoo.org + Andrew Savchenko + + + renpy/pygame_sdl2 + pygame_sdl2 + + diff --git a/dev-python/pygame_sdl2/pygame_sdl2-8.2.3.ebuild b/dev-python/pygame_sdl2/pygame_sdl2-8.2.3.ebuild new file mode 100644 index 000000000000..44da5ea76b34 --- /dev/null +++ b/dev-python/pygame_sdl2/pygame_sdl2-8.2.3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_EXT=1 +PYTHON_COMPAT=( python3_{10..13} ) +inherit distutils-r1 + +MY_P="${PN}-2.1.0+renpy${PV}" + +DESCRIPTION="Reimplementation of portions of the pygame API using SDL2" +HOMEPAGE="https://github.com/renpy/pygame_sdl2" +SRC_URI="https://www.renpy.org/dl/${PV}/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="LGPL-2.1 ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( "${FILESDIR}/${PN}-8.2.3-cython-3.patch" ) + +#