Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/
Date: Mon, 29 Jul 2019 22:24:50
Message-Id: 1564439040.380ba0dd75c2c1273d2d17bbab212bc97744533e.chewi@gentoo
1 commit: 380ba0dd75c2c1273d2d17bbab212bc97744533e
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 29 22:09:10 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 29 22:24:00 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=380ba0dd
7
8 dev-python/pygame: Bump to 1.9.6, EAPI 7, add Python 3.7
9
10 Package-Manager: Portage-2.3.69, Repoman-2.3.13
11 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
12
13 dev-python/pygame/Manifest | 1 +
14 dev-python/pygame/pygame-1.9.6.ebuild | 79 +++++++++++++++++++++++++++++++++++
15 2 files changed, 80 insertions(+)
16
17 diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest
18 index d8c451b7eb1..ff4413caf99 100644
19 --- a/dev-python/pygame/Manifest
20 +++ b/dev-python/pygame/Manifest
21 @@ -1,2 +1,3 @@
22 DIST pygame-1.9.2_pre20120101.tar.xz 2263028 BLAKE2B 401b7cdc32cfc6b960e8a686236d0a310d840b4a41211b602f6fe137f80f3bb358daa5e25758c4e152ab41e50c3864c183a0b6f36176e3dec12db80449e126e1 SHA512 1e82cf720da28d4e4213f6b7a029ab4c9dd592c3155f3d11da8272a7d81d28c54f93402383fa5fa4a4e8863dfc039062838d0317cfedde30a4455e52ce680576
23 DIST pygame-1.9.3.tar.gz 2974541 BLAKE2B 38ba1f85d845cf33202819705ad564168fb3bc7041731d50d8c3f6bf1c55bebf41202f8ae9e4c4ba52cabe7335a9df13d7724104015b49842dc7f7aa7b0bfd19 SHA512 8920c598a97b4ff8602391517f070b67263bacb6330e13ea5d7d5432ee592a7c984fe986837b90a032da3d4e717f9df0cc99f0fb39f1cbde1b4f6a4c132feffe
24 +DIST pygame-1.9.6.tar.gz 3223131 BLAKE2B a4d04c933fcad244d32bd512ef8717e60ec923f361e9e0296b5c7d57c5949d3434a040d028249c5b8f3c865ac3dcdbb32e6f0b223186678595a8625213ba2a17 SHA512 d923c554203a7c35e37921658cb4c5bf50215ab0ff4d2b869a1ee6b2e2ca31d66ec4bbde4287f5a777838ffe932cd15b993cb0224b86e43d684de61c35acbcd0
25
26 diff --git a/dev-python/pygame/pygame-1.9.6.ebuild b/dev-python/pygame/pygame-1.9.6.ebuild
27 new file mode 100644
28 index 00000000000..5dc353c7051
29 --- /dev/null
30 +++ b/dev-python/pygame/pygame-1.9.6.ebuild
31 @@ -0,0 +1,79 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
38 +
39 +inherit flag-o-matic distutils-r1 virtualx
40 +
41 +DESCRIPTION="Python bindings for SDL multimedia library"
42 +HOMEPAGE="http://www.pygame.org/"
43 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="LGPL-2.1"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~sparc ~x86"
48 +IUSE="doc examples midi X"
49 +
50 +DEPEND="dev-python/numpy[${PYTHON_USEDEP}]
51 + >=media-libs/sdl-image-1.2.2[png,jpeg]
52 + >=media-libs/sdl-mixer-1.2.4
53 + >=media-libs/sdl-ttf-2.0.6
54 + >=media-libs/smpeg-0.4.4-r1
55 + midi? ( media-libs/portmidi )
56 + X? ( >=media-libs/libsdl-1.2.5[X,video] )
57 + !X? ( >=media-libs/libsdl-1.2.5 )"
58 +RDEPEND="${DEPEND}"
59 +
60 +# various module import and data path issues
61 +RESTRICT=test
62 +
63 +python_configure() {
64 + PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \
65 + "${EPYTHON}" "${S}"/buildconfig/config.py -auto
66 +
67 + if ! use X; then
68 + sed -e "s:^scrap :#&:" -i Setup || die "sed failed"
69 + fi
70 +
71 + # Disable automagic dependency on PortMidi.
72 + if ! use midi; then
73 + sed -e "s:^pypm :#&:" -i Setup || die "sed failed"
74 + fi
75 +}
76 +
77 +python_compile() {
78 + if [[ ${EPYTHON} == python2* ]]; then
79 + local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
80 +
81 + append-flags -fno-strict-aliasing
82 + fi
83 +
84 + distutils-r1_python_compile
85 +}
86 +
87 +python_test() {
88 + PYTHONPATH="${BUILD_DIR}/lib" virtx "${EPYTHON}" -m pygame.tests
89 +}
90 +
91 +python_install() {
92 + distutils-r1_python_install
93 +
94 + # Bug #497720
95 + rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die
96 +}
97 +
98 +python_install_all() {
99 + distutils-r1_python_install_all
100 +
101 + if use doc; then
102 + docinto html
103 + dodoc -r docs/*
104 + fi
105 +
106 + if use examples; then
107 + insinto /usr/share/doc/${PF}/examples
108 + doins -r examples/*
109 + fi
110 +}