1 |
commit: 0ed8c0ad28919c4b58ed59fa932545ad599b5908 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 7 10:57:25 2022 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 7 11:05:35 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ed8c0ad |
7 |
|
8 |
dev-python/pyside2: add 5.15.7 |
9 |
|
10 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
11 |
|
12 |
dev-python/pyside2/Manifest | 1 + |
13 |
dev-python/pyside2/pyside2-5.15.7.ebuild | 226 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 227 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/pyside2/Manifest b/dev-python/pyside2/Manifest |
17 |
index a69f8b0496e6..91dcf6569b36 100644 |
18 |
--- a/dev-python/pyside2/Manifest |
19 |
+++ b/dev-python/pyside2/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST pyside-setup-opensource-src-5.15.5.tar.xz 3577972 BLAKE2B ee16ce18ec4103add41ad89b658012cb2e8695bda51269d3cd1614c2b6d029c0eaba5e592d5e58b6267e1ddc020a938d3ccd2fbc9461cc5bf202f3bdbf6b5d62 SHA512 61b987ec823e9a89f2a07a1991d47f36eb45e3ce416aa6e0032a58ba3d623ac26224cb0f43a2db76850bce7290d12fae610de06405350362caac7860ba99f0c3 |
22 |
DIST pyside-setup-opensource-src-5.15.6.tar.xz 3580388 BLAKE2B 8a3b15d073bcbb0c6734f500ca906e56387cb8fc4bfcfd996304d71b54edd5f4568976049519ed26aa718bee9e43f59a0c4ef53837d5a341219b991a8527a800 SHA512 99a0c1a05e722cbf33128cf25742e61b92e151fdc05b79db9bafe778e024a0c6fc2886ee3d0b923ff681c55916f5c0eea4197f174432587fd662fba4390b26f4 |
23 |
+DIST pyside-setup-opensource-src-5.15.7.tar.xz 3581144 BLAKE2B 95b5720a5273c96b00bdf86b36734970991a29cf0db1e6fb2c00d7e671fbc4459b4434abc91a8a47ec5d8ba694bcdae5b57a52448908fdca25c348f9ee2b6c81 SHA512 9c551b47581e4f2671c4378f1a2c0d9e565b08edee74244a7704a2c94eef1e1041d23f0e388c07bdd61067e986340907cf80f4527257a9a706f7f07c497834c6 |
24 |
|
25 |
diff --git a/dev-python/pyside2/pyside2-5.15.7.ebuild b/dev-python/pyside2/pyside2-5.15.7.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..be8606704d6e |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pyside2/pyside2-5.15.7.ebuild |
30 |
@@ -0,0 +1,226 @@ |
31 |
+# Copyright 1999-2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+# TODO: Add PyPy once officially supported. See also: |
37 |
+# https://bugreports.qt.io/browse/PYSIDE-535 |
38 |
+PYTHON_COMPAT=( python3_{8..11} ) |
39 |
+ |
40 |
+inherit cmake python-r1 virtualx |
41 |
+ |
42 |
+# TODO: Add conditional support for "QtRemoteObjects" via a new "remoteobjects" |
43 |
+# USE flag after an external "dev-qt/qtremoteobjects" package has been created. |
44 |
+# TODO: Add conditional support for apidoc generation via a new "doc" USE flag. |
45 |
+# Note that doing so requires the Qt source tree, sphinx, and graphviz. Once |
46 |
+# ready, pass the ${QT_SRC_DIR} variable to cmake to enable this support. |
47 |
+# TODO: Disable GLES support if the "gles2-only" USE flag is disabled. Note |
48 |
+# that the "PySide2/QtGui/CMakeLists.txt" and |
49 |
+# "PySide2/QtOpenGLFunctions/CMakeLists.txt" files test for GLES support by |
50 |
+# testing whether the "Qt5::Gui" list property defined by |
51 |
+# "/usr/lib64/cmake/Qt5Gui/Qt5GuiConfig.cmake" at "dev-qt/qtgui" installation |
52 |
+# time contains the substring "opengles2". Since cmake does not permit |
53 |
+# properties to be overridden from the command line, these files must instead |
54 |
+# be conditionally patched to avoid these tests. An issue should be filed with |
55 |
+# upstream requesting a CLI-settable variable to control this. |
56 |
+ |
57 |
+MY_P=pyside-setup-opensource-src-${PV} |
58 |
+ |
59 |
+DESCRIPTION="Python bindings for the Qt framework" |
60 |
+HOMEPAGE="https://wiki.qt.io/PySide2" |
61 |
+SRC_URI="https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${PV}-src/${MY_P}.tar.xz" |
62 |
+S="${WORKDIR}/${MY_P}/sources/pyside2" |
63 |
+ |
64 |
+# See "sources/pyside2/PySide2/licensecomment.txt" for licensing details. |
65 |
+# Shall we allow essential modules to be disabled? They are: |
66 |
+# (core), gui, widgets, printsupport, sql, network, testlib, concurrent, |
67 |
+# x11extras (for X) |
68 |
+LICENSE="|| ( GPL-2 GPL-3+ LGPL-3 )" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
71 |
+IUSE=" |
72 |
+ 3d charts +concurrent datavis designer gles2-only +gui help location |
73 |
+ multimedia +network positioning +printsupport qml quick script scripttools |
74 |
+ scxml sensors speech +sql svg test +testlib webchannel webengine websockets |
75 |
+ +widgets +x11extras xml xmlpatterns |
76 |
+" |
77 |
+ |
78 |
+# Manually reextract these requirements on version bumps by running the |
79 |
+# following one-liners from within "${S}": |
80 |
+# $ grep 'set.*_deps' PySide2/Qt*/CMakeLists.txt |
81 |
+# $ cat /lib64/cmake/Qt5*/Qt5*.cmake | grep -i DEPENDENCIES |
82 |
+# Note that the "designer" USE flag corresponds to the "Qt5UiTools" module. |
83 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
84 |
+ 3d? ( gui network ) |
85 |
+ charts? ( gui widgets ) |
86 |
+ datavis? ( gui ) |
87 |
+ designer? ( gui widgets xml ) |
88 |
+ gles2-only? ( gui ) |
89 |
+ help? ( gui sql widgets ) |
90 |
+ location? ( gui network positioning quick ) |
91 |
+ multimedia? ( gui network widgets ) |
92 |
+ printsupport? ( gui widgets ) |
93 |
+ qml? ( gui network ) |
94 |
+ quick? ( gui network qml widgets network ) |
95 |
+ scripttools? ( gui script widgets ) |
96 |
+ speech? ( multimedia ) |
97 |
+ sql? ( widgets ) |
98 |
+ svg? ( widgets ) |
99 |
+ testlib? ( widgets ) |
100 |
+ webchannel? ( qml ) |
101 |
+ webengine? ( |
102 |
+ gui network positioning quick qml |
103 |
+ widgets? ( printsupport network webchannel ) |
104 |
+ ) |
105 |
+ websockets? ( network ) |
106 |
+ widgets? ( gui ) |
107 |
+ x11extras? ( gui ) |
108 |
+" |
109 |
+ |
110 |
+# Tests fail pretty bad and I'm not fixing them right now |
111 |
+RESTRICT="test" |
112 |
+ |
113 |
+# Minimal supported version of Qt. |
114 |
+QT_PV="$(ver_cut 1-2)*:5" |
115 |
+ |
116 |
+RDEPEND="${PYTHON_DEPS} |
117 |
+ ~dev-python/shiboken2-${PV}[${PYTHON_USEDEP}] |
118 |
+ =dev-qt/qtcore-${QT_PV} |
119 |
+ =dev-qt/qtopengl-${QT_PV}[gles2-only=] |
120 |
+ =dev-qt/qtserialport-${QT_PV} |
121 |
+ 3d? ( =dev-qt/qt3d-${QT_PV}[qml?,gles2-only=] ) |
122 |
+ charts? ( =dev-qt/qtcharts-${QT_PV}[qml?] ) |
123 |
+ concurrent? ( =dev-qt/qtconcurrent-${QT_PV} ) |
124 |
+ datavis? ( =dev-qt/qtdatavis3d-${QT_PV}[qml?,gles2-only=] ) |
125 |
+ designer? ( =dev-qt/designer-${QT_PV} ) |
126 |
+ gui? ( =dev-qt/qtgui-${QT_PV}[jpeg,gles2-only=] ) |
127 |
+ help? ( =dev-qt/qthelp-${QT_PV} ) |
128 |
+ location? ( =dev-qt/qtlocation-${QT_PV} ) |
129 |
+ multimedia? ( =dev-qt/qtmultimedia-${QT_PV}[qml?,gles2-only=,widgets?] ) |
130 |
+ network? ( =dev-qt/qtnetwork-${QT_PV} ) |
131 |
+ positioning? ( =dev-qt/qtpositioning-${QT_PV}[qml?] ) |
132 |
+ printsupport? ( =dev-qt/qtprintsupport-${QT_PV}[gles2-only=] ) |
133 |
+ qml? ( =dev-qt/qtdeclarative-${QT_PV}[widgets?] ) |
134 |
+ quick? ( |
135 |
+ =dev-qt/qtdeclarative-${QT_PV}[widgets?] |
136 |
+ =dev-qt/qtquickcontrols2-${QT_PV}[widgets?] |
137 |
+ ) |
138 |
+ script? ( =dev-qt/qtscript-${QT_PV}[scripttools?] ) |
139 |
+ scxml? ( =dev-qt/qtscxml-${QT_PV} ) |
140 |
+ sensors? ( =dev-qt/qtsensors-${QT_PV}[qml?] ) |
141 |
+ speech? ( =dev-qt/qtspeech-${QT_PV} ) |
142 |
+ sql? ( =dev-qt/qtsql-${QT_PV} ) |
143 |
+ svg? ( =dev-qt/qtsvg-${QT_PV} ) |
144 |
+ testlib? ( =dev-qt/qttest-${QT_PV} ) |
145 |
+ webchannel? ( =dev-qt/qtwebchannel-${QT_PV}[qml] ) |
146 |
+ webengine? ( =dev-qt/qtwebengine-${QT_PV}[widgets?] ) |
147 |
+ websockets? ( =dev-qt/qtwebsockets-${QT_PV}[qml?] ) |
148 |
+ widgets? ( =dev-qt/qtwidgets-${QT_PV}[gles2-only=] ) |
149 |
+ x11extras? ( =dev-qt/qtx11extras-${QT_PV} ) |
150 |
+ xml? ( =dev-qt/qtxml-${QT_PV} ) |
151 |
+ xmlpatterns? ( =dev-qt/qtxmlpatterns-${QT_PV}[qml?] ) |
152 |
+" |
153 |
+DEPEND="${RDEPEND} |
154 |
+ test? ( x11-misc/xvfb-run ) |
155 |
+" |
156 |
+ |
157 |
+PATCHES=( |
158 |
+ "${FILESDIR}/${PN}-5.15.2-python310.patch" |
159 |
+ "${FILESDIR}/${PN}-5.15.2-python311.patch" |
160 |
+ "${FILESDIR}/${PN}-5.15.2-python311-fixups.patch" |
161 |
+) |
162 |
+ |
163 |
+src_configure() { |
164 |
+ # See COLLECT_MODULE_IF_FOUND macros in CMakeLists.txt |
165 |
+ local mycmakeargs=( |
166 |
+ -DBUILD_TESTS=$(usex test) |
167 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DAnimation=$(usex !3d) |
168 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DCore=$(usex !3d) |
169 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DExtras=$(usex !3d) |
170 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DInput=$(usex !3d) |
171 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DLogic=$(usex !3d) |
172 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt53DRender=$(usex !3d) |
173 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Charts=$(usex !charts) |
174 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent) |
175 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5DataVisualization=$(usex !datavis) |
176 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer) |
177 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui) |
178 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help) |
179 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Location=$(usex !location) |
180 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=$(usex !multimedia) |
181 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5MultimediaWidgets=$(usex !multimedia yes $(usex !widgets)) |
182 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Network=$(usex !network) |
183 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Positioning=$(usex !positioning) |
184 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5PrintSupport=$(usex !printsupport) |
185 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Qml=$(usex !qml) |
186 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Quick=$(usex !quick) |
187 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickControls2=$(usex !quick) |
188 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickWidgets=$(usex !quick yes $(usex !widgets)) |
189 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Script=$(usex !script) |
190 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5ScriptTools=$(usex !scripttools) |
191 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Scxml=$(usex !scxml) |
192 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sensors=$(usex !sensors) |
193 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5TextToSpeech=$(usex !speech) |
194 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sql=$(usex !sql) |
195 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Svg=$(usex !svg) |
196 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib) |
197 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer) |
198 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebChannel=$(usex !webchannel) |
199 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngine=$(usex !webengine) |
200 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineCore=$(usex !webengine) |
201 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets=$(usex !webengine yes $(usex !widgets)) |
202 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebSockets=$(usex !websockets) |
203 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=$(usex !widgets) |
204 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras=$(usex !x11extras) |
205 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Xml=$(usex !xml) |
206 |
+ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5XmlPatterns=$(usex !xmlpatterns) |
207 |
+ ) |
208 |
+ |
209 |
+ pyside2_configure() { |
210 |
+ local mycmakeargs=( |
211 |
+ "${mycmakeargs[@]}" |
212 |
+ -DPYTHON_CONFIG_SUFFIX="-${EPYTHON}" |
213 |
+ -DPYTHON_EXECUTABLE="${PYTHON}" |
214 |
+ -DPYTHON_SITE_PACKAGES="$(python_get_sitedir)" |
215 |
+ -DSHIBOKEN_PYTHON_SHARED_LIBRARY_SUFFIX="-${EPYTHON}" |
216 |
+ ) |
217 |
+ cmake_src_configure |
218 |
+ } |
219 |
+ python_foreach_impl pyside2_configure |
220 |
+} |
221 |
+ |
222 |
+src_compile() { |
223 |
+ python_foreach_impl cmake_src_compile |
224 |
+} |
225 |
+ |
226 |
+src_test() { |
227 |
+ local -x PYTHONDONTWRITEBYTECODE |
228 |
+ python_foreach_impl virtx cmake_src_test |
229 |
+} |
230 |
+ |
231 |
+src_install() { |
232 |
+ pyside2_install() { |
233 |
+ cmake_src_install |
234 |
+ python_optimize |
235 |
+ |
236 |
+ # Uniquify the shiboken2 pkgconfig dependency in the PySide2 pkgconfig |
237 |
+ # file for the current Python target. See also: |
238 |
+ # https://github.com/leycec/raiagent/issues/73 |
239 |
+ sed -i -e 's~^Requires: shiboken2$~&-'${EPYTHON}'~' \ |
240 |
+ "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}.pc || die |
241 |
+ |
242 |
+ # Uniquify the PySide2 pkgconfig file for the current Python target, |
243 |
+ # preserving an unversioned "pyside2.pc" file arbitrarily associated |
244 |
+ # with the last Python target. (See the previously linked issue.) |
245 |
+ cp "${ED}/usr/$(get_libdir)"/pkgconfig/${PN}{,-${EPYTHON}}.pc || die |
246 |
+ } |
247 |
+ python_foreach_impl pyside2_install |
248 |
+ |
249 |
+ # CMakeLists.txt installs a "PySide2Targets-gentoo.cmake" file forcing |
250 |
+ # downstream consumers (e.g., pyside2-tools) to target one |
251 |
+ # "libpyside2-*.so" library linked to one Python interpreter. See also: |
252 |
+ # https://bugreports.qt.io/browse/PYSIDE-1053 |
253 |
+ # https://github.com/leycec/raiagent/issues/74 |
254 |
+ sed -i -e 's~pyside2-python[[:digit:]]\+\.[[:digit:]]\+~pyside2${PYTHON_CONFIG_SUFFIX}~g' \ |
255 |
+ "${ED}/usr/$(get_libdir)/cmake/PySide2-${PV}/PySide2Targets-${CMAKE_BUILD_TYPE,,}.cmake" || die |
256 |
+} |