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: Wed, 28 Oct 2020 20:03:23
Message-Id: 1603915395.91dfed1b07ae5857bf0715afbd3582fd4b133986.mgorny@gentoo
1 commit: 91dfed1b07ae5857bf0715afbd3582fd4b133986
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 28 18:00:32 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 28 20:03:15 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91dfed1b
7
8 dev-python/pygame: Bump to 2.0.0 final
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.0.0.ebuild | 91 +++++++++++++++++++++++++++++++++++
14 2 files changed, 92 insertions(+)
15
16 diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
17 index e262a8fbf4a..fad79bf4293 100644
18 --- a/dev-python/pygame/Manifest
19 +++ b/dev-python/pygame/Manifest
20 @@ -3,3 +3,4 @@ DIST pygame-2.0.0.dev10.tar.gz 5567274 BLAKE2B 7d78f260318cfabeb33f1073ae210f890
21 DIST pygame-2.0.0.dev18.tar.gz 5591175 BLAKE2B 3479e9161e4dc5f00123f359b29f5c133020578bd09fc972f3f2d9e55b1700f4ac5eccc904524e98fe827fa7ed871db130da1f7b9aa8a67da98f42562f2ee766 SHA512 dfa8ac023e5da1688825281dd06e22aa59fa7061dcf17b8ec1c8c84b2bda7e27d39a97be3375d9ccb15aa50a0096be74ef6c80614e5d71729157712463140af1
22 DIST pygame-2.0.0.dev22.tar.gz 5596946 BLAKE2B 788a2e328d456198b032226f10b7d0686b7e862bf0106334ed3e26150ece43a1a9a9cbdc4f72f33e27d52e9f7c5e063292170eba9c07213474ecaf295280185a SHA512 2809f101dce256143a57f5b47aac2ceb3c2646301179c37e7545672784a7f8dfd74565d1f6a45c394f59bcfcef4a52473160bf94b494db79a982490a7ac19fd8
23 DIST pygame-2.0.0.dev24.tar.gz 5598687 BLAKE2B d46ea0112f5a47c9721e16d26d42ef7088a498a9136577a4348271f269a1f4622ba7746efd71fe20b3930e46bbeb2569b9b650511b9a682f9ea688793493bdf7 SHA512 d75b3f49bdaee9b409acf2a075c068cb8d50e5e8e7101f5b79e2abd3db4d09b9eee5c9027177cabf6b71b5dab7f6c412c77caa535c28369e46e347f5c516d59f
24 +DIST pygame-2.0.0.tar.gz 5522621 BLAKE2B 49773979af53595d3ff2db1a18e4bcd217e26db3ec28d6129d2a588f23a1bd5326fa79fab32c25aa796738cde0e68f5741bee58f62432e86f89cd49ee17a8f14 SHA512 3f65924d0e1d2863b84118a4e468b521a289e2cf174405c6f3ee2b2a2ed399cde7f9f310d57c4166351f84caaea02dd7408ee852dbcee7c205bb2955b6078fda
25
26 diff --git a/dev-python/pygame/pygame-2.0.0.ebuild b/dev-python/pygame/pygame-2.0.0.ebuild
27 new file mode 100644
28 index 00000000000..a43bd4b4223
29 --- /dev/null
30 +++ b/dev-python/pygame/pygame-2.0.0.ebuild
31 @@ -0,0 +1,91 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +PYTHON_COMPAT=( python3_{6..9} )
37 +
38 +inherit distutils-r1
39 +
40 +MY_PV=${PV/_pre/.dev}
41 +MY_P=${PN}-${MY_PV}
42 +
43 +DESCRIPTION="Python bindings for SDL multimedia library"
44 +HOMEPAGE="https://www.pygame.org/"
45 +SRC_URI="
46 + https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz"
47 +S=${WORKDIR}/${MY_P}
48 +
49 +LICENSE="LGPL-2.1"
50 +SLOT="0"
51 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
52 +IUSE="doc examples midi opengl test X"
53 +RESTRICT="!test? ( test )"
54 +
55 +RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]
56 + media-libs/freetype
57 + >=media-libs/sdl2-image-1.2.2
58 + >=media-libs/sdl2-mixer-1.2.4
59 + >=media-libs/sdl2-ttf-2.0.6
60 + >=media-libs/smpeg2-0.4.4-r1
61 + midi? ( media-libs/portmidi )
62 + X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] )
63 + !X? ( >=media-libs/libsdl2-1.2.5[threads] )"
64 +DEPEND="${RDEPEND}
65 + test? (
66 + media-libs/sdl2-image[gif,jpeg,png]
67 + media-libs/sdl2-mixer[mp3,vorbis,wav]
68 + )"
69 +# fontconfig used for fc-list
70 +RDEPEND+="
71 + media-libs/fontconfig"
72 +# util-linux provides script
73 +BDEPEND="
74 + test? (
75 + media-libs/fontconfig
76 + sys-apps/util-linux
77 + )"
78 +
79 +src_prepare() {
80 + if ! use midi; then
81 + rm test/midi_test.py || die
82 + fi
83 + distutils-r1_src_prepare
84 +}
85 +
86 +python_configure() {
87 + PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
88 + "${EPYTHON}" "${S}"/buildconfig/config.py -auto || die
89 +
90 + # Disable automagic dependency on PortMidi.
91 + if ! use midi; then
92 + sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
93 + fi
94 +}
95 +
96 +python_test() {
97 + local -x PYTHONPATH=${BUILD_DIR}/install/lib
98 + local -x SDL_VIDEODRIVER=dummy
99 + local -x SDL_AUDIODRIVER=disk
100 + esetup.py install \
101 + --root="${BUILD_DIR}"/install \
102 + --install-lib=lib
103 + script -eqc "${EPYTHON} -m pygame.tests" || die
104 +}
105 +
106 +python_install() {
107 + distutils-r1_python_install
108 +
109 + # Bug #497720
110 + rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
111 +}
112 +
113 +python_install_all() {
114 + distutils-r1_python_install_all
115 +
116 + if use doc; then
117 + docinto html
118 + dodoc -r docs/*
119 + fi
120 +
121 + use examples && dodoc -r examples
122 +}