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