commit:     96896a2f03b704a96ac2d145fc5636ac70e6a1f5
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 14 11:01:05 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov 14 11:05:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96896a2f

dev-python/pyotherside: add 1.6.0

With preliminary - and incomplete - instrumentation for Qt6.

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 dev-python/pyotherside/Manifest                 |  1 +
 dev-python/pyotherside/pyotherside-1.6.0.ebuild | 64 +++++++++++++++++++++++++
 profiles/base/package.use.mask                  |  5 ++
 3 files changed, 70 insertions(+)

diff --git a/dev-python/pyotherside/Manifest b/dev-python/pyotherside/Manifest
index 1636dd27521a..c0515c5c675b 100644
--- a/dev-python/pyotherside/Manifest
+++ b/dev-python/pyotherside/Manifest
@@ -1 +1,2 @@
 DIST pyotherside-1.5.9.tar.gz 185230 BLAKE2B 
7130f17f29ed07cefc641d77631db46d08f3bd836c8517427e38fb454cbf34c2e875bb46798b3d785aa68064c24f154ed166617cde263f722e77eac6d0903980
 SHA512 
62c171b273b921d8e0220c7b73f0ff95a0a911eb3785cc37f3dab2ec624e54301ac5fbccfb57cac6a4bee967728624d4738b03aff0c5762452b99674cdff6ab2
+DIST pyotherside-1.6.0.tar.gz 183645 BLAKE2B 
e2a12a9a96f3672a5e322c9f2e84d485b8086bdcacfc6586e0c23f6dd730d3e66cea66618540fd9a304480a9ab86386e2fe0136047c59f70bfa3b5cff9e8e76e
 SHA512 
57835db9d65fae10e6b3ec8ab37793e316324e7a819a1045436adf9eabdee11ccf3090a4db0302283b236e77e5e0bd14cf92ed1430835ccc324e50085a872787

diff --git a/dev-python/pyotherside/pyotherside-1.6.0.ebuild 
b/dev-python/pyotherside/pyotherside-1.6.0.ebuild
new file mode 100644
index 000000000000..355a5418a120
--- /dev/null
+++ b/dev-python/pyotherside/pyotherside-1.6.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit 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 ~ppc64 ~riscv"
+IUSE="+qt5 qt6"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+       ^^ ( qt5 qt6 )"
+
+# qt6 TODO:
+#  - add dev-qt/qt{gui,opengl}:6 once in the tree, test if qt6 deps okay then
+#  - instrument qmake6 (no eqmake6 in the eclass yet)
+#  - multibuild for both qt5 and qt6 if requested
+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
+               dev-qt/qtdeclarative:6
+               dev-qt/qtsvg:6
+       )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+       default
+       sed -i -e "s/qtquicktests//" pyotherside.pro || die
+}
+
+src_configure() {
+       if use qt5; then
+               eqmake5
+       elif use qt6; then
+               die "Qt6 support is not ready yet"
+       else
+               # This should never happen if REQUIRED_USE is enforced
+               die "Neither Qt5 nor Qt6 support enabled, aborting"
+       fi
+}
+
+src_test() {
+       QT_QPA_PLATFORM="offscreen" tests/tests || die
+}
+
+src_install() {
+       emake install INSTALL_ROOT="${D}"
+}

diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask
index 3a3c6d81ae61..d412a99bd8b9 100644
--- a/profiles/base/package.use.mask
+++ b/profiles/base/package.use.mask
@@ -6,6 +6,11 @@
 # This file is only for generic masks. For arch-specific masks (i.e.
 # mask everywhere, unmask on arch/*) use arch/base.
 
+# Marek Szuba <[email protected]> (2022-11-14)
+# Incomplete dependency tree, no qmake6 instrumentation in either
+# qmake-utils.eclass nor the ebuilds yet.
+dev-python/pyotherside qt6
+
 # Sam James <[email protected]> (2022-10-08)
 # Older versions of libvirt need a vulnerable version of wireshark
 <app-emulation/libvirt-8.0.0 wireshark-plugins

Reply via email to