1 |
commit: e02b7b1be30fe3f4ac90a1c2361ae9aa8805ef0d |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 28 20:17:28 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 1 17:06:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e02b7b1b |
7 |
|
8 |
dev-python/PyQt5: add 5.15.4, add py3.10 |
9 |
|
10 |
- Dropped webkit flag because deprecated, and the only consumer |
11 |
of this flag has been ported to webengine upstream |
12 |
|
13 |
- Dropped networkauth flag as these bindings are no longer |
14 |
included |
15 |
|
16 |
Closes: https://bugs.gentoo.org/793419 |
17 |
Package-Manager: Portage-3.0.19, Repoman-3.0.3 |
18 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
19 |
|
20 |
dev-python/PyQt5/Manifest | 1 + |
21 |
dev-python/PyQt5/PyQt5-5.15.4.ebuild | 183 +++++++++++++++++++++++++++++++++++ |
22 |
2 files changed, 184 insertions(+) |
23 |
|
24 |
diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest |
25 |
index afeb1a3ccb1..674ea7b89fb 100644 |
26 |
--- a/dev-python/PyQt5/Manifest |
27 |
+++ b/dev-python/PyQt5/Manifest |
28 |
@@ -1 +1,2 @@ |
29 |
DIST PyQt5-5.15.2.tar.gz 3265445 BLAKE2B 7712d68aa54cf9e6836863d7aa645151254d79621e115ed314ba63c371d5e24577a0392311b31a73e45af45baa29eca1d7e9a03874beac1fbf043fa703af69f9 SHA512 6d48d2ed907b436131d46b0513d82e1069c76e873d395e4a6c0832ae3a20621b92d3abece046c5fcd14cb818d50ffb369153fca1ce9341f0db1b8c479b94e621 |
30 |
+DIST PyQt5-5.15.4.tar.gz 3258085 BLAKE2B 96bda4da1321e499707d29d9870693815170ccc32e2e0d7bb3c6977ea2933f9684557124deb92abbf92b923e0071cf47ee4822f6cb5d06fdc61b498efc44db4c SHA512 6d19f549a71eb8df8ba8407398ccd6e3d339436f4f2e7c5dca6885849d6ce510c4f4dea3c97257685aa462bb09a2ead33d80234ccb934f9b1a40285dbec631c7 |
31 |
|
32 |
diff --git a/dev-python/PyQt5/PyQt5-5.15.4.ebuild b/dev-python/PyQt5/PyQt5-5.15.4.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..926e58a8c43 |
35 |
--- /dev/null |
36 |
+++ b/dev-python/PyQt5/PyQt5-5.15.4.ebuild |
37 |
@@ -0,0 +1,183 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python3_{7..10} ) |
44 |
+inherit multibuild python-r1 qmake-utils |
45 |
+ |
46 |
+DESCRIPTION="Python bindings for the Qt framework" |
47 |
+HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro" |
48 |
+ |
49 |
+MY_P=${PN}-${PV/_pre/.dev} |
50 |
+if [[ ${PV} == *_pre* ]]; then |
51 |
+ SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz" |
52 |
+else |
53 |
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
54 |
+fi |
55 |
+S="${WORKDIR}/${MY_P}" |
56 |
+ |
57 |
+LICENSE="GPL-3" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" |
60 |
+ |
61 |
+# TODO: QtNfc, QtQuick3D, QtRemoteObjects, QtTextToSpeech |
62 |
+IUSE="bluetooth dbus debug declarative designer examples gles2-only gui help location |
63 |
+ multimedia network opengl positioning printsupport sensors serialport |
64 |
+ sql +ssl svg testlib webchannel websockets widgets x11extras xmlpatterns" |
65 |
+ |
66 |
+# The requirements below were extracted from configure.py |
67 |
+# and from the output of 'grep -r "%Import " "${S}"/sip' |
68 |
+REQUIRED_USE=" |
69 |
+ ${PYTHON_REQUIRED_USE} |
70 |
+ bluetooth? ( gui ) |
71 |
+ declarative? ( gui network ) |
72 |
+ designer? ( widgets ) |
73 |
+ help? ( gui widgets ) |
74 |
+ location? ( positioning ) |
75 |
+ multimedia? ( gui network ) |
76 |
+ opengl? ( gui widgets ) |
77 |
+ positioning? ( gui ) |
78 |
+ printsupport? ( gui widgets ) |
79 |
+ sensors? ( gui ) |
80 |
+ serialport? ( gui ) |
81 |
+ sql? ( widgets ) |
82 |
+ svg? ( gui widgets ) |
83 |
+ testlib? ( widgets ) |
84 |
+ webchannel? ( network ) |
85 |
+ websockets? ( network ) |
86 |
+ widgets? ( gui ) |
87 |
+ xmlpatterns? ( network ) |
88 |
+" |
89 |
+ |
90 |
+# Minimal supported version of Qt. |
91 |
+QT_PV="$(ver_cut 1-2):5" |
92 |
+ |
93 |
+RDEPEND="${PYTHON_DEPS} |
94 |
+ >=dev-python/PyQt5-sip-4.19.23:=[${PYTHON_USEDEP}] |
95 |
+ >=dev-qt/qtcore-${QT_PV} |
96 |
+ >=dev-qt/qtxml-${QT_PV} |
97 |
+ bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} ) |
98 |
+ dbus? ( |
99 |
+ dev-python/dbus-python[${PYTHON_USEDEP}] |
100 |
+ >=dev-qt/qtdbus-${QT_PV} |
101 |
+ ) |
102 |
+ declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] ) |
103 |
+ designer? ( >=dev-qt/designer-${QT_PV} ) |
104 |
+ gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only=] ) |
105 |
+ help? ( >=dev-qt/qthelp-${QT_PV} ) |
106 |
+ location? ( >=dev-qt/qtlocation-${QT_PV} ) |
107 |
+ multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] ) |
108 |
+ network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] ) |
109 |
+ opengl? ( >=dev-qt/qtopengl-${QT_PV} ) |
110 |
+ positioning? ( >=dev-qt/qtpositioning-${QT_PV} ) |
111 |
+ printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} ) |
112 |
+ sensors? ( >=dev-qt/qtsensors-${QT_PV} ) |
113 |
+ serialport? ( >=dev-qt/qtserialport-${QT_PV} ) |
114 |
+ sql? ( >=dev-qt/qtsql-${QT_PV} ) |
115 |
+ svg? ( >=dev-qt/qtsvg-${QT_PV} ) |
116 |
+ testlib? ( >=dev-qt/qttest-${QT_PV} ) |
117 |
+ webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} ) |
118 |
+ websockets? ( >=dev-qt/qtwebsockets-${QT_PV} ) |
119 |
+ widgets? ( >=dev-qt/qtwidgets-${QT_PV} ) |
120 |
+ x11extras? ( >=dev-qt/qtx11extras-${QT_PV} ) |
121 |
+ xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} ) |
122 |
+" |
123 |
+DEPEND="${RDEPEND} |
124 |
+ >=dev-python/sip-4.19.23[${PYTHON_USEDEP}] |
125 |
+ dbus? ( virtual/pkgconfig ) |
126 |
+" |
127 |
+ |
128 |
+pyqt_use_enable() { |
129 |
+ use "$1" || return |
130 |
+ |
131 |
+ if [[ $# -eq 1 ]]; then |
132 |
+ echo --enable=Qt${1^} |
133 |
+ else |
134 |
+ shift |
135 |
+ echo ${@/#/--enable=} |
136 |
+ fi |
137 |
+} |
138 |
+ |
139 |
+src_configure() { |
140 |
+ configuration() { |
141 |
+ local myconf=( |
142 |
+ "${EPYTHON}" |
143 |
+ "${S}/configure.py" |
144 |
+ $(usex debug '--debug --qml-debug --trace' '') |
145 |
+ --verbose |
146 |
+ --confirm-license |
147 |
+ --qmake="$(qt5_get_bindir)/qmake" |
148 |
+ --bindir="${EPREFIX}/usr/bin" |
149 |
+ --qsci-api |
150 |
+ --enable=QtCore |
151 |
+ --enable=QtXml |
152 |
+ $(pyqt_use_enable bluetooth) |
153 |
+ $(pyqt_use_enable dbus QtDBus) |
154 |
+ $(usex dbus '' --no-python-dbus) |
155 |
+ $(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets '')) |
156 |
+ $(usex declarative '' --no-qml-plugin) |
157 |
+ $(pyqt_use_enable designer) |
158 |
+ $(usex designer '' --no-designer-plugin) |
159 |
+ $(usex gles2-only '--disable-feature=PyQt_Desktop_OpenGL' '') |
160 |
+ $(pyqt_use_enable gui) |
161 |
+ $(pyqt_use_enable gui $(use gles2-only && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core})) |
162 |
+ $(pyqt_use_enable help) |
163 |
+ $(pyqt_use_enable location) |
164 |
+ $(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets '')) |
165 |
+ $(pyqt_use_enable network) |
166 |
+ $(pyqt_use_enable opengl QtOpenGL) |
167 |
+ $(pyqt_use_enable positioning) |
168 |
+ $(pyqt_use_enable printsupport QtPrintSupport) |
169 |
+ $(pyqt_use_enable sensors) |
170 |
+ $(pyqt_use_enable serialport QtSerialPort) |
171 |
+ $(pyqt_use_enable sql) |
172 |
+ $(usex ssl '' '--disable-feature=PyQt_SSL') |
173 |
+ $(pyqt_use_enable svg) |
174 |
+ $(pyqt_use_enable testlib QtTest) |
175 |
+ $(pyqt_use_enable webchannel QtWebChannel) |
176 |
+ $(pyqt_use_enable websockets QtWebSockets) |
177 |
+ $(pyqt_use_enable widgets) |
178 |
+ $(pyqt_use_enable x11extras QtX11Extras) |
179 |
+ $(pyqt_use_enable xmlpatterns QtXmlPatterns) |
180 |
+ ) |
181 |
+ echo "${myconf[@]}" |
182 |
+ "${myconf[@]}" || die |
183 |
+ |
184 |
+ # Run eqmake to respect toolchain and build flags |
185 |
+ eqmake5 -recursive ${PN}.pro |
186 |
+ } |
187 |
+ python_foreach_impl run_in_build_dir configuration |
188 |
+} |
189 |
+ |
190 |
+src_compile() { |
191 |
+ python_foreach_impl run_in_build_dir default |
192 |
+} |
193 |
+ |
194 |
+src_install() { |
195 |
+ installation() { |
196 |
+ local tmp_root=${D}/${PN}_tmp_root |
197 |
+ # parallel install fails because mk_distinfo.py runs too early |
198 |
+ emake -j1 INSTALL_ROOT="${tmp_root}" install |
199 |
+ |
200 |
+ local bin_dir=${tmp_root}${EPREFIX}/usr/bin |
201 |
+ local exe |
202 |
+ for exe in pylupdate5 pyrcc5 pyuic5; do |
203 |
+ python_doexe "${bin_dir}/${exe}" |
204 |
+ rm "${bin_dir}/${exe}" || die |
205 |
+ done |
206 |
+ |
207 |
+ local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic |
208 |
+ rm -r "${uic_dir}"/port_v2 || die |
209 |
+ |
210 |
+ multibuild_merge_root "${tmp_root}" "${D}" |
211 |
+ python_optimize |
212 |
+ } |
213 |
+ python_foreach_impl run_in_build_dir installation |
214 |
+ |
215 |
+ einstalldocs |
216 |
+ |
217 |
+ if use examples; then |
218 |
+ dodoc -r examples |
219 |
+ fi |
220 |
+} |