Gentoo Archives: gentoo-commits

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