From 66520d3148e31806a52cf7df5b8d91d5cd431670 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 17 Jan 2023 07:14:19 +0000 Subject: gentoo auto-resync : 17:01:2023 - 07:14:19 --- dev-python/pygame/Manifest | 5 +- .../pygame/files/pygame-2.1.2-cython_only.patch | 36 ++++++++ .../files/pygame-2.1.2-libsdl2-2.26-tests.patch | 17 ++++ dev-python/pygame/pygame-2.1.2-r1.ebuild | 4 + dev-python/pygame/pygame-2.1.2-r2.ebuild | 95 ++++++++++++++++++++++ 5 files changed, 156 insertions(+), 1 deletion(-) create mode 100644 dev-python/pygame/files/pygame-2.1.2-cython_only.patch create mode 100644 dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch create mode 100644 dev-python/pygame/pygame-2.1.2-r2.ebuild (limited to 'dev-python/pygame') diff --git a/dev-python/pygame/Manifest b/dev-python/pygame/Manifest index 4468afa05a5f..d90d894bb87e 100644 --- a/dev-python/pygame/Manifest +++ b/dev-python/pygame/Manifest @@ -1,3 +1,6 @@ +AUX pygame-2.1.2-cython_only.patch 1142 BLAKE2B fd4f8eb6be984aead9cf3988d9f1c820db1b62a17919e7af52c8a7ab03264b13a04f8cd77affc1822c351fd48533fbda6cb53a82ec8869cf924c036a8ba928f9 SHA512 943b22a97313b12344d94f3832e66763b3249925da5de6a9d2ccc4dc405a9dd81b5c53c2f26da7ad406a1928aa6e270a5db8c454c26708a78412956136b844f4 +AUX pygame-2.1.2-libsdl2-2.26-tests.patch 889 BLAKE2B b676d4f591041858492df2cbe087aa051b7ba3dd9d0480d9afdc878412fa6613131f8ab8f78c055f0cdf014627ba42dc9c4118798c81a8365f457225af231282 SHA512 8577b3f39828d65db0b08ed3c59d15a6de26d0f0f1bb085137c4a5a97aa0498cb9572292bca87ae2162316a001f8d9ddf5834626dc0af8162194ae483091d68c DIST pygame-2.1.2.gh.tar.gz 6100415 BLAKE2B 4b81c2f0abc2c2c4732ddb8f8e6d4bffa5169e3d3ee2d9ea2798d294623a9c70e2ff004825030606285124ef1347177b46adc676db450785e8420de45f37db34 SHA512 531cb0371853def7a3ddb8eb0110fbd58acaf1b2351d7518402c9a960baca705bb34da879015e7a6cd5f2f8af98c57e7bc732021a8f62ed9f90cacf068c9c2d6 -EBUILD pygame-2.1.2-r1.ebuild 1953 BLAKE2B 64cb201bf159781d42ea3d33c27da4115f1b60f0423cbe9f69e71563da82a8744f64df97c274a1b3098d9f5fe2407a9135545674c96cc1881fa3fd529ff8a03c SHA512 eadc9f7116db3a906a078495f19179ed1f4421e4cb858dc8ed035a79b604a5c9d51aa634995607cdaa5713b6fa779c785ba3908b5ac6649bc540a42a6d00edbd +EBUILD pygame-2.1.2-r1.ebuild 2011 BLAKE2B 3d721d8ce7918067e94e2afb583e66d8f8d567b1d01d2b9827f1df5bf3e13e5ccf938bab043982f8d7ab379f36956153fd6ff65fdcb541f7fb2793bb8f83595b SHA512 489fbd4bac984cccb0be03dff55123228dde3002348273c176262eba6350300f5c27234bb60cd0723658ff1ef7964531e3533b8a3f75d2a496016c1752b05de6 +EBUILD pygame-2.1.2-r2.ebuild 2160 BLAKE2B 96703df47d5eb493374e376583afb9151081d8bbc2104c025bc43a1644bf86628af71f1d89dd547985a9f8c33f9f599d5876f3bb7f7e34ff426df620fd6e5fc9 SHA512 1e39d45d730b724cc4e446e1466215c730a47520cfa0a42b6274dcc5e5ab8970a84642df7885ba29ef835b7342309d017b10337278307a6bd0edcca49b337cd1 MISC metadata.xml 462 BLAKE2B 398db1c050bbf14a65ac770e980ca91269277ecb00d94457502532ef7c407145cc2438ead46d370d1195331fd3d2f9602ecbb381c9f178240d031d1c665a9324 SHA512 2e95b731a4cb49372e6af00bb059bd179dc167aaac07f412c51970cf27b0fdddda616fb59bbbd62101c1b6f272cc0263123e334df01ebf6d1697ef8b55b62fef diff --git a/dev-python/pygame/files/pygame-2.1.2-cython_only.patch b/dev-python/pygame/files/pygame-2.1.2-cython_only.patch new file mode 100644 index 000000000000..4fb935dcf668 --- /dev/null +++ b/dev-python/pygame/files/pygame-2.1.2-cython_only.patch @@ -0,0 +1,36 @@ +Backport to ease running cythonize, DISTUTILS_ARGS=(cython) resulted in +reconfigure attempts that failed without PORTMIDI* being exported. + +https://github.com/pygame/pygame/commit/4eeffc049cf +From: Ankith <46915066+ankith26@users.noreply.github.com> +Date: Fri, 3 Jun 2022 21:27:57 +0530 +Subject: [PATCH] Add cython_only option to setup.py +--- a/setup.py ++++ b/setup.py +@@ -209,7 +209,16 @@ def consume_arg(name): + cflags += '-mfpu=neon' + os.environ['CFLAGS'] = cflags + ++compile_cython = False ++cython_only = False + if consume_arg('cython'): ++ compile_cython = True ++ ++if consume_arg('cython_only'): ++ compile_cython = True ++ cython_only = True ++ ++if compile_cython: + # compile .pyx files + # So you can `setup.py cython` or `setup.py cython install` + try: +@@ -280,6 +289,9 @@ def consume_arg(name): + for i, kwargs in enumerate(queue): + kwargs['progress'] = f'[{i + 1}/{count}] ' + cythonize_one(**kwargs) ++ ++ if cython_only: ++ sys.exit(0) + + no_compilation = any(x in ['lint', 'format', 'docs'] for x in sys.argv) + AUTO_CONFIG = not os.path.isfile('Setup') and not no_compilation diff --git a/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch b/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch new file mode 100644 index 000000000000..e231d1bf6d85 --- /dev/null +++ b/dev-python/pygame/files/pygame-2.1.2-libsdl2-2.26-tests.patch @@ -0,0 +1,17 @@ +https://github.com/pygame/pygame/commit/420c1a7341 +From: Starbuck5 <46412508+Starbuck5@users.noreply.github.com> +Date: Sat, 19 Nov 2022 21:17:32 -0800 +Subject: [PATCH] Adjust surface masks to create a proper 24 bit Surface + +The SDL 2.26.0 pre-release rejects a 24 bit Surface created with this mask, which is the right call, as it needs 32 bits of space. Older SDL went ahead and created a 32 bit surface anyway, which it probably shouldn't have. +--- a/test/surface_test.py ++++ b/test/surface_test.py +@@ -2023,7 +2023,7 @@ def test_get_losses(self): + mask8 = (224, 28, 3, 0) + mask15 = (31744, 992, 31, 0) + mask16 = (63488, 2016, 31, 0) +- mask24 = (4278190080, 16711680, 65280, 0) ++ mask24 = (16711680, 65280, 255, 0) + mask32 = (4278190080, 16711680, 65280, 255) + + # Surfaces with standard depths and masks diff --git a/dev-python/pygame/pygame-2.1.2-r1.ebuild b/dev-python/pygame/pygame-2.1.2-r1.ebuild index bf858b684edb..c7b3c066375a 100644 --- a/dev-python/pygame/pygame-2.1.2-r1.ebuild +++ b/dev-python/pygame/pygame-2.1.2-r1.ebuild @@ -45,6 +45,10 @@ BDEPEND=" sys-apps/util-linux )" +PATCHES=( + "${FILESDIR}"/${P}-libsdl2-2.26-tests.patch +) + src_prepare() { if ! use midi; then rm test/midi_test.py || die diff --git a/dev-python/pygame/pygame-2.1.2-r2.ebuild b/dev-python/pygame/pygame-2.1.2-r2.ebuild new file mode 100644 index 000000000000..c6f10a469b75 --- /dev/null +++ b/dev-python/pygame/pygame-2.1.2-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +inherit distutils-r1 + +DESCRIPTION="Python bindings for SDL multimedia library" +HOMEPAGE="https://www.pygame.org/" +SRC_URI=" + https://github.com/pygame/pygame/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="examples midi opengl test X" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-python/numpy[${PYTHON_USEDEP}] + media-libs/freetype + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/sdl2-image + media-libs/sdl2-mixer + media-libs/sdl2-ttf + midi? ( media-libs/portmidi ) + X? ( media-libs/libsdl2[opengl?,threads,video,X] ) + !X? ( media-libs/libsdl2[threads] )" +DEPEND=" + ${RDEPEND} + test? ( + media-libs/sdl2-image[gif,jpeg,png,tiff,webp] + media-libs/sdl2-mixer[mp3,vorbis,wav] + )" +# fontconfig used for fc-list +RDEPEND+=" + media-libs/fontconfig" +# util-linux provides script +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] + test? ( + media-libs/fontconfig + sys-apps/util-linux + )" + +PATCHES=( + "${FILESDIR}"/${P}-libsdl2-2.26-tests.patch + "${FILESDIR}"/${P}-cython_only.patch +) + +src_prepare() { + distutils-r1_src_prepare + + if ! use midi; then + rm test/midi_test.py || die + fi +} + +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 + fi +} + +python_configure_all() { + find src_c/cython -name '*.pyx' -exec touch {} + || die + "${EPYTHON}" setup.py cython_only || die +} + +python_test() { + local -x PYTHONPATH=${BUILD_DIR}/install/lib + local -x SDL_VIDEODRIVER=dummy + local -x SDL_AUDIODRIVER=disk + script -eqc "${EPYTHON} -m pygame.tests -v" || 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 + use examples && dodoc -r examples +} -- cgit v1.2.3