1 |
commit: 7e19d8487c63c4dcfddb55fe7b1f152fc8eb8821 |
2 |
Author: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 22 16:29:43 2020 +0000 |
4 |
Commit: Rick Farina <zerochaos <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 22 17:22:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e19d848 |
7 |
|
8 |
dev-python/pyside2: imported from leycec/raiagent |
9 |
|
10 |
very slightly modified |
11 |
|
12 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
13 |
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org> |
14 |
|
15 |
dev-python/pyside2/Manifest | 2 + |
16 |
dev-python/pyside2/metadata.xml | 40 ++++++ |
17 |
dev-python/pyside2/pyside2-5.14.1-r2.ebuild | 208 ++++++++++++++++++++++++++++ |
18 |
dev-python/pyside2/pyside2-5.14.2.ebuild | 208 ++++++++++++++++++++++++++++ |
19 |
4 files changed, 458 insertions(+) |
20 |
|
21 |
diff --git a/dev-python/pyside2/Manifest b/dev-python/pyside2/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..a1325269803 |
24 |
--- /dev/null |
25 |
+++ b/dev-python/pyside2/Manifest |
26 |
@@ -0,0 +1,2 @@ |
27 |
+DIST pyside-setup-opensource-src-5.14.1.tar.xz 3217008 BLAKE2B c02a79ecea0ba8c7f5547d16c842437455f7f7fce9b7993849919b593fc50b70661e1fc7c1e01eb6a505807f05e17696b2e7727f6ada9ecae2ce30a9ab37a4aa SHA512 6dfe8dc6f302a35a6448c4facb2b98d638506381638c8bda69b75a47ea6cb3168b11515faf0000dbfb5e36bfad5d14488ba5a9bd914adb3f5c38ed18714521d4 |
28 |
+DIST pyside-setup-opensource-src-5.14.2.tar.xz 3238036 BLAKE2B 454f19ae4e154747bad2b833727ab62ded15bbac495cc0bef112ce6cccdd69bb5bb541c9b31125bd05090bfce042bac2ac8b47690c695e82b5c901e45e87f681 SHA512 6708c4ebb115119796756ccac89197e111eb27c4a91f52875da04eff4ca6f9e3fffefc18cc0219a8c3a3c81a667bf7509909a6d1d9ff1ee2cc0d957453cceffa |
29 |
|
30 |
diff --git a/dev-python/pyside2/metadata.xml b/dev-python/pyside2/metadata.xml |
31 |
new file mode 100644 |
32 |
index 00000000000..5d371988e7a |
33 |
--- /dev/null |
34 |
+++ b/dev-python/pyside2/metadata.xml |
35 |
@@ -0,0 +1,40 @@ |
36 |
+<?xml version="1.0" encoding="UTF-8"?> |
37 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
38 |
+<pkgmetadata> |
39 |
+ <maintainer type="person"> |
40 |
+ <email>zerochaos@g.o</email> |
41 |
+ <name>Rick Farina</name> |
42 |
+ </maintainer> |
43 |
+ <use> |
44 |
+ <flag name="3d">Build Qt3DCore, Qt3DAnimation, Qt3DExtras, Qt3DInput, Qt3DLogic, and Qt3DRender modules</flag> |
45 |
+ <flag name="charts">Build QtCharts module</flag> |
46 |
+ <flag name="concurrent">Build QtConcurrent module</flag> |
47 |
+ <flag name="datavis">Build QtDataVisualization module</flag> |
48 |
+ <flag name="designer">Build QtDesigner and QtUiTools modules</flag> |
49 |
+ <flag name="gles2-only">Build QtGui "QOpenGL*" classes</flag> |
50 |
+ <flag name="gui">Build QtGui module</flag> |
51 |
+ <flag name="help">Build QtHelp module</flag> |
52 |
+ <flag name="location">Build QtLocation module</flag> |
53 |
+ <flag name="multimedia">Build QtMultimedia and QtMultimediaWidgets modules</flag> |
54 |
+ <flag name="network">Build QtNetwork module</flag> |
55 |
+ <flag name="positioning">Build QtPositioning module</flag> |
56 |
+ <flag name="printsupport">Build QtPrintSupport module</flag> |
57 |
+ <flag name="qml">Build QtQml module</flag> |
58 |
+ <flag name="quick">Build QtQuick and QtQuickWidgets modules</flag> |
59 |
+ <flag name="script">Build QtScript module</flag> |
60 |
+ <flag name="scripttools">Build QtScriptTools module</flag> |
61 |
+ <flag name="scxml">Build QtScxml module</flag> |
62 |
+ <flag name="sensors">Build QtSensors module</flag> |
63 |
+ <flag name="speech">Build QtTextToSpeech module</flag> |
64 |
+ <flag name="sql">Build QtSql module</flag> |
65 |
+ <flag name="svg">Build QtSvg module</flag> |
66 |
+ <flag name="testlib">Build QtTest module</flag> |
67 |
+ <flag name="webchannel">Build QtWebChannel module</flag> |
68 |
+ <flag name="webengine">Build QtWebEngine and QtWebEngineWidgets modules</flag> |
69 |
+ <flag name="websockets">Build QtWebSockets module</flag> |
70 |
+ <flag name="widgets">Build QtWidgets module</flag> |
71 |
+ <flag name="x11extras">Build QtX11Extras module</flag> |
72 |
+ <flag name="xml">Build QtXml module</flag> |
73 |
+ <flag name="xmlpatterns">Build QtXmlPatterns module</flag> |
74 |
+ </use> |
75 |
+</pkgmetadata> |
76 |
|
77 |
diff --git a/dev-python/pyside2/pyside2-5.14.1-r2.ebuild b/dev-python/pyside2/pyside2-5.14.1-r2.ebuild |
78 |
new file mode 100644 |
79 |
index 00000000000..654c60a2465 |
80 |
--- /dev/null |
81 |
+++ b/dev-python/pyside2/pyside2-5.14.1-r2.ebuild |
82 |
@@ -0,0 +1,208 @@ |
83 |
+# Copyright 1999-2020 Gentoo Authors |
84 |
+# Distributed under the terms of the GNU General Public License v2 |
85 |
+ |
86 |
+EAPI=7 |
87 |
+ |
88 |
+# TODO: Add PyPy once officially supported. See also: |
89 |
+# https://bugreports.qt.io/browse/PYSIDE-535 |
90 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
91 |
+ |
92 |
+inherit cmake-utils python-r1 virtualx |
93 |
+ |
94 |
+# TODO: Add conditional support for "QtRemoteObjects" via a new "remoteobjects" |
95 |
+# USE flag after an external "dev-qt/qtremoteobjects" package has been created. |
96 |
+# TODO: Add conditional support for apidoc generation via a new "doc" USE flag. |
97 |
+# Note that doing so requires the Qt source tree, sphinx, and graphviz. Once |
98 |
+# ready, pass the ${QT_SRC_DIR} variable to cmake to enable this support. |
99 |
+# TODO: Disable GLES support if the "gles2-only" USE flag is disabled. Note |
100 |
+# that the "PySide2/QtGui/CMakeLists.txt" and |
101 |
+# "PySide2/QtOpenGLFunctions/CMakeLists.txt" files test for GLES support by |
102 |
+# testing whether the "Qt5::Gui" list property defined by |
103 |
+# "/usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake" at "dev-qt/qtgui" installation |
104 |
+# time contains the substring "opengles2". Since cmake does not permit |
105 |
+# properties to be overridden from the command line, these files must instead |
106 |
+# be conditionally patched to avoid these tests. An issue should be filed with |
107 |
+# upstream requesting a CLI-settable variable to control this. |
108 |
+ |
109 |
+MY_P=pyside-setup-opensource-src-${PV} |
110 |
+ |
111 |
+DESCRIPTION="Python bindings for the Qt framework" |
112 |
+HOMEPAGE="https://wiki.qt.io/PySide2" |
113 |
+SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz" |
114 |
+ |
115 |
+# See "sources/pyside2/PySide2/licensecomment.txt" for licensing details. |
116 |
+LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 )" |
117 |
+SLOT="0" |
118 |
+KEYWORDS="~amd64" |
119 |
+IUSE=" |
120 |
+ 3d charts concurrent datavis designer gles2-only gui help location |
121 |
+ multimedia network positioning printsupport qml quick script scripttools |
122 |
+ scxml sensors speech sql svg test testlib webchannel webengine websockets |
123 |
+ widgets x11extras xml xmlpatterns |
124 |
+" |
125 |
+ |
126 |
+# Manually reextract these requirements on version bumps by running the |
127 |
+# following one-liner from within "${S}": |
128 |
+# $ grep 'set\(.*_deps' PySide2/Qt*/CMakeLists.txt |
129 |
+# Note that the "designer" USE flag corresponds to the "Qt5UiTools" module. |
130 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
131 |
+ 3d? ( gui network ) |
132 |
+ charts? ( widgets ) |
133 |
+ datavis? ( gui ) |
134 |
+ designer? ( widgets xml ) |
135 |
+ gles2-only? ( gui ) |
136 |
+ help? ( widgets ) |
137 |
+ location? ( positioning ) |
138 |
+ multimedia? ( gui network ) |
139 |
+ printsupport? ( widgets ) |
140 |
+ qml? ( gui network ) |
141 |
+ quick? ( qml ) |
142 |
+ scripttools? ( gui script widgets ) |
143 |
+ speech? ( multimedia ) |
144 |
+ sql? ( widgets ) |
145 |
+ svg? ( widgets ) |
146 |
+ testlib? ( widgets ) |
147 |
+ webengine? ( |
148 |
+ location quick |
149 |
+ widgets? ( gui network printsupport webchannel ) |
150 |
+ ) |
151 |
+ websockets? ( network ) |
152 |
+ widgets? ( gui ) |
153 |
+ x11extras? ( gui ) |
154 |
+" |
155 |
+ |
156 |
+#tests fail pretty bad and I'm not fixing them right now |
157 |
+RESTRICT="test" |
158 |
+ |
159 |
+# Minimal supported version of Qt. |
160 |
+QT_PV="$(ver_cut 1-2):5" |
161 |
+ |
162 |
+RDEPEND="${PYTHON_DEPS} |
163 |
+ >=dev-python/shiboken2-${PV}[${PYTHON_USEDEP}] |
164 |
+ 3d? ( >=dev-qt/qt3d-${QT_PV}[qml?] ) |
165 |
+ charts? ( >=dev-qt/qtcharts-${QT_PV}[qml?] ) |
166 |
+ concurrent? ( >=dev-qt/qtconcurrent-${QT_PV} ) |
167 |
+ datavis? ( >=dev-qt/qtdatavis3d-${QT_PV}[qml?] ) |
168 |
+ designer? ( >=dev-qt/designer-${QT_PV} ) |
169 |
+ gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only?] ) |
170 |
+ help? ( >=dev-qt/qthelp-${QT_PV} ) |
171 |
+ location? ( >=dev-qt/qtlocation-${QT_PV} ) |
172 |
+ multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[qml?,widgets?] ) |
173 |
+ network? ( >=dev-qt/qtnetwork-${QT_PV} ) |
174 |
+ positioning? ( >=dev-qt/qtpositioning-${QT_PV}[qml?] ) |
175 |
+ printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} ) |
176 |
+ qml? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] ) |
177 |
+ script? ( >=dev-qt/qtscript-${QT_PV} ) |
178 |
+ scxml? ( >=dev-qt/qtscxml-${QT_PV} ) |
179 |
+ sensors? ( >=dev-qt/qtsensors-${QT_PV}[qml?] ) |
180 |
+ speech? ( >=dev-qt/qtspeech-${QT_PV} ) |
181 |
+ sql? ( >=dev-qt/qtsql-${QT_PV} ) |
182 |
+ svg? ( >=dev-qt/qtsvg-${QT_PV} ) |
183 |
+ testlib? ( >=dev-qt/qttest-${QT_PV} ) |
184 |
+ webchannel? ( >=dev-qt/qtwebchannel-${QT_PV}[qml?] ) |
185 |
+ webengine? ( >=dev-qt/qtwebengine-${QT_PV}[widgets?] ) |
186 |
+ websockets? ( >=dev-qt/qtwebsockets-${QT_PV}[qml?] ) |
187 |
+ widgets? ( >=dev-qt/qtwidgets-${QT_PV} ) |
188 |
+ x11extras? ( >=dev-qt/qtx11extras-${QT_PV} ) |
189 |
+ xml? ( >=dev-qt/qtxml-${QT_PV} ) |
190 |
+ xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV}[qml?] ) |
191 |
+" |
192 |
+DEPEND="${RDEPEND} |
193 |
+ test? ( x11-misc/xvfb-run ) |
194 |
+" |
195 |
+ |
196 |
+S=${WORKDIR}/${MY_P}/sources/pyside2 |
197 |
+ |
198 |
+src_configure() { |
199 |
+ # See COLLECT_MODULE_IF_FOUND macros in CMakeLists.txt |
200 |
+ local mycmakeargs=( |
201 |
+ -DBUILD_TESTS=$(usex test) |
202 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DAnimation=$(usex !3d) |
203 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DCore=$(usex !3d) |
204 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DExtras=$(usex !3d) |
205 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DInput=$(usex !3d) |
206 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DLogic=$(usex !3d) |
207 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DRender=$(usex !3d) |
208 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Charts=$(usex !charts) |
209 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent) |
210 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DataVisualization=$(usex !datavis) |
211 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer) |
212 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui) |
213 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help) |
214 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Location=$(usex !location) |
215 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=$(usex !multimedia) |
216 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5MultimediaWidgets=$(usex !multimedia yes $(usex !widgets)) |
217 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Network=$(usex !network) |
218 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Positioning=$(usex !positioning) |
219 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5PrintSupport=$(usex !printsupport) |
220 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Qml=$(usex !qml) |
221 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Quick=$(usex !quick) |
222 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickWidgets=$(usex !quick yes $(usex !widgets)) |
223 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Script=$(usex !script) |
224 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5ScriptTools=$(usex !scripttools) |
225 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Scxml=$(usex !scxml) |
226 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sensors=$(usex !sensors) |
227 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5TextToSpeech=$(usex !speech) |
228 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sql=$(usex !sql) |
229 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Svg=$(usex !svg) |
230 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib) |
231 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer) |
232 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebChannel=$(usex !webchannel) |
233 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngine=$(usex !webengine) |
234 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineCore=$(usex !webengine) |
235 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets=$(usex !webengine yes $(usex !widgets)) |
236 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebSockets=$(usex !websockets) |
237 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=$(usex !widgets) |
238 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras=$(usex !x11extras) |
239 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Xml=$(usex !xml) |
240 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5XmlPatterns=$(usex !xmlpatterns) |
241 |
+ ) |
242 |
+ |
243 |
+ pyside2_configure() { |
244 |
+ local mycmakeargs=( |
245 |
+ "${mycmakeargs[@]}" |
246 |
+ -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
247 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
248 |
+ -DPYTHON_SITE_PACKAGES="$(python_get_sitedir)" |
249 |
+ -DSHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX="-${EPYTHON}" |
250 |
+ ) |
251 |
+ cmake-utils_src_configure |
252 |
+ } |
253 |
+ python_foreach_impl pyside2_configure |
254 |
+} |
255 |
+ |
256 |
+src_compile() { |
257 |
+ python_foreach_impl cmake-utils_src_compile |
258 |
+} |
259 |
+ |
260 |
+src_test() { |
261 |
+ local -x PYTHONDONTWRITEBYTECODE |
262 |
+ python_foreach_impl virtx cmake-utils_src_test |
263 |
+} |
264 |
+ |
265 |
+src_install() { |
266 |
+ pyside2_install() { |
267 |
+ cmake-utils_src_install |
268 |
+ python_optimize |
269 |
+ |
270 |
+ # Uniquify the shiboken2 pkgconfig dependency in the PySide2 pkgconfig |
271 |
+ # file for the current Python target. See also: |
272 |
+ # https://github.com/leycec/raiagent/issues/73 |
273 |
+ sed -i -e 's~^Requires: shiboken2$~&-'${EPYTHON}'~' \ |
274 |
+ "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}.pc || die |
275 |
+ |
276 |
+ # Uniquify the PySide2 pkgconfig file for the current Python target, |
277 |
+ # preserving an unversioned "pyside2.pc" file arbitrarily associated |
278 |
+ # with the last Python target. (See the previously linked issue.) |
279 |
+ cp "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}{,-${EPYTHON}}.pc || die |
280 |
+ } |
281 |
+ python_foreach_impl pyside2_install |
282 |
+ |
283 |
+ # CMakeLists.txt installs a "PySide2Targets-gentoo.cmake" file forcing |
284 |
+ # downstream consumers (e.g., pyside2-tools) to target one |
285 |
+ # "libpyside2-*.so" library linked to one Python interpreter. See also: |
286 |
+ # https://bugreports.qt.io/browse/PYSIDE-1053 |
287 |
+ # https://github.com/leycec/raiagent/issues/74 |
288 |
+ sed -i -e 's~pyside2-python[[:digit:]]\+\.[[:digit:]]\+~pyside2${PYTHON_CONFIG_SUFFIX}~g' \ |
289 |
+ "${ED}/usr/$(get_libdir)/cmake/PySide2-${PV}/PySide2Targets-gentoo.cmake" || die |
290 |
+} |
291 |
|
292 |
diff --git a/dev-python/pyside2/pyside2-5.14.2.ebuild b/dev-python/pyside2/pyside2-5.14.2.ebuild |
293 |
new file mode 100644 |
294 |
index 00000000000..654c60a2465 |
295 |
--- /dev/null |
296 |
+++ b/dev-python/pyside2/pyside2-5.14.2.ebuild |
297 |
@@ -0,0 +1,208 @@ |
298 |
+# Copyright 1999-2020 Gentoo Authors |
299 |
+# Distributed under the terms of the GNU General Public License v2 |
300 |
+ |
301 |
+EAPI=7 |
302 |
+ |
303 |
+# TODO: Add PyPy once officially supported. See also: |
304 |
+# https://bugreports.qt.io/browse/PYSIDE-535 |
305 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
306 |
+ |
307 |
+inherit cmake-utils python-r1 virtualx |
308 |
+ |
309 |
+# TODO: Add conditional support for "QtRemoteObjects" via a new "remoteobjects" |
310 |
+# USE flag after an external "dev-qt/qtremoteobjects" package has been created. |
311 |
+# TODO: Add conditional support for apidoc generation via a new "doc" USE flag. |
312 |
+# Note that doing so requires the Qt source tree, sphinx, and graphviz. Once |
313 |
+# ready, pass the ${QT_SRC_DIR} variable to cmake to enable this support. |
314 |
+# TODO: Disable GLES support if the "gles2-only" USE flag is disabled. Note |
315 |
+# that the "PySide2/QtGui/CMakeLists.txt" and |
316 |
+# "PySide2/QtOpenGLFunctions/CMakeLists.txt" files test for GLES support by |
317 |
+# testing whether the "Qt5::Gui" list property defined by |
318 |
+# "/usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake" at "dev-qt/qtgui" installation |
319 |
+# time contains the substring "opengles2". Since cmake does not permit |
320 |
+# properties to be overridden from the command line, these files must instead |
321 |
+# be conditionally patched to avoid these tests. An issue should be filed with |
322 |
+# upstream requesting a CLI-settable variable to control this. |
323 |
+ |
324 |
+MY_P=pyside-setup-opensource-src-${PV} |
325 |
+ |
326 |
+DESCRIPTION="Python bindings for the Qt framework" |
327 |
+HOMEPAGE="https://wiki.qt.io/PySide2" |
328 |
+SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz" |
329 |
+ |
330 |
+# See "sources/pyside2/PySide2/licensecomment.txt" for licensing details. |
331 |
+LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 )" |
332 |
+SLOT="0" |
333 |
+KEYWORDS="~amd64" |
334 |
+IUSE=" |
335 |
+ 3d charts concurrent datavis designer gles2-only gui help location |
336 |
+ multimedia network positioning printsupport qml quick script scripttools |
337 |
+ scxml sensors speech sql svg test testlib webchannel webengine websockets |
338 |
+ widgets x11extras xml xmlpatterns |
339 |
+" |
340 |
+ |
341 |
+# Manually reextract these requirements on version bumps by running the |
342 |
+# following one-liner from within "${S}": |
343 |
+# $ grep 'set\(.*_deps' PySide2/Qt*/CMakeLists.txt |
344 |
+# Note that the "designer" USE flag corresponds to the "Qt5UiTools" module. |
345 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
346 |
+ 3d? ( gui network ) |
347 |
+ charts? ( widgets ) |
348 |
+ datavis? ( gui ) |
349 |
+ designer? ( widgets xml ) |
350 |
+ gles2-only? ( gui ) |
351 |
+ help? ( widgets ) |
352 |
+ location? ( positioning ) |
353 |
+ multimedia? ( gui network ) |
354 |
+ printsupport? ( widgets ) |
355 |
+ qml? ( gui network ) |
356 |
+ quick? ( qml ) |
357 |
+ scripttools? ( gui script widgets ) |
358 |
+ speech? ( multimedia ) |
359 |
+ sql? ( widgets ) |
360 |
+ svg? ( widgets ) |
361 |
+ testlib? ( widgets ) |
362 |
+ webengine? ( |
363 |
+ location quick |
364 |
+ widgets? ( gui network printsupport webchannel ) |
365 |
+ ) |
366 |
+ websockets? ( network ) |
367 |
+ widgets? ( gui ) |
368 |
+ x11extras? ( gui ) |
369 |
+" |
370 |
+ |
371 |
+#tests fail pretty bad and I'm not fixing them right now |
372 |
+RESTRICT="test" |
373 |
+ |
374 |
+# Minimal supported version of Qt. |
375 |
+QT_PV="$(ver_cut 1-2):5" |
376 |
+ |
377 |
+RDEPEND="${PYTHON_DEPS} |
378 |
+ >=dev-python/shiboken2-${PV}[${PYTHON_USEDEP}] |
379 |
+ 3d? ( >=dev-qt/qt3d-${QT_PV}[qml?] ) |
380 |
+ charts? ( >=dev-qt/qtcharts-${QT_PV}[qml?] ) |
381 |
+ concurrent? ( >=dev-qt/qtconcurrent-${QT_PV} ) |
382 |
+ datavis? ( >=dev-qt/qtdatavis3d-${QT_PV}[qml?] ) |
383 |
+ designer? ( >=dev-qt/designer-${QT_PV} ) |
384 |
+ gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only?] ) |
385 |
+ help? ( >=dev-qt/qthelp-${QT_PV} ) |
386 |
+ location? ( >=dev-qt/qtlocation-${QT_PV} ) |
387 |
+ multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[qml?,widgets?] ) |
388 |
+ network? ( >=dev-qt/qtnetwork-${QT_PV} ) |
389 |
+ positioning? ( >=dev-qt/qtpositioning-${QT_PV}[qml?] ) |
390 |
+ printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} ) |
391 |
+ qml? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] ) |
392 |
+ script? ( >=dev-qt/qtscript-${QT_PV} ) |
393 |
+ scxml? ( >=dev-qt/qtscxml-${QT_PV} ) |
394 |
+ sensors? ( >=dev-qt/qtsensors-${QT_PV}[qml?] ) |
395 |
+ speech? ( >=dev-qt/qtspeech-${QT_PV} ) |
396 |
+ sql? ( >=dev-qt/qtsql-${QT_PV} ) |
397 |
+ svg? ( >=dev-qt/qtsvg-${QT_PV} ) |
398 |
+ testlib? ( >=dev-qt/qttest-${QT_PV} ) |
399 |
+ webchannel? ( >=dev-qt/qtwebchannel-${QT_PV}[qml?] ) |
400 |
+ webengine? ( >=dev-qt/qtwebengine-${QT_PV}[widgets?] ) |
401 |
+ websockets? ( >=dev-qt/qtwebsockets-${QT_PV}[qml?] ) |
402 |
+ widgets? ( >=dev-qt/qtwidgets-${QT_PV} ) |
403 |
+ x11extras? ( >=dev-qt/qtx11extras-${QT_PV} ) |
404 |
+ xml? ( >=dev-qt/qtxml-${QT_PV} ) |
405 |
+ xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV}[qml?] ) |
406 |
+" |
407 |
+DEPEND="${RDEPEND} |
408 |
+ test? ( x11-misc/xvfb-run ) |
409 |
+" |
410 |
+ |
411 |
+S=${WORKDIR}/${MY_P}/sources/pyside2 |
412 |
+ |
413 |
+src_configure() { |
414 |
+ # See COLLECT_MODULE_IF_FOUND macros in CMakeLists.txt |
415 |
+ local mycmakeargs=( |
416 |
+ -DBUILD_TESTS=$(usex test) |
417 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DAnimation=$(usex !3d) |
418 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DCore=$(usex !3d) |
419 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DExtras=$(usex !3d) |
420 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DInput=$(usex !3d) |
421 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DLogic=$(usex !3d) |
422 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DRender=$(usex !3d) |
423 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Charts=$(usex !charts) |
424 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent) |
425 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DataVisualization=$(usex !datavis) |
426 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer) |
427 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui) |
428 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help) |
429 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Location=$(usex !location) |
430 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=$(usex !multimedia) |
431 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5MultimediaWidgets=$(usex !multimedia yes $(usex !widgets)) |
432 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Network=$(usex !network) |
433 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Positioning=$(usex !positioning) |
434 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5PrintSupport=$(usex !printsupport) |
435 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Qml=$(usex !qml) |
436 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Quick=$(usex !quick) |
437 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickWidgets=$(usex !quick yes $(usex !widgets)) |
438 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Script=$(usex !script) |
439 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5ScriptTools=$(usex !scripttools) |
440 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Scxml=$(usex !scxml) |
441 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sensors=$(usex !sensors) |
442 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5TextToSpeech=$(usex !speech) |
443 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sql=$(usex !sql) |
444 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Svg=$(usex !svg) |
445 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib) |
446 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer) |
447 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebChannel=$(usex !webchannel) |
448 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngine=$(usex !webengine) |
449 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineCore=$(usex !webengine) |
450 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets=$(usex !webengine yes $(usex !widgets)) |
451 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebSockets=$(usex !websockets) |
452 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=$(usex !widgets) |
453 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras=$(usex !x11extras) |
454 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Xml=$(usex !xml) |
455 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5XmlPatterns=$(usex !xmlpatterns) |
456 |
+ ) |
457 |
+ |
458 |
+ pyside2_configure() { |
459 |
+ local mycmakeargs=( |
460 |
+ "${mycmakeargs[@]}" |
461 |
+ -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
462 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
463 |
+ -DPYTHON_SITE_PACKAGES="$(python_get_sitedir)" |
464 |
+ -DSHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX="-${EPYTHON}" |
465 |
+ ) |
466 |
+ cmake-utils_src_configure |
467 |
+ } |
468 |
+ python_foreach_impl pyside2_configure |
469 |
+} |
470 |
+ |
471 |
+src_compile() { |
472 |
+ python_foreach_impl cmake-utils_src_compile |
473 |
+} |
474 |
+ |
475 |
+src_test() { |
476 |
+ local -x PYTHONDONTWRITEBYTECODE |
477 |
+ python_foreach_impl virtx cmake-utils_src_test |
478 |
+} |
479 |
+ |
480 |
+src_install() { |
481 |
+ pyside2_install() { |
482 |
+ cmake-utils_src_install |
483 |
+ python_optimize |
484 |
+ |
485 |
+ # Uniquify the shiboken2 pkgconfig dependency in the PySide2 pkgconfig |
486 |
+ # file for the current Python target. See also: |
487 |
+ # https://github.com/leycec/raiagent/issues/73 |
488 |
+ sed -i -e 's~^Requires: shiboken2$~&-'${EPYTHON}'~' \ |
489 |
+ "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}.pc || die |
490 |
+ |
491 |
+ # Uniquify the PySide2 pkgconfig file for the current Python target, |
492 |
+ # preserving an unversioned "pyside2.pc" file arbitrarily associated |
493 |
+ # with the last Python target. (See the previously linked issue.) |
494 |
+ cp "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}{,-${EPYTHON}}.pc || die |
495 |
+ } |
496 |
+ python_foreach_impl pyside2_install |
497 |
+ |
498 |
+ # CMakeLists.txt installs a "PySide2Targets-gentoo.cmake" file forcing |
499 |
+ # downstream consumers (e.g., pyside2-tools) to target one |
500 |
+ # "libpyside2-*.so" library linked to one Python interpreter. See also: |
501 |
+ # https://bugreports.qt.io/browse/PYSIDE-1053 |
502 |
+ # https://github.com/leycec/raiagent/issues/74 |
503 |
+ sed -i -e 's~pyside2-python[[:digit:]]\+\.[[:digit:]]\+~pyside2${PYTHON_CONFIG_SUFFIX}~g' \ |
504 |
+ "${ED}/usr/$(get_libdir)/cmake/PySide2-${PV}/PySide2Targets-gentoo.cmake" || die |
505 |
+} |