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: Tue, 05 Nov 2019 06:02:08
Message-Id: 1572933717.35fdb7df68e2c286b13fae71a1344aa3a299e8a9.pesa@gentoo
1 commit: 35fdb7df68e2c286b13fae71a1344aa3a299e8a9
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 5 05:42:30 2019 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 5 06:01:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35fdb7df
7
8 dev-python/PyQt5: add 5.13.2
9
10 Package-Manager: Portage-2.3.78, Repoman-2.3.17
11 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
12
13 dev-python/PyQt5/Manifest | 1 +
14 dev-python/PyQt5/PyQt5-5.13.2.ebuild | 199 +++++++++++++++++++++++++++++++++++
15 2 files changed, 200 insertions(+)
16
17 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
18 index 375ec4286cf..37fb1ef7f45 100644
19 --- a/dev-python/PyQt5/Manifest
20 +++ b/dev-python/PyQt5/Manifest
21 @@ -1,3 +1,4 @@
22 +DIST PyQt5-5.13.2.tar.gz 3162810 BLAKE2B 383aaa3f1f51ed618a3b6475432a96f6a8f89ad4d97197fe87469e0a69e1db79c762965adfacdf92cc43d1bb2eb5e2790f6bdb7e8b288f0feade828bf8e30090 SHA512 9a16450d8fe2a7e94e182ebb03cc785c6de516e356251753abfb79af3958230043f2db59750cde0a6f1fd6cf5568eb8b7ae76d5a3fbcfe9f7807e02867973b55
23 DIST PyQt5_gpl-5.10.1.tar.gz 3110469 BLAKE2B 75e24bd8c0739d47eff6212435aa783eaa302633beb0494f099edc3f8f99600cd03dc3cba5152ed7ae703cfe445ecae06ec5d2281dd7c0640c71db041659bd6f SHA512 04cd0292f7a088f9c0d088d7c73ec96cfc40253f771dfdf194eb92be7635e6fcaf04863fa24215e9c34a096658549bb2feeb8d8fdca1e39ed87f0256ef0f790b
24 DIST PyQt5_gpl-5.12.2.tar.gz 3147205 BLAKE2B ad0b09548521ceff869bb44cfceb0c2cf31338f46c76da23582f7949fdcc0e8feee3cc0dc0610e8152dfbc701c3ac765eea7898f5061775a92e2601c5b7ea8ca SHA512 dc23bb7dacb305d4f9a630f2b5c3809d5d6734ba234c9941a3c44c770af8534dd737160dbe007a1f15d5c90e2e52419dd749b3ef942b4e71917c1cea2220a666
25 DIST PyQt5_gpl-5.13.1.tar.gz 3162737 BLAKE2B 1242069b757ef7d9532375758ab29954f216f6d8b1fa18e433ab41cf56df13b7408547dd5c58eb0417a011d834ef9301aa090a4e88a9b10d48f15267eccbf6a3 SHA512 7b7001b16a8c730d7ff2d340fa1dd118868b53519e8f75e8c2ce00b44e3637ac6a31b41a7456fc610df11ff3928b924cb54c0c3712f22ed4df5058fd8bc77281
26
27 diff --git a/dev-python/PyQt5/PyQt5-5.13.2.ebuild b/dev-python/PyQt5/PyQt5-5.13.2.ebuild
28 new file mode 100644
29 index 00000000000..b553787ca93
30 --- /dev/null
31 +++ b/dev-python/PyQt5/PyQt5-5.13.2.ebuild
32 @@ -0,0 +1,199 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
39 +inherit multibuild python-r1 qmake-utils
40 +
41 +DESCRIPTION="Python bindings for the Qt framework"
42 +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
43 +
44 +MY_P=${PN}-${PV/_pre/.dev}
45 +if [[ ${PV} == *_pre* ]]; then
46 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
47 +else
48 + SRC_URI="https://www.riverbankcomputing.com/static/Downloads/${PN}/${PV}/${MY_P}.tar.gz"
49 +fi
50 +
51 +LICENSE="GPL-3"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
54 +
55 +# TODO: QtNfc, QtRemoteObjects (Qt >= 5.12)
56 +IUSE="bluetooth dbus debug declarative designer examples gles2 gui help location multimedia
57 + network networkauth opengl positioning printsupport sensors serialport sql +ssl svg
58 + testlib webchannel webkit websockets widgets x11extras xmlpatterns"
59 +
60 +# The requirements below were extracted from configure.py
61 +# and from the output of 'grep -r "%Import " "${S}"/sip'
62 +REQUIRED_USE="
63 + ${PYTHON_REQUIRED_USE}
64 + bluetooth? ( gui )
65 + declarative? ( gui network )
66 + designer? ( widgets )
67 + help? ( gui widgets )
68 + location? ( positioning )
69 + multimedia? ( gui network )
70 + networkauth? ( network )
71 + opengl? ( gui widgets )
72 + positioning? ( gui )
73 + printsupport? ( gui widgets )
74 + sensors? ( gui )
75 + serialport? ( gui )
76 + sql? ( widgets )
77 + svg? ( gui widgets )
78 + testlib? ( widgets )
79 + webchannel? ( network )
80 + webkit? ( gui network printsupport widgets )
81 + websockets? ( network )
82 + widgets? ( gui )
83 + xmlpatterns? ( network )
84 +"
85 +
86 +# Minimal supported version of Qt.
87 +QT_PV="5.10:5"
88 +
89 +RDEPEND="
90 + ${PYTHON_DEPS}
91 + >=dev-python/PyQt5-sip-4.19.19:=[${PYTHON_USEDEP}]
92 + >=dev-qt/qtcore-${QT_PV}
93 + >=dev-qt/qtxml-${QT_PV}
94 + virtual/python-enum34[${PYTHON_USEDEP}]
95 + bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
96 + dbus? (
97 + dev-python/dbus-python[${PYTHON_USEDEP}]
98 + >=dev-qt/qtdbus-${QT_PV}
99 + )
100 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
101 + designer? ( >=dev-qt/designer-${QT_PV} )
102 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2=] )
103 + help? ( >=dev-qt/qthelp-${QT_PV} )
104 + location? ( >=dev-qt/qtlocation-${QT_PV} )
105 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
106 + network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
107 + networkauth? ( >=dev-qt/qtnetworkauth-${QT_PV} )
108 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
109 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
110 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
111 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
112 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
113 + sql? ( >=dev-qt/qtsql-${QT_PV} )
114 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
115 + testlib? ( >=dev-qt/qttest-${QT_PV} )
116 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
117 + webkit? ( dev-qt/qtwebkit:5[printsupport] )
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.19[${PYTHON_USEDEP}]
125 + dbus? ( virtual/pkgconfig )
126 +"
127 +
128 +S=${WORKDIR}/${MY_P}
129 +
130 +pyqt_use_enable() {
131 + use "$1" || return
132 +
133 + if [[ $# -eq 1 ]]; then
134 + echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}
135 + else
136 + shift
137 + echo ${@/#/--enable=}
138 + fi
139 +}
140 +
141 +src_configure() {
142 + configuration() {
143 + local myconf=(
144 + "${PYTHON}"
145 + "${S}"/configure.py
146 + $(usex debug '--debug --qml-debug --trace' '')
147 + --verbose
148 + --confirm-license
149 + --qmake="$(qt5_get_bindir)"/qmake
150 + --bindir="${EPREFIX}/usr/bin"
151 + --qsci-api
152 + --enable=QtCore
153 + --enable=QtXml
154 + $(pyqt_use_enable bluetooth)
155 + $(pyqt_use_enable dbus QtDBus)
156 + $(usex dbus '' --no-python-dbus)
157 + $(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets ''))
158 + $(usex declarative '' --no-qml-plugin)
159 + $(pyqt_use_enable designer)
160 + $(usex designer '' --no-designer-plugin)
161 + $(usex gles2 '--disable-feature=PyQt_Desktop_OpenGL' '')
162 + $(pyqt_use_enable gui)
163 + $(pyqt_use_enable gui $(use gles2 && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
164 + $(pyqt_use_enable help)
165 + $(pyqt_use_enable location)
166 + $(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets ''))
167 + $(pyqt_use_enable network)
168 + $(pyqt_use_enable networkauth QtNetworkAuth)
169 + $(pyqt_use_enable opengl QtOpenGL)
170 + $(pyqt_use_enable positioning)
171 + $(pyqt_use_enable printsupport QtPrintSupport)
172 + $(pyqt_use_enable sensors)
173 + $(pyqt_use_enable serialport QtSerialPort)
174 + $(pyqt_use_enable sql)
175 + $(usex ssl '' '--disable-feature=PyQt_SSL')
176 + $(pyqt_use_enable svg)
177 + $(pyqt_use_enable testlib QtTest)
178 + $(pyqt_use_enable webchannel QtWebChannel)
179 + $(pyqt_use_enable webkit QtWebKit QtWebKitWidgets)
180 + $(pyqt_use_enable websockets QtWebSockets)
181 + $(pyqt_use_enable widgets)
182 + $(pyqt_use_enable x11extras QtX11Extras)
183 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
184 + )
185 + echo "${myconf[@]}"
186 + "${myconf[@]}" || die
187 +
188 + # Fix parallel install failure
189 + sed -i -e '/INSTALLS += distinfo/i distinfo.depends = install_subtargets' ${PN}.pro || die
190 +
191 + # Run eqmake to respect toolchain and build flags
192 + eqmake5 -recursive ${PN}.pro
193 + }
194 + python_foreach_impl run_in_build_dir configuration
195 +}
196 +
197 +src_compile() {
198 + python_foreach_impl run_in_build_dir default
199 +}
200 +
201 +src_install() {
202 + installation() {
203 + local tmp_root=${D}/${PN}_tmp_root
204 + emake INSTALL_ROOT="${tmp_root}" install
205 +
206 + local bin_dir=${tmp_root}${EPREFIX}/usr/bin
207 + local exe
208 + for exe in pylupdate5 pyrcc5 pyuic5; do
209 + python_doexe "${bin_dir}/${exe}"
210 + rm "${bin_dir}/${exe}" || die
211 + done
212 +
213 + local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
214 + if python_is_python3; then
215 + rm -r "${uic_dir}"/port_v2 || die
216 + else
217 + rm -r "${uic_dir}"/port_v3 || die
218 + fi
219 +
220 + multibuild_merge_root "${tmp_root}" "${D}"
221 + python_optimize
222 + }
223 + python_foreach_impl run_in_build_dir installation
224 +
225 + einstalldocs
226 +
227 + if use examples; then
228 + insinto /usr/share/doc/${PF}
229 + doins -r examples
230 + fi
231 +}