blob: 85aa4b0675ea6b16cfc30f2b9c62a8329c842a25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=py3-pygame
pkgver=2.1.2
pkgrel=3
pkgdesc="Python library for making applications and games based on SDL"
url="https://pygame.org"
arch="all"
license="LGPL-2.1-or-later"
depends="python3 py3-numpy"
depends_dev="
freetype-dev
libjpeg-turbo-dev
libpng-dev
portmidi-dev<=200
python3-dev
sdl2-dev
sdl2_gfx-dev
sdl2_image-dev
sdl2_mixer-dev
sdl2_ttf-dev
"
makedepends="cython py3-setuptools py3-sphinx $depends_dev"
checkdepends="libvorbis libwebp mpg123 tiff font-dejavu udev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-examples:examples:noarch"
source="https://github.com/pygame/pygame/archive/refs/tags/$pkgver/pygame-$pkgver.tar.gz"
builddir="$srcdir/pygame-$pkgver"
case $CARCH in
s390x|ppc64le) options="!check";; # blending is broken, making tests fail. todo
*) options="!check";; # failures in surface_test
esac
# included into same .so, the config scripts only check if /etc/redhat-release
# exists for this lmao
export PORTMIDI_INC_PORTTIME=1
prepare() {
default_prepare
# delete broken cythonized files, then regen them below merely doing *.c
# doesn't work, and they have to be missing to be regened it seems..
rm src_c/pypm.c
rm src_c/_sdl2/audio.c
rm src_c/_sdl2/mixer.c
rm src_c/_sdl2/controller.c
}
build() {
python3 setup.py cython build
python3 setup.py docs
}
check() {
# Do a temporary install with all of the test files intact
python3 setup.py install --prefix=/usr --root="$srcdir"/pygame-build
libpath="$(echo $srcdir/pygame-build/usr/lib/python3.*/site-packages)"
export SDL_VIDEODRIVER=dummy
export SDL_AUDIODRIVER=disk
PYTHONPATH="$libpath" python3 "$builddir"/test \
-v \
--exclude=opengl,timing \
--time_out=300
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
rm -r "$pkgdir"/usr/lib/python3.*/site-packages/pygame/tests
}
doc() {
default_doc
amove /usr/lib/python3.*/site-packages/pygame/docs
}
examples() {
pkgdesc="$pkgdesc (examples)"
amove /usr/lib/python3.*/site-packages/pygame/examples
}
sha512sums="
531cb0371853def7a3ddb8eb0110fbd58acaf1b2351d7518402c9a960baca705bb34da879015e7a6cd5f2f8af98c57e7bc732021a8f62ed9f90cacf068c9c2d6 pygame-2.1.2.tar.gz
"
|