blob: 366d71378ae48a7f17740a418e3d2d42ee56a294 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
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/pyotherside/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 )
"
DEPEND="
${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
)"
RDEPEND="
${DEPEND}
"
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
case ${MULTIBUILD_VARIANT} in
qt5)
eqmake5
;;
qt6)
eqmake6
;;
*)
# This should never happen if REQUIRED_USE is enforced
die "Neither Qt5 nor Qt6 support enabled, aborting"
;;
esac
popd > /dev/null || die
}
multibuild_foreach_variant myconfigure
}
src_compile() {
mycompile() {
emake -C "${BUILD_DIR}"
}
multibuild_foreach_variant mycompile
}
src_test() {
mytest() {
QT_QPA_PLATFORM="offscreen" "${BUILD_DIR}"/tests/tests || die
}
multibuild_foreach_variant mytest
}
src_install() {
myinstall() {
emake -C "${BUILD_DIR}" install INSTALL_ROOT="${D}"
}
multibuild_foreach_variant myinstall
}
|