From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1367757-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9911A15808B for <garchives@archives.gentoo.org>; Tue, 15 Feb 2022 09:39:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE1A5E0855; Tue, 15 Feb 2022 09:39:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B1D94E0844 for <gentoo-commits@lists.gentoo.org>; Tue, 15 Feb 2022 09:39:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DCE86342F9A for <gentoo-commits@lists.gentoo.org>; Tue, 15 Feb 2022 09:39:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 792A52DC for <gentoo-commits@lists.gentoo.org>; Tue, 15 Feb 2022 09:39:13 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org> Message-ID: <1644917946.62c09f5146af4f83f76683be87af7e0f3fd219ee.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygame/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pygame/pygame-2.1.2-r1.ebuild X-VCS-Directories: dev-python/pygame/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 62c09f5146af4f83f76683be87af7e0f3fd219ee X-VCS-Branch: master Date: Tue, 15 Feb 2022 09:39:13 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e64d231e-7f3f-421c-bdde-50d9d972e64f X-Archives-Hash: ec6ace1b56edbaf822bc0d00ae335c4f commit: 62c09f5146af4f83f76683be87af7e0f3fd219ee Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Feb 15 09:17:29 2022 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Feb 15 09:39:06 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62c09f51 dev-python/pygame: Use PEP517 build Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> dev-python/pygame/pygame-2.1.2-r1.ebuild | 82 ++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/dev-python/pygame/pygame-2.1.2-r1.ebuild b/dev-python/pygame/pygame-2.1.2-r1.ebuild new file mode 100644 index 000000000000..8678150bfbb4 --- /dev/null +++ b/dev-python/pygame/pygame-2.1.2-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) + +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 ~sparc ~x86" +IUSE="examples midi opengl test X" +RESTRICT="!test? ( test )" + +RDEPEND="dev-python/numpy[${PYTHON_USEDEP}] + media-libs/freetype + media-libs/libpng:0= + >=media-libs/sdl2-image-1.2.2 + >=media-libs/sdl2-mixer-1.2.4 + >=media-libs/sdl2-ttf-2.0.6 + >=media-libs/smpeg2-0.4.4-r1 + virtual/jpeg + midi? ( media-libs/portmidi ) + X? ( >=media-libs/libsdl2-1.2.5[opengl?,threads,video,X] ) + !X? ( >=media-libs/libsdl2-1.2.5[threads] )" +DEPEND="${RDEPEND} + test? ( + media-libs/sdl2-image[gif,jpeg,png,tiff] + media-libs/sdl2-mixer[mp3,vorbis,wav] + )" +# fontconfig used for fc-list +RDEPEND+=" + media-libs/fontconfig" +# util-linux provides script +BDEPEND=" + test? ( + media-libs/fontconfig + sys-apps/util-linux + )" + +src_prepare() { + if ! use midi; then + rm test/midi_test.py || die + fi + distutils-r1_src_prepare +} + +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=${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 +}