Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/PyQt5/
Date: Sun, 30 Oct 2022 22:41:56
Message-Id: 1667169478.8ea940bc259d0b956f653bdfafaf342610dbcf24.sam@gentoo
1 commit: 8ea940bc259d0b956f653bdfafaf342610dbcf24
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 22:37:58 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 22:37:58 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ea940bc
7
8 dev-python/PyQt5: add 5.15.7
9
10 Closes: https://bugs.gentoo.org/877835
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-python/PyQt5/Manifest | 1 +
14 dev-python/PyQt5/PyQt5-5.15.7.ebuild | 183 +++++++++++++++++++++++++++++++++++
15 2 files changed, 184 insertions(+)
16
17 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
18 index 6977df11bf54..b406f8f09058 100644
19 --- a/dev-python/PyQt5/Manifest
20 +++ b/dev-python/PyQt5/Manifest
21 @@ -1 +1,2 @@
22 DIST PyQt5-5.15.6.tar.gz 3239505 BLAKE2B e98d6af85ae4586dbb1b7db1d4cb17ccdac917a36a304a7486d553a681be9a920e8750173e49e58e02d0129890a8a713702977e64efbb386ce831b8aaef2b0fd SHA512 65fd663cb70e8701e49bd4b39dc9384546cf2edd1b3bab259ca64b50908f48bdc02ca143f36cd6b429075f5616dcc7b291607dcb63afa176e828cded3b82f5c7
23 +DIST PyQt5-5.15.7.tar.gz 3238978 BLAKE2B 8e810444d9e4fe0c5af702161bc834848eefb6fdf04b282bbf42a9057d564aa778a01a5d40c249c10eecafb0dce8d160f032668f0d1fc87714fd874f002ec88a SHA512 815065f88454f767525fdd2caf97b0192eaf6095133c9c708ee4efa3d222742720a169856be65c84400a6e8d42d69ae65697d7f9dd17b9b4a347d75db93c5129
24
25 diff --git a/dev-python/PyQt5/PyQt5-5.15.7.ebuild b/dev-python/PyQt5/PyQt5-5.15.7.ebuild
26 new file mode 100644
27 index 000000000000..5ae008467538
28 --- /dev/null
29 +++ b/dev-python/PyQt5/PyQt5-5.15.7.ebuild
30 @@ -0,0 +1,183 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..11} )
37 +inherit python-r1 qmake-utils
38 +
39 +DESCRIPTION="Python bindings for the Qt framework"
40 +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/ https://pypi.org/project/PyQt5/"
41 +
42 +MY_P=${PN}-${PV/_pre/.dev}
43 +if [[ ${PV} == *_pre* ]]; then
44 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
45 +else
46 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
47 +fi
48 +S=${WORKDIR}/${MY_P}
49 +
50 +LICENSE="GPL-3"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86"
53 +
54 +# TODO: QtNfc, QtQuick3D, QtRemoteObjects
55 +IUSE="bluetooth dbus debug declarative designer examples gles2-only gui help location
56 + multimedia network opengl positioning printsupport sensors serialport speech
57 + sql +ssl svg testlib webchannel websockets widgets x11extras xmlpatterns"
58 +
59 +# The requirements below were extracted from the qmake_QT declarations
60 +# in project.py and from the output of 'grep -r "%Import " ${S}/sip'
61 +REQUIRED_USE="
62 + ${PYTHON_REQUIRED_USE}
63 + bluetooth? ( gui )
64 + declarative? ( gui network )
65 + designer? ( widgets )
66 + help? ( gui widgets )
67 + location? ( positioning )
68 + multimedia? ( gui network )
69 + opengl? ( gui widgets )
70 + positioning? ( gui )
71 + printsupport? ( gui widgets )
72 + sensors? ( gui )
73 + serialport? ( gui )
74 + sql? ( widgets )
75 + svg? ( gui widgets )
76 + testlib? ( widgets )
77 + webchannel? ( network )
78 + websockets? ( network )
79 + widgets? ( gui )
80 + xmlpatterns? ( network )
81 +"
82 +
83 +# Minimal supported version of Qt.
84 +QT_PV="5.15:5"
85 +
86 +DEPEND="${PYTHON_DEPS}
87 + >=dev-qt/qtcore-${QT_PV}
88 + >=dev-qt/qtxml-${QT_PV}
89 + bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
90 + dbus? (
91 + dev-python/dbus-python[${PYTHON_USEDEP}]
92 + >=dev-qt/qtdbus-${QT_PV}
93 + )
94 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
95 + designer? ( >=dev-qt/designer-${QT_PV} )
96 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only=] )
97 + help? ( >=dev-qt/qthelp-${QT_PV} )
98 + location? ( >=dev-qt/qtlocation-${QT_PV} )
99 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
100 + network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
101 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
102 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
103 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
104 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
105 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
106 + speech? ( >=dev-qt/qtspeech-${QT_PV} )
107 + sql? ( >=dev-qt/qtsql-${QT_PV} )
108 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
109 + testlib? ( >=dev-qt/qttest-${QT_PV} )
110 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
111 + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
112 + widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
113 + x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
114 + xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
115 +"
116 +RDEPEND="${DEPEND}
117 + >=dev-python/PyQt5-sip-12.11:=[${PYTHON_USEDEP}]
118 +"
119 +BDEPEND="
120 + >=dev-python/PyQt-builder-1.10[${PYTHON_USEDEP}]
121 + >=dev-python/sip-6.4[${PYTHON_USEDEP}]
122 + >=dev-qt/qtcore-${QT_PV}
123 + dbus? ( virtual/pkgconfig )
124 +"
125 +
126 +src_configure() {
127 + pyqt_use_enable() {
128 + use "$1" || return
129 +
130 + if [[ $# -eq 1 ]]; then
131 + echo --enable=Qt${1^}
132 + else
133 + shift
134 + echo ${@/#/--enable=}
135 + fi
136 + }
137 +
138 + configuration() {
139 + local myconf=(
140 + sip-build
141 + --verbose
142 + --confirm-license
143 + --build-dir="${BUILD_DIR}"
144 + --scripts-dir="$(python_get_scriptdir)"
145 + --qmake="$(qt5_get_bindir)"/qmake
146 + --no-make
147 + $(usev debug '--debug --qml-debug --tracing')
148 + $(usev !dbus --no-dbus-python)
149 + $(usev !declarative --no-qml-plugin)
150 + $(usev !designer --no-designer-plugin)
151 + $(usev gles2-only --disabled-feature=PyQt_Desktop_OpenGL)
152 + $(usev !ssl --disabled-feature=PyQt_SSL)
153 + --enable=pylupdate
154 + --enable=pyrcc
155 + --enable=Qt
156 + $(pyqt_use_enable bluetooth)
157 + --enable=QtCore
158 + $(pyqt_use_enable dbus QtDBus)
159 + $(pyqt_use_enable declarative QtQml QtQuick $(usev widgets QtQuickWidgets))
160 + $(pyqt_use_enable designer)
161 + $(pyqt_use_enable gui)
162 + $(pyqt_use_enable gui $(use gles2-only && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
163 + $(pyqt_use_enable help)
164 + $(pyqt_use_enable location)
165 + $(pyqt_use_enable multimedia QtMultimedia $(usev widgets QtMultimediaWidgets))
166 + $(pyqt_use_enable network)
167 + $(pyqt_use_enable opengl QtOpenGL)
168 + $(pyqt_use_enable positioning)
169 + $(pyqt_use_enable printsupport QtPrintSupport)
170 + $(pyqt_use_enable sensors)
171 + $(pyqt_use_enable serialport QtSerialPort)
172 + $(pyqt_use_enable speech QtTextToSpeech)
173 + $(pyqt_use_enable sql)
174 + $(pyqt_use_enable svg)
175 + $(pyqt_use_enable testlib QtTest)
176 + $(pyqt_use_enable webchannel QtWebChannel)
177 + $(pyqt_use_enable websockets QtWebSockets)
178 + $(pyqt_use_enable widgets)
179 + $(pyqt_use_enable x11extras QtX11Extras)
180 + --enable=QtXml
181 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
182 + )
183 + echo "${myconf[@]}"
184 + "${myconf[@]}" || die
185 +
186 + # Run eqmake to respect toolchain and build flags
187 + run_in_build_dir eqmake5 -recursive ${PN}.pro
188 + }
189 + python_foreach_impl configuration
190 +}
191 +
192 +src_compile() {
193 + python_foreach_impl run_in_build_dir default
194 +}
195 +
196 +src_install() {
197 + installation() {
198 + emake INSTALL_ROOT="${D}" install
199 + python_optimize
200 +
201 + local exe
202 + for exe in "${D}$(python_get_scriptdir)"/*; do
203 + python_doexe "${exe}"
204 + done
205 + }
206 + python_foreach_impl run_in_build_dir installation
207 +
208 + einstalldocs
209 +
210 + if use examples; then
211 + dodoc -r examples
212 + fi
213 +}