Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/PyQt5/
Date: Thu, 27 Dec 2018 19:49:38
Message-Id: 1545940150.1252c19b894ba758e02a5efe468b9771bc76923c.pesa@gentoo
1 commit: 1252c19b894ba758e02a5efe468b9771bc76923c
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 27 19:39:19 2018 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 27 19:49:10 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1252c19b
7
8 dev-python/PyQt5: add 5.12 snapshot
9
10 This depends on the new private SIP module (dev-python/PyQt5-sip).
11
12 Added support for QtNetworkAuth.
13 QtWebEngine support has been removed since it is no longer present
14 in the source tarball and will likely be packaged separately.
15
16 Bug: https://bugs.gentoo.org/668014
17 Package-Manager: Portage-2.3.52, Repoman-2.3.12
18 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
19
20 dev-python/PyQt5/Manifest | 1 +
21 dev-python/PyQt5/PyQt5-5.12_pre1812231618.ebuild | 196 +++++++++++++++++++++++
22 dev-python/PyQt5/metadata.xml | 1 +
23 3 files changed, 198 insertions(+)
24
25 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
26 index 5d0feadf282..7571168f27d 100644
27 --- a/dev-python/PyQt5/Manifest
28 +++ b/dev-python/PyQt5/Manifest
29 @@ -1,3 +1,4 @@
30 DIST PyQt5_gpl-5.10.1.tar.gz 3110469 BLAKE2B 75e24bd8c0739d47eff6212435aa783eaa302633beb0494f099edc3f8f99600cd03dc3cba5152ed7ae703cfe445ecae06ec5d2281dd7c0640c71db041659bd6f SHA512 04cd0292f7a088f9c0d088d7c73ec96cfc40253f771dfdf194eb92be7635e6fcaf04863fa24215e9c34a096658549bb2feeb8d8fdca1e39ed87f0256ef0f790b
31 DIST PyQt5_gpl-5.11.3.tar.gz 3121036 BLAKE2B e7881fea18535ba55c0b6946718fd1eccdc6a4678b869678c9413c500daee0cbfb281116db40a13655c8cb5e778b605f141821e20bf3834f1434908f73fc22bd SHA512 6f4abb1866ce357263c208121607072e127c8853e9c6bf039b034fefdda4c40e38f917c3b313375f0d692d764ecf26ff3a6b12cda2a2eeb5237db8b5e9443548
32 +DIST PyQt5_gpl-5.12.dev1812231618.tar.gz 3120289 BLAKE2B 2d48eaa39090ed60f971b84c96d148fba05c58fe15196f9a99c7a6c8302f364623dd0e1f0cc16d6fb527606cabf6cb072316319252b65f44c9652c1d95ca9fa6 SHA512 6a95fb02fe1eea3e7fb9a03da457a036f92f5404074e7234eeb52e5941bd247343e3d34d4054dc5a604b380fc2a227f7fe5ae250fcd4449da4a3fe856ab8eba3
33 DIST PyQt5_gpl-5.9.2.tar.gz 3102848 BLAKE2B b87f25693aa2b20211119f89cf13665bf88f14de8827d43ba757344ab9bdef0b0c197abb8386308c72925da263cabb6efd3f104db8a350c51fca3fba8c7c06b6 SHA512 5af2e65addaed7dd02d8dbf7a7c63767e565fc8edeb7b51e5991a00cda29f75b666529097646e821aaff556f350a929fd451f548bba76e97355b7fe10bd913bc
34
35 diff --git a/dev-python/PyQt5/PyQt5-5.12_pre1812231618.ebuild b/dev-python/PyQt5/PyQt5-5.12_pre1812231618.ebuild
36 new file mode 100644
37 index 00000000000..7db840ce9df
38 --- /dev/null
39 +++ b/dev-python/PyQt5/PyQt5-5.12_pre1812231618.ebuild
40 @@ -0,0 +1,196 @@
41 +# Copyright 1999-2018 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=7
45 +
46 +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
47 +inherit multibuild python-r1 qmake-utils
48 +
49 +DESCRIPTION="Python bindings for the Qt framework"
50 +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
51 +
52 +MY_P=${PN}_gpl-${PV/_pre/.dev}
53 +if [[ ${PV} == *_pre* ]]; then
54 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
55 +else
56 + SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
57 +fi
58 +
59 +LICENSE="GPL-3"
60 +SLOT="0"
61 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
62 +
63 +# TODO: QtNfc, QtRemoteObjects (Qt >= 5.12)
64 +IUSE="bluetooth dbus debug declarative designer examples gles2 gui help location
65 + multimedia network networkauth opengl positioning printsupport sensors
66 + serialport sql svg testlib webchannel webkit websockets widgets x11extras
67 + xmlpatterns"
68 +
69 +# The requirements below were extracted from configure.py
70 +# and from the output of 'grep -r "%Import " "${S}"/sip'
71 +REQUIRED_USE="
72 + ${PYTHON_REQUIRED_USE}
73 + bluetooth? ( gui )
74 + declarative? ( gui network )
75 + designer? ( widgets )
76 + help? ( gui widgets )
77 + location? ( positioning )
78 + multimedia? ( gui network )
79 + networkauth? ( network )
80 + opengl? ( gui widgets )
81 + positioning? ( gui )
82 + printsupport? ( gui widgets )
83 + sensors? ( gui )
84 + serialport? ( gui )
85 + sql? ( widgets )
86 + svg? ( gui widgets )
87 + testlib? ( widgets )
88 + webchannel? ( network )
89 + webkit? ( gui network printsupport widgets )
90 + websockets? ( network )
91 + widgets? ( gui )
92 + xmlpatterns? ( network )
93 +"
94 +
95 +# Minimal supported version of Qt.
96 +QT_PV="5.10:5"
97 +
98 +RDEPEND="
99 + ${PYTHON_DEPS}
100 + >=dev-python/PyQt5-sip-4.19.14_pre:=[${PYTHON_USEDEP}]
101 + >=dev-qt/qtcore-${QT_PV}
102 + >=dev-qt/qtxml-${QT_PV}
103 + virtual/python-enum34[${PYTHON_USEDEP}]
104 + bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
105 + dbus? (
106 + dev-python/dbus-python[${PYTHON_USEDEP}]
107 + >=dev-qt/qtdbus-${QT_PV}
108 + )
109 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
110 + designer? ( >=dev-qt/designer-${QT_PV} )
111 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2=] )
112 + help? ( >=dev-qt/qthelp-${QT_PV} )
113 + location? ( >=dev-qt/qtlocation-${QT_PV} )
114 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
115 + network? ( >=dev-qt/qtnetwork-${QT_PV} )
116 + networkauth? ( >=dev-qt/qtnetworkauth-${QT_PV} )
117 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
118 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
119 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
120 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
121 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
122 + sql? ( >=dev-qt/qtsql-${QT_PV} )
123 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
124 + testlib? ( >=dev-qt/qttest-${QT_PV} )
125 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
126 + webkit? ( dev-qt/qtwebkit:5[printsupport] )
127 + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
128 + widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
129 + x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
130 + xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
131 +"
132 +DEPEND="${RDEPEND}
133 + >=dev-python/sip-4.19.14_pre[${PYTHON_USEDEP}]
134 + dbus? ( virtual/pkgconfig )
135 +"
136 +
137 +S=${WORKDIR}/${MY_P}
138 +
139 +pyqt_use_enable() {
140 + use "$1" || return
141 +
142 + if [[ $# -eq 1 ]]; then
143 + echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}
144 + else
145 + shift
146 + echo ${@/#/--enable=}
147 + fi
148 +}
149 +
150 +src_configure() {
151 + configuration() {
152 + local myconf=(
153 + "${PYTHON}"
154 + "${S}"/configure.py
155 + $(usex debug '--debug --qml-debug --trace' '')
156 + --verbose
157 + --confirm-license
158 + --qmake="$(qt5_get_bindir)"/qmake
159 + --bindir="${EPREFIX}/usr/bin"
160 + --sip-incdir="$(python_get_includedir)"
161 + --qsci-api
162 + --enable=QtCore
163 + --enable=QtXml
164 + $(pyqt_use_enable bluetooth)
165 + $(pyqt_use_enable dbus QtDBus)
166 + $(usex dbus '' --no-python-dbus)
167 + $(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets ''))
168 + $(usex declarative '' --no-qml-plugin)
169 + $(pyqt_use_enable designer)
170 + $(usex designer '' --no-designer-plugin)
171 + $(pyqt_use_enable gui)
172 + $(pyqt_use_enable gui $(use gles2 && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
173 + $(pyqt_use_enable help)
174 + $(pyqt_use_enable location)
175 + $(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets ''))
176 + $(pyqt_use_enable network)
177 + $(pyqt_use_enable networkauth QtNetworkAuth)
178 + $(pyqt_use_enable opengl QtOpenGL)
179 + $(pyqt_use_enable positioning)
180 + $(pyqt_use_enable printsupport QtPrintSupport)
181 + $(pyqt_use_enable sensors)
182 + $(pyqt_use_enable serialport QtSerialPort)
183 + $(pyqt_use_enable sql)
184 + $(pyqt_use_enable svg)
185 + $(pyqt_use_enable testlib QtTest)
186 + $(pyqt_use_enable webchannel QtWebChannel)
187 + $(pyqt_use_enable webkit QtWebKit QtWebKitWidgets)
188 + $(pyqt_use_enable websockets QtWebSockets)
189 + $(pyqt_use_enable widgets)
190 + $(pyqt_use_enable x11extras QtX11Extras)
191 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
192 + )
193 + echo "${myconf[@]}"
194 + "${myconf[@]}" || die
195 +
196 + eqmake5 -recursive ${PN}.pro
197 + }
198 + python_foreach_impl run_in_build_dir configuration
199 +}
200 +
201 +src_compile() {
202 + python_foreach_impl run_in_build_dir default
203 +}
204 +
205 +src_install() {
206 + installation() {
207 + local tmp_root=${D}/${PN}_tmp_root
208 + # parallel install fails (same issue as qscintilla-python-2.10.8)
209 + emake -j1 INSTALL_ROOT="${tmp_root}" install
210 +
211 + local bin_dir=${tmp_root}${EPREFIX}/usr/bin
212 + local exe
213 + for exe in pylupdate5 pyrcc5 pyuic5; do
214 + python_doexe "${bin_dir}/${exe}"
215 + rm "${bin_dir}/${exe}" || die
216 + done
217 +
218 + local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
219 + if python_is_python3; then
220 + rm -r "${uic_dir}"/port_v2 || die
221 + else
222 + rm -r "${uic_dir}"/port_v3 || die
223 + fi
224 +
225 + multibuild_merge_root "${tmp_root}" "${D}"
226 + python_optimize
227 + }
228 + python_foreach_impl run_in_build_dir installation
229 +
230 + einstalldocs
231 +
232 + if use examples; then
233 + insinto /usr/share/doc/${PF}
234 + doins -r examples
235 + fi
236 +}
237
238 diff --git a/dev-python/PyQt5/metadata.xml b/dev-python/PyQt5/metadata.xml
239 index 9983da58626..92725cf1722 100644
240 --- a/dev-python/PyQt5/metadata.xml
241 +++ b/dev-python/PyQt5/metadata.xml
242 @@ -16,6 +16,7 @@
243 <flag name="location">Build bindings for the QtLocation module</flag>
244 <flag name="multimedia">Build bindings for the QtMultimedia module</flag>
245 <flag name="network">Build bindings for the QtNetwork module</flag>
246 + <flag name="networkauth">Build bindings for the QtNetworkAuth module</flag>
247 <flag name="opengl">Build bindings for the QtOpenGL module</flag>
248 <flag name="positioning">Build bindings for the QtPositioning module</flag>
249 <flag name="printsupport">Build bindings for the QtPrintSupport module</flag>