Skip to content

Commit 6372542

Browse files
ryanking13ankith26
andcommitted
Bump pygame-ce to 2.5.6.dev2 (#388)
Co-authored-by: Ankith <[email protected]>
1 parent b09cf43 commit 6372542

File tree

5 files changed

+104
-485
lines changed

5 files changed

+104
-485
lines changed

packages/pygame-ce/meta.yaml

Lines changed: 11 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,23 @@
11
package:
22
name: pygame-ce
3-
version: 2.4.1
4-
# Need newer version for 3.13 compat see https://github.com/pyodide/pyodide/pull/5522
5-
_disabled: true
3+
version: 2.5.6.dev2
64
top-level:
75
- pygame
86
source:
9-
url: https://files.pythonhosted.org/packages/dc/b1/64fffc2c8664497ae82b2afb4f5efe0130d38b39f2d25af0288c4261df3e/pygame-ce-2.4.1.tar.gz
10-
sha256: 70a84aa1417c633a0fd6754ffa5dc92ee1b9aeb70baaa52c8c8c94a7c6db9cf0
11-
patches:
12-
- patches/0001-Replace-OpenAudioDevice-with-OpenAudio.patch
13-
- patches/0001-freetype-init.patch
14-
- patches/0001-wasm_unify_pygame_web_pyodide_static_Freetype_init.patch
15-
requirements:
16-
constraint:
17-
- setuptools < 75
7+
url: https://files.pythonhosted.org/packages/ab/98/911c3287c42a774a48271758990cd7d57cce148866f4126a41314223ab98/pygame_ce-2.5.6.dev2.tar.gz
8+
sha256: a1303cd212a3e92253712293480f2b7741fd7ac6e29981c5ff1ded1d554d030c
189
build:
1910
script: |
20-
embuilder build sdl2 sdl2_ttf sdl2_image sdl2_mixer sdl2_gfx libjpeg libpng giflib harfbuzz vorbis mpg123 libmodplug freetype libhtml5 --pic
21-
export SDL_CONFIG=$(em-config CACHE)/sysroot/bin/sdl2-config
22-
cflags: |
23-
-sRELOCATABLE=1
24-
-DSDL_NO_COMPAT
25-
-DBUILD_STATIC
26-
-ferror-limit=1
27-
-sUSE_SDL=2
28-
-sUSE_SDL_MIXER=2
29-
-sSDL2_MIXER_FORMATS=mid,mod,mpg,ogg
30-
-sUSE_SDL_TTF=2
31-
-sUSE_SDL_IMAGE=2
32-
-sSDL2_IMAGE_FORMATS=bmp,gif,jpg,png
33-
-sUSE_SDL_GFX=2
34-
-sUSE_FREETYPE=1
35-
-sUSE_LIBJPEG=1
36-
-sUSE_LIBPNG=1
37-
-sUSE_GIFLIB=1
38-
-sUSE_HARFBUZZ=1
39-
-Wno-unreachable-code-fallthrough
40-
ldflags: |
41-
-sRELOCATABLE=1
42-
-sUSE_SDL=2
43-
-sUSE_SDL_MIXER=2
44-
-sSDL2_MIXER_FORMATS=mid,mod,mpg,ogg
45-
-sUSE_SDL_TTF=2
46-
-sUSE_SDL_IMAGE=2
47-
-sSDL2_IMAGE_FORMATS=bmp,gif,jpg,png
48-
-sUSE_SDL_GFX=2
49-
-sUSE_FREETYPE=1
50-
-sUSE_LIBJPEG=1
51-
-sUSE_LIBPNG=1
52-
-sUSE_GIFLIB=1
53-
-sUSE_HARFBUZZ=1
54-
post: |
55-
# Remove docs to reduce the size of a wheel
56-
# (Perhaps also remove typeshed and examples too?)
57-
rm -rf ./pygame/docs
11+
# formats should be the same as the cibuildwheel config in pygame-ce
12+
# https://github.com/pygame-community/pygame-ce/blob/e197e353fd33448abeed384dd4098e163c4998a5/pyproject.toml#L107
5813
59-
# WASM version of pygame uses a single module 'pygame_static',
60-
# and pygame_static calls PyInit_* functions from other modules.
61-
# This is okay when all these modules are bundled in a single module: libpython.
62-
# But as we don't do that, we need to load these modules globally, so that
63-
# pygame_static can see the symbols.
64-
STATIC_OBJS=$(find ${PKG_BUILD_DIR} -name "*.o")
65-
echo "build dir: " $PKG_BUILD_DIR
66-
echo "static objs: " $STATIC_OBJS
14+
# workaround to build wasm-exception-enabled port of sdl2_image (See: https://github.com/pygame-community/pygame-ce/pull/3588#issuecomment-3352072309)
15+
touch dummy_src_for_port.c
16+
emcc dummy_src_for_port.c -sSUPPORT_LONGJMP="wasm" -sRELOCATABLE=1 -fpic "--use-port=sdl2_image:formats=bmp,gif,jpg,lbm,pcx,png,pnm,qoi,svg,tga,xcf,xpm,xv"
6717
68-
SHARED_LIBS=$(find ${WHEELDIR} -name "*.so" ! -name "static*.so")
69-
echo "shared libs: " $SHARED_LIBS
70-
71-
emcc \
72-
-shared \
73-
${SIDE_MODULE_LDFLAGS} \
74-
-fPIC \
75-
-lSDL2 \
76-
-lSDL2_image-bmp-gif-jpg-png-wasm-sjlj \
77-
-lSDL2_ttf \
78-
-lSDL2_mixer_mid-mod-mpg-ogg \
79-
-lSDL2_gfx \
80-
-lfreetype-legacysjlj \
81-
-lharfbuzz \
82-
-lpng-legacysjlj \
83-
-ljpeg \
84-
-lgif \
85-
-lvorbis \
86-
-lmodplug \
87-
-lmpg123 \
88-
-logg \
89-
-lhtml5 \
90-
${STATIC_OBJS} \
91-
${SHARED_LIBS} \
92-
-sSUPPORT_LONGJMP=wasm \
93-
-o pygame_static.so
94-
95-
# Remove duplicated static.so module
96-
rm -f ./pygame/static*.so
18+
embuilder --pic build sdl2 libhtml5 sdl2_ttf 'sdl2_mixer:formats=ogg,mp3,mod,mid'
9719
about:
98-
home: https://www.pygame.org
99-
PyPI: https://pypi.org/project/pygame
20+
home: https://pyga.me
21+
PyPI: https://pypi.org/project/pygame-ce
10022
summary: Python Game Development
10123
license: LGPL-2.1

packages/pygame-ce/patches/0001-Replace-OpenAudioDevice-with-OpenAudio.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

packages/pygame-ce/patches/0001-freetype-init.patch

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)