From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 727B6158041 for ; Tue, 5 Mar 2024 13:27:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 04BA4E29D0; Tue, 5 Mar 2024 13:27:40 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DC1FCE29D0 for ; Tue, 5 Mar 2024 13:27:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB645343010 for ; Tue, 5 Mar 2024 13:27:38 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ADD3A14F1 for ; Tue, 5 Mar 2024 13:27:35 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1709645238.b3fdca4be25199f58a147aee51c39c2d726b336c.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyotherside/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyotherside/pyotherside-1.6.0-r1.ebuild X-VCS-Directories: dev-python/pyotherside/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: b3fdca4be25199f58a147aee51c39c2d726b336c X-VCS-Branch: master Date: Tue, 5 Mar 2024 13:27:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a9d2587b-bfe3-4e22-8b46-79ad257d736e X-Archives-Hash: 4980eb427158e3568be17a54d6737401 commit: b3fdca4be25199f58a147aee51c39c2d726b336c Author: Marek Szuba gentoo org> AuthorDate: Tue Mar 5 13:24:51 2024 +0000 Commit: Marek Szuba gentoo org> CommitDate: Tue Mar 5 13:27:18 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3fdca4b dev-python/pyotherside: support simultaneous Qt5 and Qt6 installation Signed-off-by: Marek Szuba gentoo.org> dev-python/pyotherside/pyotherside-1.6.0-r1.ebuild | 106 +++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/dev-python/pyotherside/pyotherside-1.6.0-r1.ebuild b/dev-python/pyotherside/pyotherside-1.6.0-r1.ebuild new file mode 100644 index 000000000000..44c3228186f8 --- /dev/null +++ b/dev-python/pyotherside/pyotherside-1.6.0-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit multibuild qmake-utils python-single-r1 + +DESCRIPTION="Asynchronous Python 3 Bindings for Qt" +HOMEPAGE="https://github.com/thp/pyotherside https://thp.io/2011/pyotherside/" +SRC_URI="https://github.com/thp/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="ISC" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" +IUSE="qt5 qt6" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + || ( qt5 qt6 )" + +RDEPEND=" + ${PYTHON_DEPS} + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtdeclarative:5 + dev-qt/qtgui:5 + dev-qt/qtopengl:5 + dev-qt/qtsvg:5 + ) + qt6? ( + dev-qt/qtbase:6[opengl] + dev-qt/qtdeclarative:6[opengl] + dev-qt/qtquick3d:6[opengl] + dev-qt/qtsvg:6 + )" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.0-qt6.5.patch +) + +pkg_setup() { + MULTIBUILD_VARIANTS=( $(usev qt5) $(usev qt6) ) + python_setup +} + +src_prepare() { + default + sed -i -e "s/qtquicktests//" pyotherside.pro || die + multibuild_copy_sources +} + +src_configure() { + myconfigure() { + pushd "${BUILD_DIR}" > /dev/null || die + + if [[ "${MULTIBUILD_VARIANT}" == qt5 ]]; then + eqmake5 + elif [[ "${MULTIBUILD_VARIANT}" == qt6 ]]; then + eqmake6 + else + # This should never happen if REQUIRED_USE is enforced + die "Neither Qt5 nor Qt6 support enabled, aborting" + fi + popd > /dev/null || die + } + + multibuild_foreach_variant myconfigure +} + +src_compile() { + mycompile() { + pushd "${BUILD_DIR}" > /dev/null || die + + emake + + popd > /dev/null || die + } + + multibuild_foreach_variant mycompile +} + +src_test() { + mytest() { + pushd "${BUILD_DIR}" > /dev/null || die + + QT_QPA_PLATFORM="offscreen" tests/tests || die + + popd > /dev/null || die + } + + multibuild_foreach_variant mytest +} + +src_install() { + myinstall() { + pushd "${BUILD_DIR}" > /dev/null || die + + emake install INSTALL_ROOT="${D}" + + popd > /dev/null || die + } + + multibuild_foreach_variant myinstall +}