Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/
Date: Tue, 28 Feb 2023 05:06:51
Message-Id: 1677560795.fe4c91d6c165fd99d99599a29f9cc8e275cd093a.mgorny@gentoo
1 commit: fe4c91d6c165fd99d99599a29f9cc8e275cd093a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 04:36:49 2023 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 05:06:35 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe4c91d6
7
8 dev-python/pygame: Bump to 2.2.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pygame/Manifest | 1 +
13 dev-python/pygame/pygame-2.2.0.ebuild | 87 +++++++++++++++++++++++++++++++++++
14 2 files changed, 88 insertions(+)
15
16 diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
17 index afb51634a1d4..c294f2807ccf 100644
18 --- a/dev-python/pygame/Manifest
19 +++ b/dev-python/pygame/Manifest
20 @@ -1,2 +1,3 @@
21 DIST pygame-2.1.2.gh.tar.gz 6100415 BLAKE2B 4b81c2f0abc2c2c4732ddb8f8e6d4bffa5169e3d3ee2d9ea2798d294623a9c70e2ff004825030606285124ef1347177b46adc676db450785e8420de45f37db34 SHA512 531cb0371853def7a3ddb8eb0110fbd58acaf1b2351d7518402c9a960baca705bb34da879015e7a6cd5f2f8af98c57e7bc732021a8f62ed9f90cacf068c9c2d6
22 DIST pygame-2.1.3.gh.tar.gz 6517003 BLAKE2B 9f2062b24ef2e97995207fbf7572a8aa4d3475356e8646356758ad72b0b744fcf911adaa78bb730ed43c95fa23b8ed733a5573882bd83e112ae5e7e6ef099de9 SHA512 28f46826f58f73607b28c1411c6f2b71796cd4f98103df2dd47db842f578fe7f26dac01cb60d1cb00ac9dacfa62c6c3b913a244379ce70bd03265424e29052e6
23 +DIST pygame-2.2.0.gh.tar.gz 6530469 BLAKE2B 301b8decd7afe7ad44d97b086ad27209a084884993122f0c8d6973e718cb811587aa2e2c34b5e9fc5859410ced4c298b24127b4bf166dbeaa225b5c731c66cb6 SHA512 212e0f6390fa84f4fbcb3051ecb83c324a59d7591fd216a0f17946a581cf01540116162357b41004a387fbd3395e030a5a6d5f804496d84558125f512c9c2617
24
25 diff --git a/dev-python/pygame/pygame-2.2.0.ebuild b/dev-python/pygame/pygame-2.2.0.ebuild
26 new file mode 100644
27 index 000000000000..98583ae7b73f
28 --- /dev/null
29 +++ b/dev-python/pygame/pygame-2.2.0.ebuild
30 @@ -0,0 +1,87 @@
31 +# Copyright 1999-2023 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{9..11} pypy3 )
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="Python bindings for SDL multimedia library"
42 +HOMEPAGE="
43 + https://www.pygame.org/
44 + https://github.com/pygame/pygame/
45 + https://pypi.org/project/pygame/
46 +"
47 +SRC_URI="
48 + https://github.com/pygame/pygame/archive/${PV}.tar.gz
49 + -> ${P}.gh.tar.gz
50 +"
51 +
52 +LICENSE="LGPL-2.1"
53 +SLOT="0"
54 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
55 +IUSE="examples opengl test X"
56 +RESTRICT="!test? ( test )"
57 +
58 +RDEPEND="
59 + dev-python/numpy[${PYTHON_USEDEP}]
60 + media-libs/freetype
61 + media-libs/libjpeg-turbo:=
62 + media-libs/libpng:=
63 + media-libs/portmidi
64 + media-libs/sdl2-image
65 + media-libs/sdl2-mixer
66 + media-libs/sdl2-ttf
67 + X? ( media-libs/libsdl2[opengl?,threads,video,X] )
68 + !X? ( media-libs/libsdl2[threads] )
69 +"
70 +DEPEND="
71 + ${RDEPEND}
72 + test? (
73 + media-libs/sdl2-image[gif,jpeg,png,tiff,webp]
74 + media-libs/sdl2-mixer[mp3,vorbis,wav]
75 + )
76 +"
77 +# fontconfig used for fc-list
78 +RDEPEND+="
79 + media-libs/fontconfig
80 +"
81 +# util-linux provides script
82 +BDEPEND="
83 + dev-python/cython[${PYTHON_USEDEP}]
84 + test? (
85 + media-libs/fontconfig
86 + sys-apps/util-linux
87 + )
88 +"
89 +
90 +python_configure() {
91 + PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
92 + "${EPYTHON}" "${S}"/buildconfig/config.py || die
93 +}
94 +
95 +python_configure_all() {
96 + find src_c/cython -name '*.pyx' -exec touch {} + || die
97 + "${EPYTHON}" setup.py cython_only || die
98 +}
99 +
100 +python_test() {
101 + local -x PYTHONPATH=${BUILD_DIR}/install/lib
102 + local -x SDL_VIDEODRIVER=dummy
103 + local -x SDL_AUDIODRIVER=disk
104 + script -eqc "${EPYTHON} -m pygame.tests -v" || die
105 +}
106 +
107 +python_install() {
108 + distutils-r1_python_install
109 +
110 + # Bug #497720
111 + rm -fr "${D}$(python_get_sitedir)"/pygame/{docs,examples,tests}/ || die
112 +}
113 +
114 +python_install_all() {
115 + distutils-r1_python_install_all
116 + use examples && dodoc -r examples
117 +}