Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-python/pyside/, dev-python/shiboken/
Date: Sun, 30 Apr 2017 19:17:30
Message-Id: 1493579424.a03f2e5c1d461e828e3b36b0f94a036695d04374.pesa@gentoo
1 commit: a03f2e5c1d461e828e3b36b0f94a036695d04374
2 Author: leycec <leycec <AT> gmail <DOT> com>
3 AuthorDate: Mon Mar 13 06:22:46 2017 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 30 19:10:24 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=a03f2e5c
7
8 dev-python/pyside: Build PySide2 and shiboken2, 5.6 branch.
9
10 The live pyside and shiboken ebuilds now build PySide2 and shiboken2
11 respectively. For disambiguity, both are now slotted into slot 2. All
12 pyside USE flags are now handled as expected and support all available
13 optional dependencies. For upstream reasons, Qt =5.6* is required for now.
14 Python 3.6 is additionally supported.
15
16 Package-Manager: Portage-2.3.5, Repoman-2.3.2
17
18 dev-python/pyside/metadata.xml | 16 +++-
19 dev-python/pyside/pyside-9999.ebuild | 158 +++++++++++++++++++------------
20 dev-python/shiboken/shiboken-9999.ebuild | 39 +++++---
21 3 files changed, 136 insertions(+), 77 deletions(-)
22
23 diff --git a/dev-python/pyside/metadata.xml b/dev-python/pyside/metadata.xml
24 index dcfc63e1..6dff63cb 100644
25 --- a/dev-python/pyside/metadata.xml
26 +++ b/dev-python/pyside/metadata.xml
27 @@ -6,18 +6,26 @@
28 <name>Gentoo Qt Project</name>
29 </maintainer>
30 <use>
31 - <flag name="X">Build QtGui and QtTest modules</flag>
32 - <flag name="declarative">Build QtDeclarative module</flag>
33 + <flag name="concurrent">Build QtConcurrent module</flag>
34 + <flag name="declarative">Build QtQml, QtQuick, and QtQuickWidgets modules</flag>
35 <flag name="designer">Build QtDesigner and QtUiTools modules</flag>
36 + <flag name="gui">Build QtGui module</flag>
37 <flag name="help">Build QtHelp module</flag>
38 <flag name="multimedia">Build QtMultimedia module</flag>
39 + <flag name="network">Build QtNetwork module</flag>
40 <flag name="opengl">Build QtOpenGL module</flag>
41 + <flag name="printsupport">Build QtPrintSupport module</flag>
42 <flag name="script">Build QtScript module</flag>
43 <flag name="scripttools">Build QtScriptTools module</flag>
44 <flag name="sql">Build QtSql module</flag>
45 <flag name="svg">Build QtSvg module</flag>
46 - <flag name="webkit">Build QtWebKit module</flag>
47 + <flag name="testlib">Build QtTest module</flag>
48 + <flag name="webchannel">Build QtWebChannel module</flag>
49 + <flag name="webengine">Build QtWebEngine and QtWebEngineWidgets modules</flag>
50 + <flag name="webkit">Build QtWebKit and QtWebKitWidgets modules</flag>
51 + <flag name="websockets">Build QtWebSockets module</flag>
52 + <flag name="widgets">Build QtWidgets module</flag>
53 + <flag name="x11extras">Build QtX11Extras module</flag>
54 <flag name="xmlpatterns">Build QtXmlPatterns module</flag>
55 </use>
56 </pkgmetadata>
57 -
58
59 diff --git a/dev-python/pyside/pyside-9999.ebuild b/dev-python/pyside/pyside-9999.ebuild
60 index b3beda50..108dbb67 100644
61 --- a/dev-python/pyside/pyside-9999.ebuild
62 +++ b/dev-python/pyside/pyside-9999.ebuild
63 @@ -1,71 +1,94 @@
64 -# Copyright 1999-2016 Gentoo Foundation
65 +# Copyright 1999-2017 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67
68 EAPI=6
69
70 -PYTHON_COMPAT=( python{2_7,3_4,3_5} )
71 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
72
73 -inherit cmake-utils flag-o-matic python-r1 virtualx git-r3
74 +inherit cmake-utils python-r1 virtualx git-r3
75
76 DESCRIPTION="Python bindings for the Qt framework"
77 -HOMEPAGE="https://wiki.qt.io/Pyside"
78 +HOMEPAGE="https://wiki.qt.io/PySide2"
79 EGIT_REPO_URI=(
80 "git://code.qt.io/pyside/${PN}.git"
81 "https://code.qt.io/git/pyside/${PN}.git"
82 )
83 +#FIXME: Switch to the clang-enabled "dev" branch once stable.
84 +EGIT_BRANCH="5.6"
85
86 LICENSE="LGPL-2.1"
87 -SLOT="0"
88 +SLOT="2"
89 KEYWORDS=""
90
91 -IUSE="X declarative designer help multimedia opengl script scripttools sql svg test webkit xmlpatterns"
92 +IUSE="concurrent declarative designer gui help multimedia network opengl
93 + printsupport script scripttools sql svg test testlib webchannel
94 + webengine webkit websockets widgets x11extras xmlpatterns"
95 +
96 +# The requirements below were strongly inspired by their PyQt5 equivalents.
97 REQUIRED_USE="
98 ${PYTHON_REQUIRED_USE}
99 - declarative? ( X )
100 - designer? ( X )
101 - help? ( X )
102 - multimedia? ( X )
103 - opengl? ( X )
104 - scripttools? ( X script )
105 - sql? ( X )
106 - svg? ( X )
107 - test? ( X )
108 - webkit? ( X )
109 + declarative? ( gui network )
110 + designer? ( widgets )
111 + help? ( widgets )
112 + multimedia? ( gui network )
113 + opengl? ( widgets )
114 + printsupport? ( widgets )
115 + scripttools? ( gui script )
116 + sql? ( widgets )
117 + svg? ( widgets )
118 + test? ( widgets )
119 + testlib? ( widgets )
120 + webchannel? ( network )
121 + webengine? ( network webchannel widgets )
122 + webkit? ( gui network printsupport widgets )
123 + websockets? ( network )
124 + widgets? ( gui )
125 + xmlpatterns? ( network )
126 "
127
128 -# Minimal supported version of Qt.
129 -QT_PV="4.8.5:4"
130 +# Minimum version of Qt required, derived from the CMakeLists.txt line:
131 +# find_package(Qt5 ${QT_PV} REQUIRED COMPONENTS Core)
132 +QT_PV="5.6*:5"
133
134 RDEPEND="
135 ${PYTHON_DEPS}
136 - >=dev-python/shiboken-${PV}[${PYTHON_USEDEP}]
137 - >=dev-qt/qtcore-${QT_PV}
138 - X? (
139 - >=dev-qt/qtgui-${QT_PV}[accessibility]
140 - >=dev-qt/qttest-${QT_PV}
141 - )
142 - declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
143 - designer? ( >=dev-qt/designer-${QT_PV} )
144 - help? ( >=dev-qt/qthelp-${QT_PV} )
145 - multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
146 - opengl? ( >=dev-qt/qtopengl-${QT_PV} )
147 - script? ( >=dev-qt/qtscript-${QT_PV} )
148 - sql? ( >=dev-qt/qtsql-${QT_PV} )
149 - svg? ( >=dev-qt/qtsvg-${QT_PV}[accessibility] )
150 - webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
151 - xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
152 -"
153 -DEPEND="${RDEPEND}
154 - >=dev-qt/qtgui-${QT_PV}
155 + >=dev-python/shiboken-${PV}:${SLOT}[${PYTHON_USEDEP}]
156 + =dev-qt/qtcore-${QT_PV}
157 + =dev-qt/qtxml-${QT_PV}
158 + declarative? ( =dev-qt/qtdeclarative-${QT_PV}[widgets?] )
159 + designer? ( =dev-qt/designer-${QT_PV} )
160 + help? ( =dev-qt/qthelp-${QT_PV} )
161 + multimedia? ( =dev-qt/qtmultimedia-${QT_PV}[widgets?] )
162 + opengl? ( =dev-qt/qtopengl-${QT_PV} )
163 + printsupport? ( =dev-qt/qtprintsupport-${QT_PV} )
164 + script? ( =dev-qt/qtscript-${QT_PV} )
165 + sql? ( =dev-qt/qtsql-${QT_PV} )
166 + svg? ( =dev-qt/qtsvg-${QT_PV} )
167 + testlib? ( =dev-qt/qttest-${QT_PV} )
168 + webchannel? ( =dev-qt/qtwebchannel-${QT_PV} )
169 + webengine? ( =dev-qt/qtwebengine-${QT_PV}[widgets?] )
170 + webkit? ( =dev-qt/qtwebkit-${QT_PV}[printsupport] )
171 + websockets? ( =dev-qt/qtwebsockets-${QT_PV} )
172 + x11extras? ( =dev-qt/qtx11extras-${QT_PV} )
173 + xmlpatterns? ( =dev-qt/qtxmlpatterns-${QT_PV} )
174 + concurrent? ( =dev-qt/qtconcurrent-${QT_PV} )
175 + gui? ( =dev-qt/qtgui-${QT_PV} )
176 + network? ( =dev-qt/qtnetwork-${QT_PV} )
177 + printsupport? ( =dev-qt/qtprintsupport-${QT_PV} )
178 + sql? ( =dev-qt/qtsql-${QT_PV} )
179 + testlib? ( =dev-qt/qttest-${QT_PV} )
180 + widgets? ( =dev-qt/qtwidgets-${QT_PV} )
181 "
182 -
183 -DOCS=( ChangeLog )
184 +DEPEND="${RDEPEND}"
185
186 src_prepare() {
187 - # Fix generated pkgconfig file to require the shiboken
188 - # library suffixed with the correct python version.
189 - sed -i -e '/^Requires:/ s/shiboken$/&@SHIBOKEN_PYTHON_SUFFIX@/' \
190 - libpyside/pyside2.pc.in || die
191 + #FIXME: Remove the following "sed" patch after this upstream issue is closed:
192 + # https://bugreports.qt.io/browse/PYSIDE-502
193 + # Force the optional "Qt5Concurrent", "Qt5Gui", "Qt5Network",
194 + # "Qt5PrintSupport", "Qt5Sql", "Qt5Test", and "Qt5Widgets" packages
195 + # erroneously marked as mandatory to be optional.
196 + sed -i -e 's/^\(CHECK_PACKAGE_FOUND(Qt5\(Concurrent\|Gui\|Network\|PrintSupport\|Sql\|Test\|Widgets\)\))$/\1 opt)/' \
197 + PySide2/CMakeLists.txt || die
198
199 if use prefix; then
200 cp "${FILESDIR}"/rpath.cmake . || die
201 @@ -76,25 +99,38 @@ src_prepare() {
202 }
203
204 src_configure() {
205 - append-cxxflags -std=c++11
206 -
207 + # For each line of the form "CHECK_PACKAGE_FOUND(${PACKAGE_NAME} opt)" in
208 + # PySide2/CMakeLists.txt defining an optional dependency, an option of the
209 + # form "-DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGE_NAME}=$(usex !${USE_FLAG})"
210 + # is passed to "cmake" here conditionally disabling this dependency.
211 local mycmakeargs=(
212 -DBUILD_TESTS=$(usex test)
213 - -DDISABLE_QtGui=$(usex !X)
214 - -DDISABLE_QtTest=$(usex !X)
215 - -DDISABLE_QtQml=$(usex !declarative)
216 - -DDISABLE_QtQuick=$(usex !declarative)
217 - -DDISABLE_QtQuickWidgets=$(usex !declarative)
218 - -DDISABLE_QtUiTools=$(usex !designer)
219 - -DDISABLE_QtHelp=$(usex !help)
220 - -DDISABLE_QtMultimedia=$(usex !multimedia)
221 - -DDISABLE_QtOpenGL=$(usex !opengl)
222 - -DDISABLE_QtScript=$(usex !script)
223 - -DDISABLE_QtScriptTools=$(usex !scripttools)
224 - -DDISABLE_QtSql=$(usex !sql)
225 - -DDISABLE_QtSvg=$(usex !svg)
226 - -DDISABLE_QtWebKit=$(usex !webkit)
227 - -DDISABLE_QtXmlPatterns=$(usex !xmlpatterns)
228 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Concurrent=$(usex !concurrent)
229 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Gui=$(usex !gui)
230 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Designer=$(usex !designer)
231 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5UiTools=$(usex !designer)
232 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Help=$(usex !help)
233 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=$(usex !multimedia)
234 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Network=$(usex !network)
235 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5OpenGL=$(usex !opengl)
236 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Qml=$(usex !declarative)
237 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Quick=$(usex !declarative)
238 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5QuickWidgets=$(usex !declarative)
239 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5PrintSupport=$(usex !printsupport)
240 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Script=$(usex !script)
241 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5ScriptTools=$(usex !scripttools)
242 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Sql=$(usex !sql)
243 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Svg=$(usex !svg)
244 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Test=$(usex !testlib)
245 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebChannel=$(usex !webchannel)
246 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngine=$(usex !webengine)
247 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets=$(usex !webengine)
248 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKit=$(usex !webkit)
249 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebKitWidgets=$(usex !webkit)
250 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebSockets=$(usex !websockets)
251 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=$(usex !widgets)
252 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras=$(usex !x11extras)
253 + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5XmlPatterns=$(usex !xmlpatterns)
254 )
255
256 configuration() {
257 @@ -120,7 +156,7 @@ src_test() {
258 src_install() {
259 installation() {
260 cmake-utils_src_install
261 - mv "${ED}"usr/$(get_libdir)/pkgconfig/${PN}{,-${EPYTHON}}.pc || die
262 + mv "${ED}"usr/$(get_libdir)/pkgconfig/${PN}2{,-${EPYTHON}}.pc || die
263 }
264 python_foreach_impl installation
265 }
266
267 diff --git a/dev-python/shiboken/shiboken-9999.ebuild b/dev-python/shiboken/shiboken-9999.ebuild
268 index 0c7e78ff..721c08d3 100644
269 --- a/dev-python/shiboken/shiboken-9999.ebuild
270 +++ b/dev-python/shiboken/shiboken-9999.ebuild
271 @@ -1,44 +1,52 @@
272 -# Copyright 1999-2016 Gentoo Foundation
273 +# Copyright 1999-2017 Gentoo Foundation
274 # Distributed under the terms of the GNU General Public License v2
275
276 EAPI=6
277
278 -PYTHON_COMPAT=( python{2_7,3_4,3_5} )
279 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
280
281 -inherit cmake-utils python-r1 git-r3
282 +inherit cmake-utils llvm python-r1 git-r3
283
284 -DESCRIPTION="A tool for creating Python bindings for C++ libraries"
285 -HOMEPAGE="https://wiki.qt.io/Pyside"
286 +DESCRIPTION="Tool for creating Python bindings for C++ libraries"
287 +HOMEPAGE="https://wiki.qt.io/PySide2"
288 EGIT_REPO_URI=(
289 "git://code.qt.io/pyside/${PN}.git"
290 "https://code.qt.io/git/pyside/${PN}.git"
291 )
292 +#FIXME: Switch to the clang-enabled "dev" branch once stable.
293 +EGIT_BRANCH="5.6"
294
295 LICENSE="LGPL-2.1"
296 -SLOT="0"
297 +SLOT="2"
298 KEYWORDS=""
299 IUSE="test"
300 -
301 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
302
303 +# Minimum version of Qt required.
304 +QT_PV="5.6*:5"
305 +
306 +#FIXME: Add "sys-devel/clang:*" after switching to the "dev" branch.
307 RDEPEND="
308 ${PYTHON_DEPS}
309 dev-libs/libxml2
310 dev-libs/libxslt
311 - dev-qt/qtcore:5
312 - dev-qt/qtxml:5
313 - dev-qt/qtxmlpatterns:5
314 + =dev-qt/qtcore-${QT_PV}
315 + =dev-qt/qtxml-${QT_PV}
316 + =dev-qt/qtxmlpatterns-${QT_PV}
317 "
318 DEPEND="${RDEPEND}
319 test? (
320 - dev-qt/qtgui:5
321 - dev-qt/qttest:5
322 + =dev-qt/qtgui-${QT_PV}
323 + =dev-qt/qttest-${QT_PV}
324 )
325 "
326
327 DOCS=( AUTHORS )
328
329 src_prepare() {
330 + #FIXME: Uncomment after switching to the "dev" branch.
331 + # sed -i -e "/^find_library(CLANG_LIBRARY/ s~/lib)$~/$(get_libdir))~" CMakeLists.txt || die
332 +
333 if use prefix; then
334 cp "${FILESDIR}"/rpath.cmake . || die
335 sed -i -e '1iinclude(rpath.cmake)' CMakeLists.txt || die
336 @@ -61,6 +69,13 @@ src_configure() {
337 )
338 fi
339
340 + #FIXME: Uncomment after switching to the "dev" branch.
341 + #FIXME: "CMakeLists.txt" currently requires that callers manually set
342 + #this environment variable to the absolute path of the directory
343 + #containing clang libraries rather than magically finding this path
344 + #(e.g., via "find_package(CLang)"). If this changes, remove this option.
345 + # CLANG_INSTALL_DIR="$(get_llvm_prefix)" cmake-utils_src_configure
346 +
347 cmake-utils_src_configure
348 }
349 python_foreach_impl configuration