diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-13 10:39:22 +0100 |
commit | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch) | |
tree | 8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-python/pygame | |
parent | f516638b7fe9592837389826a6152a7e1b251c54 (diff) |
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-python/pygame')
-rw-r--r-- | dev-python/pygame/Manifest | 6 | ||||
-rw-r--r-- | dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch | 34 | ||||
-rw-r--r-- | dev-python/pygame/pygame-1.9.6-r1.ebuild | 26 | ||||
-rw-r--r-- | dev-python/pygame/pygame-2.0.0_pre10.ebuild | 79 | ||||
-rw-r--r-- | dev-python/pygame/pygame-9999.ebuild | 70 |
5 files changed, 209 insertions, 6 deletions
diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest index 7c06a17dfbf8..413fd5833acf 100644 --- a/dev-python/pygame/Manifest +++ b/dev-python/pygame/Manifest @@ -1,4 +1,8 @@ +AUX pygame-2.0.0_pre10-py39.patch 1174 BLAKE2B dda7880b7a57e62612f072ed25c9c661ca63665d94d3a8fd9bcb2d95683da80d215067e63925eb65d98b4bf13c53845b7093011da42c4403c65bb95253a6fecf SHA512 91900ab98546a5339fcf4d204e3d049de9ad9bcc929dd75fc39629d873532d9e486f35ba0236e74185e1b7298016cc419c5ca1d463af80ee7f425244b7f51ade DIST pygame-1.9.6.tar.gz 3223131 BLAKE2B a4d04c933fcad244d32bd512ef8717e60ec923f361e9e0296b5c7d57c5949d3434a040d028249c5b8f3c865ac3dcdbb32e6f0b223186678595a8625213ba2a17 SHA512 d923c554203a7c35e37921658cb4c5bf50215ab0ff4d2b869a1ee6b2e2ca31d66ec4bbde4287f5a777838ffe932cd15b993cb0224b86e43d684de61c35acbcd0 -EBUILD pygame-1.9.6-r1.ebuild 1776 BLAKE2B 576578ad6c2842653610af100ede751d7881bd3ae7fbc4926589e7485769c43e585a343505c9044d9ec9195b39343b3da2113e8f8227aeb2dec127f4089f6f4a SHA512 51807b684602cdc50874cb1ee1b693a47ab197a5f03c09c71b76ee6cfc6878bb2aaea024ead405213f268c286e3ce1d8570a57a3dafa76a8ffab540598904c8b +DIST pygame-2.0.0.dev10.tar.gz 5567274 BLAKE2B 7d78f260318cfabeb33f1073ae210f890d2f772e3ef302f243cca67724c6012355644ba60d4cae6de72db6dd61d320177deff6ee83dd355ec4cc33e841b565f7 SHA512 4cee7599fd8a6d31ddd66bfaad3bbb67cb167c1ae339f37e83322d810fea8746e81a191c224a0eeb6cc43a64bf1730ff0886c82f1a4f642e2e656ca9a837bf9e +EBUILD pygame-1.9.6-r1.ebuild 2107 BLAKE2B 663c13a8a86c32a66a8038f953f6405f450321f6e4d99197dea20a98942a83760da48642104dd483df06ec2803dee7ad0a9e9d25f81cf2a5e427a0ebebcc41d9 SHA512 1db25d70ed50e249f23ff28b95adee78601f27de7ec6f2f69a335bb9f061855e984833951845a9d4ed36f3a3ff5fa997fe6e49d545ae828bd1fff66c194a3a85 EBUILD pygame-1.9.6.ebuild 1764 BLAKE2B c70233d00aed5294fa88da407f836ee06093009855a7165fd735a9f260e4f588339c0e56f9c934f0d74b14d65e703c491c21de481fbceb3402ecedc677e21c5d SHA512 50423f254afef8348078a141e2ceef4e3032343face6695be6d37d815026fc1e99c09c86448636ad29389b174f36560aa9e1ee58269e6a28fb1c01c4a979bc03 +EBUILD pygame-2.0.0_pre10.ebuild 1834 BLAKE2B cc73979a27f3af53130c184958147015db1b769b8f2ddb97dd3921c4aae9e72b65a0f125a246d00df870119020fc6fde1c89f017f7d72ca4de5dc0eec1e19585 SHA512 84b0fb7c2bba04335f33c86cddb4cca6941db0a8a4834bb428389884e3e00423d36161d2fac0d3d5f2b83e72d8d39c26e9354b038af6e895bf8411ad1fe12127 +EBUILD pygame-9999.ebuild 1638 BLAKE2B fe75a0c2d94974980b1b6462c8a3e5bd08b881606a541666ba6642304634d8a688a2dcb746d92854c1e68164b9cc07e904f454bcb87eff7315ae25f8767f72a4 SHA512 d5be31c553fd9bb1f4fab7084ea7553466086a6f4f68322797fc62c573bf562dd055bf9f33cb2deee614061224f39ac8e02343dfbce52c84b4abc204dee058ab MISC metadata.xml 408 BLAKE2B ae371ef164069765d0964da714a83c9898ddc190ac295c5ad5bbb6a3c45db5aa415d84ff21dbaa510e5c9852397e6b6b389684c54b67d83d675afd9b3d9a697e SHA512 a6e06c0bed59d5157166577a2dafa53f28a310c56f251bec36af077a79342c6f954fa63a3fa8d3546ca03cc9358e75eeb1ef04c6e0371e43e0b7bff51ffe35dd diff --git a/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch b/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch new file mode 100644 index 000000000000..9cfaa476db39 --- /dev/null +++ b/dev-python/pygame/files/pygame-2.0.0_pre10-py39.patch @@ -0,0 +1,34 @@ +From 159908e5726c3df5df58429d1ff3113137c57f98 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 8 Jun 2020 09:35:41 +0200 +Subject: [PATCH] Replace long-deprecated Thread.isAlive() with .is_alive() + +Replace Thread.isAlive() calls with Thread.is_alive() to fix +compatibility with Python 3.9. The new method was present since py2.6, +the old one got deprecated in py3.1 and was finally removed in py3.9. +--- + test/threads_test.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/threads_test.py b/test/threads_test.py +index 300f6a9c6..59ab5d488 100644 +--- a/test/threads_test.py ++++ b/test/threads_test.py +@@ -41,7 +41,7 @@ def test_stop(self): + self.assertGreater(len(wq.pool), 0) + + for t in wq.pool: +- self.assertTrue(t.isAlive()) ++ self.assertTrue(t.is_alive()) + + for i in xrange_(200): + wq.do(lambda x: x + 1, i) +@@ -49,7 +49,7 @@ def test_stop(self): + wq.stop() + + for t in wq.pool: +- self.assertFalse(t.isAlive()) ++ self.assertFalse(t.is_alive()) + + self.assertIs(wq.queue.get(), STOP) + diff --git a/dev-python/pygame/pygame-1.9.6-r1.ebuild b/dev-python/pygame/pygame-1.9.6-r1.ebuild index 0aa0b86bea9b..253ffc048c4a 100644 --- a/dev-python/pygame/pygame-1.9.6-r1.ebuild +++ b/dev-python/pygame/pygame-1.9.6-r1.ebuild @@ -12,8 +12,9 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="LGPL-2.1" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="doc examples midi opengl X" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~sparc x86" +IUSE="doc examples midi opengl test X" +RESTRICT="!test? ( test )" DEPEND="dev-python/numpy[${PYTHON_USEDEP}] >=media-libs/sdl-image-1.2.2[png,jpeg] @@ -24,9 +25,18 @@ DEPEND="dev-python/numpy[${PYTHON_USEDEP}] X? ( >=media-libs/libsdl-1.2.5[opengl?,video,X] ) !X? ( >=media-libs/libsdl-1.2.5 )" RDEPEND="${DEPEND}" +# util-linux provides script +BDEPEND=" + test? ( sys-apps/util-linux )" -# various module import and data path issues -RESTRICT=test +src_prepare() { + # segfaults on Xvfb + rm test/scrap_test.py || die + # backport from git master (clock() isn't used) + sed -i -e '/from time import clock/d' test/math_test.py || die + + distutils-r1_src_prepare +} python_configure() { PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \ @@ -52,8 +62,14 @@ python_compile() { distutils-r1_python_compile } +src_test() { + virtx distutils-r1_src_test +} + python_test() { - PYTHONPATH="${BUILD_DIR}/lib" virtx "${EPYTHON}" -m pygame.tests + local -x PYTHONPATH= + distutils_install_for_testing + script -eqc "${EPYTHON} -m pygame.tests" || die } python_install() { diff --git a/dev-python/pygame/pygame-2.0.0_pre10.ebuild b/dev-python/pygame/pygame-2.0.0_pre10.ebuild new file mode 100644 index 000000000000..e0019d48ec64 --- /dev/null +++ b/dev-python/pygame/pygame-2.0.0_pre10.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 + +MY_PV=${PV/_pre/.dev} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Python bindings for SDL multimedia library" +HOMEPAGE="https://www.pygame.org/" +SRC_URI=" + https://github.com/pygame/pygame/releases/download/${MY_PV}/${MY_P}.tar.gz" +S=${WORKDIR}/${MY_P} + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="doc examples midi opengl test X" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/numpy[${PYTHON_USEDEP}] + >=media-libs/sdl2-image-1.2.2[jpeg,png] + >=media-libs/sdl2-mixer-1.2.4 + >=media-libs/sdl2-ttf-2.0.6 + >=media-libs/smpeg2-0.4.4-r1 + midi? ( media-libs/portmidi ) + X? ( >=media-libs/libsdl2-1.2.5[opengl?,video,X] ) + !X? ( >=media-libs/libsdl2-1.2.5 )" +DEPEND="${RDEPEND} + test? ( + media-libs/sdl2-image[gif,jpeg,png] + media-libs/sdl2-mixer[mp3,vorbis,wav] + )" +# util-linux provides script +BDEPEND=" + test? ( sys-apps/util-linux )" + +PATCHES=( + "${FILESDIR}"/${P}-py39.patch +) + +python_configure() { + PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \ + "${EPYTHON}" "${S}"/buildconfig/config.py -auto || die + + # Disable automagic dependency on PortMidi. + if ! use midi; then + sed -e "s:^pypm :#&:" -i Setup || die "sed failed" + fi +} + +python_test() { + local -x PYTHONPATH= + local -x SDL_VIDEODRIVER=dummy + local -x SDL_AUDIODRIVER=disk + distutils_install_for_testing + script -eqc "${EPYTHON} -m pygame.tests" || die +} + +python_install() { + distutils-r1_python_install + + # Bug #497720 + rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die +} + +python_install_all() { + distutils-r1_python_install_all + + if use doc; then + docinto html + dodoc -r docs/* + fi + + use examples && dodoc -r examples +} diff --git a/dev-python/pygame/pygame-9999.ebuild b/dev-python/pygame/pygame-9999.ebuild new file mode 100644 index 000000000000..9a1c6f7040a3 --- /dev/null +++ b/dev-python/pygame/pygame-9999.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python3_{6..9} ) + +inherit distutils-r1 git-r3 + +DESCRIPTION="Python bindings for SDL multimedia library" +HOMEPAGE="https://www.pygame.org/" +EGIT_REPO_URI="https://github.com/pygame/pygame.git" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="" +IUSE="doc examples midi opengl test X" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/numpy[${PYTHON_USEDEP}] + >=media-libs/sdl2-image-1.2.2[jpeg,png] + >=media-libs/sdl2-mixer-1.2.4 + >=media-libs/sdl2-ttf-2.0.6 + >=media-libs/smpeg2-0.4.4-r1 + midi? ( media-libs/portmidi ) + X? ( >=media-libs/libsdl2-1.2.5[opengl?,video,X] ) + !X? ( >=media-libs/libsdl2-1.2.5 )" +DEPEND="${RDEPEND} + test? ( + media-libs/sdl2-image[gif,jpeg,png] + media-libs/sdl2-mixer[mp3,vorbis,wav] + )" +# util-linux provides script +BDEPEND=" + test? ( sys-apps/util-linux )" + +python_configure() { + PORTMIDI_INC_PORTTIME=1 LOCALBASE="${EPREFIX}/usr" \ + "${EPYTHON}" "${S}"/buildconfig/config.py -auto || die + + # Disable automagic dependency on PortMidi. + if ! use midi; then + sed -e "s:^pypm :#&:" -i Setup || die "sed failed" + fi +} + +python_test() { + local -x PYTHONPATH= + local -x SDL_VIDEODRIVER=dummy + local -x SDL_AUDIODRIVER=disk + distutils_install_for_testing + script -eqc "${EPYTHON} -m pygame.tests" || die +} + +python_install() { + distutils-r1_python_install + + # Bug #497720 + rm -fr "${D}"$(python_get_sitedir)/pygame/{docs,examples,tests}/ || die +} + +python_install_all() { + distutils-r1_python_install_all + + if use doc; then + docinto html + dodoc -r docs/* + fi + + use examples && dodoc -r examples +} |